/* ============================================
   CINE-STORY v11 - VIDEO SUPPORT UPDATE
   ============================================ */

/* (Keep root variables and base resets the same...) */
:root {
    --green: #22C55E;
    --green-dark: #16A34A;
    --orange: #F97316;
    --orange-dark: #EA580C;
    --gold: #D4A574;
    --teal: #14B8A6;
    --red: #EF4444;
    
    --bg-dark: #0C1220;
    --bg-card: #141E30;
    --bg-surface: #1A2744;
    --bg-cream: #FAF8F5;
    
    --text: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-dark: #1C2541;
    
    --border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 24px; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.hidden { display: none !important; }

.screen {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   START SCREEN
   ============================================ */
.start-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    min-height: 100vh;
}

/* POSTER - 40% BIGGER */
.poster-side {
    background: linear-gradient(160deg, #1C2541 0%, #0C1220 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.cinema-glow {
    position: absolute;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.poster-card {
    position: relative;
    width: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 120px rgba(212, 165, 116, 0.25);
    animation: float 5s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.poster-card img {
    width: 100%;
    display: block;
}

.year-badge {
    position: absolute;
    bottom: 28px;
    right: 28px;
    background: var(--gold);
    color: var(--bg-dark);
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.6rem 1.75rem;
    border-radius: 30px;
}

/* MENU SIDE - WIDER & TIGHTER */
.menu-side {
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    padding: 1.5rem 4rem; 
}

.menu-content {
    width: 100%;
    max-width: 700px;
}

/* TITLE - ONE LINE */
.title-section {
    margin-bottom: 1.5rem;
}

.presents {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--orange);
    margin-bottom: 0.25rem;
}

.main-title {
    font-size: 4.7rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 0.95;
    letter-spacing: -2px;
}

.main-title span {
    color: var(--orange-dark);
}

.tagline {
    font-size: 1.2rem;
    color: #5A6A7A;
    margin-top: 0.5rem;
}

/* SCENE SECTION */
.scene-section {
    margin-bottom: 1.5rem;
}

.scene-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* SCENE ROW - PILLS */
.scene-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.scene-pill {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #E0E5EA;
    border-radius: 50px;
    color: #5A6A7A;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

/* SCENE DROPDOWN - MOBILE */
.scene-dropdown {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: white;
    border: 2px solid #E0E5EA;
    border-radius: 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235A6A7A' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

.scene-dropdown:focus {
    outline: none;
    border-color: var(--text-dark);
}

/* DESKTOP/MOBILE TOGGLES */
.desktop-only { display: flex; }
.mobile-only { display: none; }

.scene-pill:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.scene-pill.active {
    background: var(--text-dark);
    border-color: var(--text-dark);
    color: white;
}

/* MODE LABEL */
.mode-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

/* GAME CARDS */
.game-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.game-card {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    padding: 1.25rem 1.8rem;
    background: white;
    border: 2px solid #E8ECF0;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.game-card:hover {
    transform: translateX(10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.game-card.scramble:hover { border-color: var(--green); }
.game-card.reveal:hover { border-color: var(--orange); }

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.game-card.scramble .card-icon { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.game-card.reveal .card-icon { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }

.card-content { flex: 1; }

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.card-content p {
    font-size: 0.9rem;
    color: #6A7A8A;
    line-height: 1.4;
}

.card-arrow {
    font-size: 1.6rem;
    color: #C0C8D0;
    transition: all 0.3s;
}

.game-card:hover .card-arrow {
    color: var(--text-dark);
    transform: translateX(6px);
}

/* PDF DOWNLOAD BUTTON - COMPACT CARD STYLE */
.pdf-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    margin-top: 1.25rem;
    background: white; 
    border: 2px solid #E8ECF0;
    border-radius: var(--radius-lg);
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.pdf-icon {
    font-size: 1.1rem;
    color: var(--red); 
}

.pdf-download-btn:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.1);
}

/* COPYRIGHT FOOTER */
.copyright-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 500;
    opacity: 0.7;
}

/* ============================================
   GAME HEADER
   ============================================ */
.game-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.exit-btn {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.exit-btn:hover {
    background: var(--text);
    color: var(--bg-dark);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.mode-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.mode-tag.green { background: rgba(34, 197, 94, 0.2); color: var(--green); }
.mode-tag.orange { background: rgba(249, 115, 22, 0.2); color: var(--orange); }

.title-divider {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.level-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem 0.4rem 1rem;
    flex-shrink: 0;
}

.level-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--gold);
}

.level-toggle {
    display: flex;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 4px;
}

.lvl {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.lvl:hover {
    color: var(--text);
}

.lvl.active {
    background: var(--green);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.lvl:last-child.active {
    background: #6366F1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.header-spacer { flex: 1; }

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tool-btn {
    padding: 0.6rem 1.25rem;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-btn:hover {
    background: var(--text);
    color: var(--bg-dark);
    border-color: var(--text);
}

.tool-btn.vocab-btn {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.tool-btn.vocab-btn:hover {
    background: #0D9488;
    border-color: #0D9488;
}

.btn-text { display: inline; }

/* ============================================
   SCRAMBLE - TIMELINE
   ============================================ */
.scramble-main {
    padding: 0.75rem 1rem;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-zone { margin-bottom: 0.75rem; }

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.zone-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.zone-title span { font-size: 1.05rem; }

.zone-title small {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.check-btn {
    padding: 0.55rem 1.4rem;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.check-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.4);
}

.timeline-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.timeline-slot {
    flex: 1;
    aspect-ratio: 16/9;
    background: var(--bg-surface);
    border: 3px dashed rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.timeline-slot:hover {
    border-color: var(--gold);
    background: rgba(212, 165, 116, 0.1);
}

.slot-num {
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.12);
}

/* UPDATE: Targeting video as well */
.timeline-slot img,
.timeline-slot video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 3px);
}

.timeline-slot.filled {
    border-style: solid;
    border-color: var(--teal);
}

.timeline-slot.filled:hover { border-color: #8B5CF6; } 

.timeline-slot.correct {
    border-color: var(--green) !important;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.timeline-slot.incorrect {
    border-color: var(--red) !important;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.hint-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
}

.hint-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--gold), #C4956A);
    border: none;
    border-radius: 50px;
    color: var(--bg-dark);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.hint-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.4);
}

.pool-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pool-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.pool-header span:first-child { font-size: 1.05rem; }

.count-tag {
    margin-left: auto;
    color: var(--teal);
    font-size: 0.75rem;
    font-weight: 600;
}

.pool-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
}

.pool-card {
    flex: 1;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* UPDATE: Targeting video */
.pool-card img,
.pool-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pool-card:hover {
    transform: scale(1.03);
    border-color: var(--gold);
}

.pool-card.selected {
    border-color: var(--teal);
    box-shadow: 0 0 35px rgba(20, 184, 166, 0.5);
    transform: scale(1.03);
}

.pool-card.placed {
    opacity: 0.15;
    pointer-events: none;
    transform: scale(0.95);
}

/* ============================================
   REVEAL - CLEAN LAYOUT
   ============================================ */
.steps-bar {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.35rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.step span {
    width: 18px;
    height: 18px;
    background: var(--gold);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.6rem;
}

.reveal-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    height: calc(100vh - 160px);
    overflow: hidden;
    align-items: center;
}

.reveal-image-side {
    position: relative;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    align-self: center;
}

/* UPDATE: Targeting video element */
#reveal-video {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.frame-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.85);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
}

.reveal-panel-side {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
    padding: 0 4px;
}

.reveal-panel-side::-webkit-scrollbar { display: none; }

.panel-question {
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.panel-hint {
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 500;
    flex-shrink: 0;
}

.answer-box {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    min-height: 100px;
}

/* BIGGER TEXT */
.answer-text {
    font-size: 2.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    transition: filter 0.4s;
}

.answer-text.blurred {
    filter: blur(12px);
    user-select: none;
}

.reveal-btn {
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    margin: 0 2px;
}

.reveal-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
}

.story-btn {
    padding: 0.6rem 0.9rem;
    background: linear-gradient(135deg, var(--teal), #0D9488);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.story-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(20, 184, 166, 0.4);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding: 0.5rem 0;
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-btn:hover { background: var(--bg-surface); }

.dots { display: flex; gap: 0.4rem; }

.nav-dot {
    width: 12px;
    height: 12px;
    background: var(--bg-surface);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-dot.active {
    background: var(--orange);
    transform: scale(1.3);
}

/* ============================================
   POPUPS - BIGGER
   ============================================ */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 5rem;
    width: 90%;
    max-width: 1400px;
    text-align: center;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: none;
    border-radius: 50%;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

.popup-num {
    width: 90px;
    height: 90px;
    background: var(--gold);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

.popup-text {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.story-box { max-width: 1400px; }
.story-box h3 { color: var(--gold); font-size: 1.5rem; margin-bottom: 1.5rem; }

/* BIGGER TEXT */
.story-content { 
    font-size: 2.2rem; 
    line-height: 1.6; 
    text-align: left; 
}
.story-content .seq { color: var(--teal); font-weight: 700; }

/* VOCAB - MAXIMIZED */
.vocab-modal {
    background: #2A3A50;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    position: relative;
    overflow: hidden;
}

.vocab-modal h3 {
    text-align: center;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.vocab-modal .popup-close {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}

.vocab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-height: 55vh;
    overflow-y: auto;
}

.vocab-item {
    background: #3A4A60;
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.vocab-word {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.vocab-def {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
}

/* ============================================
   CONFETTI
   ============================================ */
#confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    width: 12px;
    height: 12px;
    animation: fall 3s ease-out forwards;
}

@keyframes fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

/* Tablet */
@media (max-width: 1200px) {
    .start-layout { grid-template-columns: 1fr; }
    .poster-side { 
        min-height: 50vh; 
        padding: 2rem;
    }
    .poster-card { width: 350px; }
    .menu-side { padding: 2rem 3rem; }
    .reveal-main { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
    html { font-size: 16px; }
    
    /* === START PAGE === */
    .start-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .poster-side {
        min-height: auto;
        padding: 2rem 1rem;
    }
    
    .cinema-glow {
        width: 400px;
        height: 400px;
    }
    
    .poster-card {
        width: 200px;
        animation: none;
    }
    
    .year-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
        bottom: 12px;
        right: 12px;
    }
    
    .menu-side {
        padding: 1.5rem 1.25rem 2rem;
    }
    
    .menu-content {
        max-width: 100%;
    }
    
    .title-section {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .presents {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
    
    .main-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }
    
    .tagline {
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }
    
    .scene-section { margin-bottom: 1.5rem; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    
    .scene-label {
        text-align: center;
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
    
    .scene-dropdown {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .mode-label { text-align: center; }
    
    .game-cards { gap: 0.75rem; }
    
    .game-card {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        border-radius: 12px;
    }
    
    .card-content h3 { font-size: 1.1rem; }
    .card-content p { font-size: 0.8rem; }
    .card-arrow { font-size: 1.25rem; }
    
    .pdf-download-btn {
        padding: 0.85rem;
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }
    
    .copyright-footer {
        margin-top: 1.25rem;
        font-size: 0.7rem;
    }
    
    .game-header {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.4rem;
        padding: 0.5rem 0.75rem;
    }
    
    .btn-text { display: none; }
    
    .exit-btn {
        order: 0;
        padding: 0.5rem 0.85rem;
        font-size: 1.1rem;
        border-width: 1px;
    }
    
    .level-control {
        order: 0;
        padding: 0.25rem 0.4rem;
        gap: 0;
        border-width: 1px;
        background: rgba(99, 102, 241, 0.1);
        border-color: rgba(99, 102, 241, 0.3);
    }
    
    .level-label { display: none; }
    .level-toggle { padding: 2px; }
    .lvl {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .header-tools {
        order: 0;
        gap: 0.4rem;
    }
    
    .tool-btn {
        padding: 0.5rem 0.85rem;
        font-size: 1.1rem;
        border-width: 1px;
    }
    
    .header-spacer { display: none; }
    
    .header-title {
        order: 1;
        flex: 1 1 100%;
        justify-content: center;
        gap: 0.4rem;
        padding: 0.5rem 0 0.25rem 0;
        border-top: 1px solid var(--border);
        margin-top: 0.25rem;
    }
    
    .mode-tag {
        font-size: 0.55rem;
        padding: 0.2rem 0.5rem;
        letter-spacing: 1px;
    }
    
    .title-divider { font-size: 0.9rem; }
    .header-title h1 { font-size: 1rem; }
    
    .scramble-main {
        padding: 0.75rem;
        height: auto;
        min-height: calc(100vh - 95px);
        overflow-y: auto;
    }
    
    .timeline-zone { margin-bottom: 1rem; }
    
    .timeline-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0;
        margin-bottom: 0.75rem;
    }
    
    .zone-title { font-size: 0.9rem; }
    .zone-title span { font-size: 1rem; }
    .zone-title small { display: none; }
    
    .check-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .timeline-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0;
    }
    
    .timeline-slot { aspect-ratio: 16/10; }
    .slot-num { font-size: 2.5rem; }
    
    .hint-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0;
        margin-top: 0.5rem;
    }
    
    .hint-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .pool-zone { margin-top: 1rem; }
    
    .pool-header {
        padding: 0;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .pool-header span:first-child { font-size: 1rem; }
    .count-tag { font-size: 0.75rem; }
    
    .pool-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0;
    }
    
    .pool-card {
        aspect-ratio: 16/10;
        border-width: 2px;
    }
    
    .steps-bar {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        padding: 0.6rem 0.75rem;
        justify-content: center;
    }
    
    .step {
        font-size: 0.65rem;
        gap: 0.3rem;
    }
    
    .step span {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }
    
    .reveal-main {
        display: flex;
        flex-direction: column;
        padding: 0.5rem;
        height: calc(100dvh - 140px); 
        min-height: 0; 
        overflow-y: auto; 
        gap: 0.5rem;
    }

    .reveal-image-side {
        width: 100%;
        aspect-ratio: 16/9;
        flex-shrink: 0;
        max-height: 35vh; 
        background: #000;
        border-radius: 12px;
    }

    .frame-badge {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .reveal-panel-side {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        flex: 1; 
        overflow-y: auto; 
    }

    .panel-question { font-size: 1rem; margin-bottom: 0.2rem; }
    .panel-hint { font-size: 0.85rem; margin-top: 0; margin-bottom: 0.2rem; }

    .answer-box {
        flex: 1; 
        min-height: 60px; 
        margin-bottom: 0.25rem;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .answer-text { font-size: 1.8rem; } /* Increased for Mobile */

    .reveal-btn {
        width: 100%;
        padding: 0.9rem;
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .story-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .nav-row {
        margin-top: 0;
        padding-bottom: 0.25rem;
        gap: 0.75rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .nav-dot {
        width: 10px;
        height: 10px;
    }
    
    /* POPUPS MOBILE */
    .popup-box {
        padding: 2rem 1.5rem;
        width: 95%;
        max-width: none;
    }
    
    .popup-num {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .popup-text { font-size: 1.5rem; }
    
    .popup-close {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .vocab-modal {
        width: 95%;
        padding: 1.5rem 1rem;
        max-height: 85vh;
    }
    
    .vocab-modal h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .vocab-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-height: 65vh;
    }
    
    .vocab-item { padding: 1rem 1.25rem; }
    
    .vocab-word { font-size: 1.4rem; } /* Increased for Mobile */
    .vocab-def { font-size: 1.1rem; } /* Increased for Mobile */
    
    .story-box { max-width: none; }
    .story-box h3 { font-size: 1.1rem; }
    .story-content { 
        font-size: 1.4rem; /* Increased for Mobile */
        line-height: 1.7; 
    }
}

/* Small phones */
@media (max-width: 400px) {
    html { font-size: 14px; }
    
    .main-title { font-size: 2.5rem; }
    
    .poster-card { width: 160px; }
    
    .scene-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .timeline-slot, .pool-card { aspect-ratio: 4/3; }
    .slot-num { font-size: 2rem; }
    
    .answer-text { font-size: 1.5rem; }
    
    .popup-text { font-size: 1.25rem; }
}