:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-muted: #999999;
    --border-color: #a5a5a5;
    --border-light: #e0e0e0;
    --primary-color: #EE2C44;
    --primary-hover: #4a4a4a;
    --border-radius: 8px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    min-height: 100vh;
    margin: 0 auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    padding: var(--spacing-xl) 0;
    flex-shrink: 0;
}

.logo {
    width: 300px;
    max-width: 100%;
    height: auto;
}

/* Main content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Input section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

#prompt-input {
    width: 100%;
    min-height: 150px;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: var(--transition);
}

#prompt-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 74, 74, 0.1);
}

#prompt-input::placeholder {
    color: var(--text-muted);
}

/* Submit button */
#submit-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

#submit-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

#submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#submit-btn .btn-loading {
    display: none;
}

#submit-btn.loading .btn-text {
    display: none;
}

#submit-btn.loading .btn-loading {
    display: inline;
}

/* Response section */
.response-section {
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fafafa;
    min-height: 200px;
}

.response-header {
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#response-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.tree {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--spacing-sm);
}

/* Mobile responsive */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: var(--spacing-sm);
    }

    header {
        padding: var(--spacing-lg) 0;
    }

    .logo {
        width: 250px;
    }

    #prompt-input {
        min-height: 120px;
    }

    .response-section {
        padding: var(--spacing-md);
        min-height: 150px;
    }
}

/* Cursor animation for streaming */
.streaming #response-content::after {
    content: '|';
    animation: blink 1s infinite;
}

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