/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #000000;
    color: #00ff00;
    min-height: 100vh;
    overflow: hidden;
    line-height: 1.4;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    margin: 0;
    background: #000000;
    border: 1px solid #00ff00;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #001100;
    border-bottom: 1px solid #00ff00;
    min-height: 40px;
    font-size: 0.9rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-symbol {
    color: #00ff00;
    font-weight: 600;
}

.header-command {
    color: #00ff00;
    font-weight: 500;
}

.terminal-info {
    color: #008800;
    font-size: 0.8rem;
}

/* Main Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    position: relative;
    background: #000000;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 0;
}

/* Welcome Message */
.welcome-message {
    padding: 1rem 0;
    color: #00ff00;
}

.welcome-output {
    font-family: 'JetBrains Mono', monospace;
}

.output-line {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.command {
    color: #00ff00;
}

.output-text {
    color: #00ff00;
    margin-left: 1.5rem;
    line-height: 1.5;
}

/* Messages */
.message {
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.1s ease;
}

.user-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.bot-message {
    margin-left: 0;
}

.message-prompt {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message-content {
    flex: 1;
}

.message-text {
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.bot-message .message-text {
    margin-left: 1.5rem;
}

.message.streaming .message-text::after {
    content: '▋';
    animation: blink 1s infinite;
    margin-left: 2px;
    color: #00ff00;
}

/* Examples Section */
.examples-section {
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.example-questions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    width: 100%;
}

.example-btn {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid #008800;
    border-radius: 2px;
    color: #008800;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.example-btn:hover {
    background: #001100;
    border-color: #00ff00;
    color: #00ff00;
}

/* Input Section */
.input-section {
    padding: 1rem;
    background: #000000;
    border-top: 1px solid #00ff00;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    background: #000000;
}

.prompt-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #00ff00;
    font-weight: 600;
    font-size: 0.9rem;
    user-select: none;
    white-space: nowrap;
}

#question-input {
    flex: 1;
    padding: 0.25rem 0;
    border: none;
    background: transparent;
    color: #00ff00;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    resize: none;
    outline: none;
    width: 100%;
}

#question-input::placeholder {
    color: #008800;
}

.input-hint {
    text-align: center;
    font-size: 0.7rem;
    color: #008800;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.hint-text {
    opacity: 0.7;
}

/* Word Counter */
.word-counter {
    position: absolute;
    top: -20px;
    right: 10px;
    font-size: 0.7rem;
    color: #008800;
    background: #001100;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 500;
    border: 1px solid #008800;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #001100;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #008800;
    border-radius: 0;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #00ff00;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
        height: 100dvh;
        border: none;
    }
    
    .chat-area {
        height: calc(100vh - 40px);
        height: calc(100dvh - 40px);
    }
    
    .app-header {
        padding: 0.5rem;
    }
    
    .chat-messages {
        padding: 0.5rem;
        padding-bottom: 0;
    }
    
    .input-section {
        padding: 0.5rem;
    }
    
    .examples-section {
        padding: 0.5rem;
    }
    
    .example-questions {
        max-width: 100%;
    }
}

/* Terminal flicker effect */
@keyframes terminalFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.app-container {
    animation: terminalFlicker 10s infinite;
}

/* Selection color */
::selection {
    background: #00ff00;
    color: #000000;
}

/* Examples Section - Always visible but subtle */
.examples-section {
    padding: 1rem;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #003300;
    background: #000800;
}

.example-questions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    width: 100%;
}

.example-btn {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid #004400;
    border-radius: 2px;
    color: #008800;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    opacity: 0.8;
}

.example-btn:hover {
    background: #002200;
    border-color: #00ff00;
    color: #00ff00;
    opacity: 1;
}