/* ============================================
   CLI INTERFACE - STILE CLAUDE CODE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #1e1e1e;
    --bg-lighter: #252526;
    --text-main: #d4d4d4;
    --text-dim: #858585;
    --text-bright: #ffffff;
    --accent-blue: #569cd6;
    --accent-green: #4ec9b0;
    --accent-yellow: #dcdcaa;
    --border-color: #3e3e42;
}

html, body {
    height: 100%;
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   HEADER & LOGO
   ============================================ */

.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 60px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 13px;
}

.user-name {
    color: var(--accent-green);
    font-weight: 500;
}

.logout-btn {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--bg-lighter);
    color: var(--text-bright);
    border-color: var(--accent-blue);
}

/* ============================================
   CLI CONTAINER
   ============================================ */

.cli-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px 20px; /* Added top padding for fixed header */
}

/* ============================================
   OUTPUT AREA
   ============================================ */

.cli-output {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.cli-output::-webkit-scrollbar {
    width: 10px;
}

.cli-output::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.cli-output::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

/* Message Blocks */
.user-message {
    color: var(--text-bright);
    margin: 20px 0 10px 0;
}

.user-label {
    color: var(--accent-blue);
    font-weight: 500;
}

/* Loading Indicator */
.loading-indicator {
    color: var(--accent-blue);
    margin: 10px 0;
    font-family: 'Fira Code', monospace;
}

/* AI Response */
.ai-response {
    color: var(--text-main);
    margin: 15px 0;
    line-height: 1.8;
}

.ai-response a {
    color: var(--accent-blue);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-blue);
    transition: all 0.2s ease;
}

.ai-response a:hover {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

/* Thinking Block */
.thinking-block {
    background: rgba(86, 156, 214, 0.1);
    border-left: 3px solid var(--accent-blue);
    padding: 12px;
    margin: 10px 0;
    color: var(--text-dim);
    font-style: italic;
}

/* ============================================
   INPUT AREA
   ============================================ */

.cli-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.cli-prompt {
    color: var(--accent-blue);
    font-weight: 500;
    flex-shrink: 0;
}

.cli-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-bright);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    padding: 8px 0;
}

.cli-input::placeholder {
    color: var(--text-dim);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message,
.function-calls,
.function-results,
.ai-response {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   LOGIN FORM
   ============================================ */

.login-form {
    background: var(--bg-lighter);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.login-message {
    color: var(--accent-yellow);
    margin-bottom: 15px;
    font-weight: 500;
}

.login-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-input {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-bright);
    padding: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    border-radius: 3px;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.login-button {
    background: var(--accent-blue);
    color: var(--text-bright);
    border: none;
    padding: 10px 20px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-button:hover {
    background: var(--accent-green);
}

.login-button:disabled {
    background: var(--text-dim);
    cursor: not-allowed;
}

.login-error {
    color: #e63946;
    margin-top: 10px;
    font-size: 13px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .cli-container {
        padding: 15px;
    }

    body {
        font-size: 13px;
    }

    .parameter {
        padding-left: 10px;
    }
}
