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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    font-size: 20px;
    line-height: 1.7;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Screen Navigation */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Typography */
h1 {
    font-size: 42px;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    font-size: 28px;
    color: #4a5568;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

h3 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 600;
}

p {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 22px;
    color: #718096;
    margin-bottom: 40px;
}

ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

li {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.6;
}

strong {
    color: #2d3748;
}

/* Buttons */
.primary-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 22px;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 15px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.primary-button:active {
    transform: translateY(0);
}

.secondary-button {
    background: white;
    color: #667eea;
    border: 3px solid #667eea;
    padding: 20px 40px;
    font-size: 22px;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 15px;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
}

.secondary-button:hover {
    background: #f7fafc;
    transform: translateY(-2px);
}

.secondary-button:active {
    transform: translateY(0);
}

.back-button {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 24px;
    font-size: 20px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 30px;
    font-weight: 600;
    transition: background 0.2s;
}

.back-button:hover {
    background: #cbd5e0;
}

/* Lesson Sections */
.lesson-section {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

/* Example Cards */
.example-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
}

.example-question {
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-style: italic;
    color: #2d3748;
    border-left: 4px solid #667eea;
    margin-bottom: 15px;
}

.example-answer {
    color: #4a5568;
    margin-bottom: 0;
}

/* Chat Interface */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.chat-header h1 {
    margin-bottom: 10px;
}

.chat-header .subtitle {
    margin-bottom: 0;
}

.clear-button {
    background: #f7fafc;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.clear-button:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.clear-button:active {
    transform: translateY(0);
}

#chat-container {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
}

#chat-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 15px 20px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 19px;
    line-height: 1.5;
}

.user-message {
    background: #667eea;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    background: white;
    color: #2d3748;
    align-self: flex-start;
    border: 2px solid #e2e8f0;
    white-space: pre-wrap;
    line-height: 1.8;
}

.typing-indicator {
    background: white;
    color: #718096;
    align-self: flex-start;
    border: 2px solid #e2e8f0;
    font-style: italic;
}

/* Suggestion Chips */
.suggestion-chips {
    margin-bottom: 20px;
}

.suggestion-chips p {
    margin-bottom: 12px;
    font-size: 18px;
}

.chip {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 20px;
    font-size: 17px;
    border-radius: 25px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background 0.2s;
    display: inline-block;
}

.chip:hover {
    background: #cbd5e0;
}

/* Input Area */
.input-area {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

#user-input {
    flex: 1;
    padding: 18px;
    font-size: 20px;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

#user-input:focus {
    outline: none;
    border-color: #667eea;
}

.input-area .primary-button {
    width: auto;
    min-width: 120px;
}

/* API Notice */
.api-notice {
    background: #fffaf0;
    border: 2px solid #f6ad55;
    padding: 20px;
    border-radius: 12px;
}

.api-notice p {
    color: #7c2d12;
    margin-bottom: 0;
    font-size: 18px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 18px;
    }

    .container {
        padding: 25px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 22px;
    }

    p, li {
        font-size: 18px;
    }

    .primary-button,
    .secondary-button {
        font-size: 20px;
        padding: 18px 30px;
    }

    .input-area {
        flex-direction: column;
    }

    .input-area .primary-button {
        width: 100%;
    }

    .chip {
        font-size: 16px;
        padding: 10px 16px;
    }

    .chat-header {
        flex-direction: column;
        gap: 15px;
    }

    .clear-button {
        width: 100%;
        padding: 16px 20px;
        font-size: 20px;
    }
}

/* Accessibility */
button:focus,
textarea:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Smooth scrolling for chat */
#chat-container {
    scroll-behavior: smooth;
}
