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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f4ff;
    min-height: 100vh;
    padding: 20px;
}

/* HEADER */
.header {
    text-align: center;
    padding: 20px;
    background: #e8490f;
    color: white;
    border-radius: 16px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* SCREENS */
.screen {
    max-width: 800px;
    margin: 0 auto;
}

/* SECTION TITLE */
.section-title {
    text-align: center;
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 8px;
}

.section-sub {
    text-align: center;
    color: #888;
    margin-bottom: 25px;
}

/* TOPIC GRID */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* TOPIC CARDS */
.topic-card {
    background: white;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 5px solid transparent;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.topic-card.easy {
    border-top-color: #4caf50;
}

.topic-card.medium {
    border-top-color: #ff9800;
}

.topic-card.hard {
    border-top-color: #e8490f;
}

.topic-icon {
    font-size: 3rem;
    margin: 10px 0;
}

.topic-card h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
}

.topic-card p {
    font-size: 0.85rem;
    color: #888;
}

/* BADGES */
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.easy-badge {
    background: #e8f5e9;
    color: #4caf50;
}

.medium-badge {
    background: #fff3e0;
    color: #ff9800;
}

.hard-badge {
    background: #fbe9e7;
    color: #e8490f;
}

/* GAME TOPBAR */
.game-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-back {
    background: #eee;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #ddd;
}

.topic-label {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.difficulty-label {
    margin-left: auto;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: #fff3e0;
    color: #ff9800;
}

/* PROGRESS BAR */
.progress-container {
    background: #ddd;
    border-radius: 20px;
    height: 12px;
    margin: 10px auto;
}

.progress-bar {
    background: #e8490f;
    height: 12px;
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* SCENE */
.scene {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 0 auto 20px auto;
    flex-wrap: wrap;
}

/* CHARACTER */
.character {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 220px;
}

.avatar {
    font-size: 4rem;
    margin-bottom: 5px;
}

.name {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* SPEECH BUBBLES */
.speech-bubble {
    padding: 15px 20px;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 300px;
    text-align: center;
    min-height: 80px;
}

.officer-bubble {
    background: #fff3e0;
    border: 2px solid #e8490f;
    color: #333;
}

.student-bubble {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #333;
}

/* ANSWER BOX */
.answer-box {
    background: white;
    border: 2px dashed #e8490f;
    border-radius: 16px;
    padding: 20px;
    margin: 0 auto 20px auto;
    text-align: center;
}

.answer-label {
    color: #e8490f;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.answer-text {
    font-size: 1.2rem;
    color: #222;
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 8px;
}

.hint-text {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
}

/* BUTTONS */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-start {
    background: #e8490f;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-start:hover {
    background: #c73d0a;
}

.btn-know {
    background: #4caf50;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-know:hover {
    background: #388e3c;
}

.btn-review {
    background: #ff9800;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-review:hover {
    background: #f57c00;
}

.btn-back-home {
    background: #607d8b;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-back-home:hover {
    background: #455a64;
}

/* SCORE SCREEN */
.score-card {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.score-card h2 {
    font-size: 2rem;
    color: #e8490f;
    margin-bottom: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    background: #e8490f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.score-circle span {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

#scoreMessage {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

/* REVIEW LIST */
.review-list {
    text-align: left;
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
}

.review-item {
    background: #fff3e0;
    border-left: 4px solid #e8490f;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* MOBILE */
@media (max-width: 600px) {
    .scene {
        flex-direction: column;
        align-items: center;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================
   SECTION LABELS
   ===================== */
.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 900px;
    margin: 30px auto 12px auto;
    padding: 10px 20px;
    background: white;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    color: #444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.section-label-icon {
    font-size: 1.3rem;
}

/* Divider line inside label */
.section-label::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #f0f0f0;
    margin-left: 10px;
    border-radius: 2px;
}

/* =====================
   SINGLE ROW GRID
   ===================== */
.topic-grid.single-row {
    grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
    justify-content: center;
}

/* =====================
   GUIDE CARD
   ===================== */
.guide-card {
    border-top: 4px solid #1565C0 !important;
}

.guide-badge {
    background: #e3f2fd !important;
    color: #1565C0 !important;
}

/* =====================
   FINAL / REAL TEST CARD
   ===================== */
.final-card {
    border-top: 4px solid #6A1B9A !important;
}

.final-badge {
    background: #f3e5f5 !important;
    color: #6A1B9A !important;
}

/* ============================= */
/* Small Talk Page */
/* ============================= */

.small-talk-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    text-align: center;
    padding: 28px 20px;
    border-radius: 16px;
    margin-bottom: 28px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.page-header h1 {
    margin: 10px 0;
    font-size: 28px;
}

.page-header p {
    margin: 0;
    font-size: 15px;
}

.back-btn {
    display: inline-block;
    background: white;
    color: #ea580c;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
}

.lesson-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.lesson-section h2 {
    margin-top: 0;
    text-align: center;
}

.lesson-note {
    text-align: center;
    color: #555;
    max-width: 700px;
    margin: 0 auto 20px;
}

.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}

.word-card,
.phrase-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    transition: 0.2s;
}

.word-card:hover,
.phrase-card:hover {
    transform: translateY(-3px);
    border-color: #f97316;
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.word-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.word-card h3,
.phrase-card h3 {
    margin: 8px 0;
    color: #111827;
}

.word-card p,
.phrase-card p {
    color: #4b5563;
    font-size: 14px;
}

.word-card button,
.phrase-card button,
.practice-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 8px;
}

.word-card button:hover,
.phrase-card button:hover,
.practice-btn:hover {
    background: #1d4ed8;
}

.phrase-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.practice-box {
    border: 3px solid #f97316;
}

.dialogue {
    background: #fef3c7;
    border-radius: 14px;
    padding: 18px;
    max-width: 650px;
    margin: 0 auto 18px;
}

.dialogue p {
    font-size: 16px;
    margin: 10px 0;
}

.practice-btn {
    display: block;
    margin: 0 auto;
    background: #16a34a;
}

.practice-btn:hover {
    background: #15803d;
}

/* ============================= */
/* Section Divider Style */
/* ============================= */

.section-divider {
    width: 100%;
    max-width: 800px;
    margin: 32px auto 22px;
    background: white;
    border-radius: 10px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.section-icon {
    font-size: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

.section-line {
    height: 1px;
    background: #e5e7eb;
    flex: 1;
}

/* Center the Small Talk card */
.small-talk-row {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.small-talk-card {
    width: 300px;
    min-height: 200px;
}

/* Make the Small Talk icon cleaner */
.small-talk-card .topic-icon {
    font-size: 42px;
    margin-bottom: 16px;
}

/* ============================= */
/* Small Talk & Office Words Page */
/* ============================= */

.small-talk-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.small-talk-header {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    text-align: center;
    padding: 32px 20px;
    border-radius: 18px;
    margin-bottom: 26px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.14);
}

.small-talk-header h1 {
    margin: 10px 0;
    font-size: 30px;
}

.small-talk-header p {
    margin: 0;
    font-size: 16px;
}

.back-btn {
    display: inline-block;
    background: white;
    color: #ea580c;
    padding: 9px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 12px;
}

.back-btn:hover {
    background: #fff7ed;
}

/* Top category menu */

.small-talk-menu {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.small-talk-menu a {
    background: #f8fafc;
    color: #1f2937;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: 0.2s;
}

.small-talk-menu a:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
}

/* Lesson sections */

.small-talk-section {
    background: white;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 28px;
    box-shadow: 0 7px 20px rgba(0,0,0,0.08);
    scroll-margin-top: 20px;
}

.small-talk-section h2 {
    text-align: center;
    font-size: 26px;
    margin-top: 0;
    margin-bottom: 8px;
    color: #111827;
}

.section-description {
    text-align: center;
    color: #6b7280;
    max-width: 720px;
    margin: 0 auto 24px;
    font-size: 15px;
}

/* Cards */

.small-talk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.small-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: 0.2s;
}

.small-card:hover {
    transform: translateY(-4px);
    border-color: #f97316;
    box-shadow: 0 9px 20px rgba(0,0,0,0.10);
}

.small-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.small-card h3 {
    margin: 8px 0;
    color: #111827;
    font-size: 18px;
}

.small-card p {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.4;
}

.small-card button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 9px 15px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 8px;
}

.small-card button:hover {
    background: #1d4ed8;
}

.phrase-card-large {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Important emergency cards */

.emergency-section {
    border: 3px solid #ef4444;
}

.important-card {
    background: #fff7ed;
    border-color: #fb923c;
}

.important-card h3 {
    color: #c2410c;
}

/* Smooth scrolling */

html {
    scroll-behavior: smooth;
}

/* Mobile */

@media (max-width: 600px) {
    .small-talk-page {
        padding: 14px;
    }

    .small-talk-header h1 {
        font-size: 24px;
    }

    .small-talk-section {
        padding: 18px;
    }

    .small-talk-section h2 {
        font-size: 22px;
    }

    .small-talk-menu {
        grid-template-columns: 1fr;
    }
}