:root {
    --bg-color: #002b36;
    --text-main: #839496;
    --text-highlight: #93a1a1;
    --prompt-color: #859900;
    --accent: #268bd2;
    --border: #073642;
}

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

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

header {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

header h1 {
    font-size: 1rem;
    color: var(--accent);
}

.user-info {
    display: flex;
    gap: 20px;
}

.logout-btn {
    color: #dc322f;
    text-decoration: none;
}

/* Alert Styling */
.alert {
    border: 1px solid var(--accent);
    padding: 10px;
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 0.9rem;
}

.alert.error {
    border-color: #dc322f;
    color: #dc322f;
}

.alert.success {
    border-color: #859900;
    color: #859900;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .container {
        padding: 10px;
        height: 100vh;
        border: none;
    }

    .auth-page {
        padding: 20px;
    }

    .auth-card {
        padding: 0;
        border: none;
    }

    .chat-window {
        padding-bottom: 10px;
    }

    .message {
        font-size: 0.9rem;
    }

    .send-form {
        padding: 10px 0;
    }
}

.chat-window {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 20px;
}

.message {
    font-size: 1rem;
    line-height: 1.4;
    word-break: break-all;
}

.prompt {
    color: var(--prompt-color);
    font-weight: bold;
}

.time {
    color: #586e75;
    font-size: 0.8rem;
    margin-right: 10px;
}

.send-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    position: relative;
}

.send-form label {
    color: var(--prompt-color);
    font-weight: bold;
    white-space: nowrap;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.send-form input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    caret-color: transparent;
    /* Hide default browser caret */
}

/* Custom terminal cursor */
.terminal-cursor {
    display: none;
    /* Hidden by default */
    width: 8px;
    height: 1.2rem;
    background-color: var(--text-main);
    animation: blink 1s step-end infinite;
    position: absolute;
    pointer-events: none;
}

.input-wrapper:focus-within .terminal-cursor {
    display: inline-block;
    /* Show on focus */
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.send-form button {
    display: none;
    /* Press enter to send */
}

/* Auth Page Styles (Terminal Style) */
.auth-page {
    padding: 40px;
}

.auth-card {
    max-width: 500px;
}

.auth-card h1 {
    color: var(--accent);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    color: var(--prompt-color);
}

.input-group input {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px;
    width: 100%;
    font-family: inherit;
    outline: none;
}

.primary-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
}

.primary-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
}

.auth-footer {
    margin-top: 20px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}