* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(circle at center, #2c3e50, #141c24);
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: transparent;
}

#canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* =========================================
   OVERLAY LAYERS
========================================= */
.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 50;
}

.overlay-layer.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* =========================================
   LOADING SCREEN (STAGE LAUNCHER)
========================================= */
.loading-screen {
    background: radial-gradient(circle at center, #1e293b, #090e17);
    z-index: 100;
}

.loading-content {
    background: linear-gradient(145deg, #1f293d, #111827);
    border: 4px solid #f39c12;
    border-radius: 24px;
    padding: 28px 40px;
    text-align: center;
    max-width: 580px;
    width: 90%;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(243, 156, 18, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-mascot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 40px;
    margin-bottom: -4px;
}

.loading-mascot {
    animation: bounceCorn 1s infinite alternate ease-in-out;
}

.loading-room-tag {
    font-family: 'Fredoka One', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: #f39c12;
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid #f39c12;
    padding: 3px 12px;
    border-radius: 20px;
}

@keyframes bounceCorn {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-12px) scale(1.08); }
}

.loading-title {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 32px;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 3px 0 #d68910, 0 6px 14px rgba(0,0,0,0.8);
}

.loading-subtitle {
    font-size: 14px;
    color: #bdc3c7;
    font-weight: 700;
    line-height: 1.3;
}

.loading-mission-checklist {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

.mission-item {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #ecf0f1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-bar-container {
    width: 100%;
    height: 18px;
    background: #141822;
    border: 2px solid #f39c12;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 6px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #2ecc71);
    border-radius: 10px;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.8);
}

.loading-status {
    font-size: 13px;
    color: #f1c40f;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* =========================================
   HUD (Heads-Up Display)
========================================= */
#hud {
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 18px;
    pointer-events: none;
    z-index: 5;
}

#hud button {
    pointer-events: auto;
}

.hud-left, .hud-center {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.hud-badge {
    background: rgba(20, 24, 35, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 900;
    color: #ffeb3b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.butter-badge.clickable {
    cursor: pointer;
    border-color: rgba(255, 235, 59, 0.45);
    background: rgba(35, 28, 10, 0.85);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.butter-badge.clickable:hover {
    transform: scale(1.05);
    background: rgba(55, 42, 15, 0.95);
    border-color: #f1c40f;
    box-shadow: 0 0 14px rgba(241, 196, 15, 0.6);
}

.butter-badge.clickable:active {
    transform: scale(0.96);
}

.water-badge {
    color: #00e5ff;
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(10, 30, 45, 0.85);
}

.hose-badge {
    color: #00e5ff;
    border-color: #00e5ff;
    background: rgba(10, 40, 55, 0.9);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.6);
    animation: pulseBadge 1.2s infinite alternate;
}

.power-badge {
    color: #f1c40f;
    border-color: rgba(241, 196, 15, 0.6);
    background: rgba(45, 30, 10, 0.85);
    animation: pulseBadge 1.2s infinite alternate;
}

@keyframes pulseBadge {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.timer-badge {
    color: #2ed573;
}

/* =========================================
   350 KERNELS HEALTH BAR (IN HUD LEFT WITH LABEL ABOVE BAR)
========================================= */
.hud-kernels-bar-wrap {
    background: rgba(15, 20, 30, 0.9);
    backdrop-filter: blur(8px);
    border: 2px solid #f1c40f;
    border-radius: 14px;
    padding: 5px 14px;
    display: flex;
    flex-direction: column;
    width: 175px;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 12px rgba(241, 196, 15, 0.35);
    transition: all 0.2s ease;
}

.hud-kernels-bar-wrap.danger {
    border-color: #ff4757;
    animation: pulseDanger 0.6s infinite alternate;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.9);
}

@keyframes pulseDanger {
    from { transform: scale(1); border-color: #ff4757; }
    to { transform: scale(1.04); border-color: #ffffff; }
}

.hud-kernels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Fredoka One', sans-serif;
    font-size: 14px;
    color: #f1c40f;
    line-height: 1.1;
}

.hud-kernels-icon {
    font-size: 16px;
}

.hud-kernels-label {
    letter-spacing: 0.5px;
}

.hud-kernels-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hud-kernels-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff4757 0%, #f1c40f 50%, #2ecc71 100%);
    border-radius: 6px;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.btn-icon {
    background: rgba(20, 24, 35, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.btn-icon:hover {
    background: #f39c12;
    border-color: #f1c40f;
    transform: scale(1.1);
}

/* =========================================
   UNTANGLE STUCK ANNOUNCER (ONLY FOR UTENSILS)
========================================= */
.stuck-banner {
    position: absolute;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    pointer-events: auto;
    cursor: pointer;
    animation: slideDownBanner 0.3s ease-out;
}

.stuck-banner-content {
    background: linear-gradient(145deg, #3d1217, #1c080b);
    border: 3px solid #ff4757;
    border-radius: 18px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.7);
    position: relative;
    overflow: hidden;
}

.stuck-icon {
    font-size: 28px;
}

.stuck-text {
    display: flex;
    flex-direction: column;
}

.stuck-headline {
    color: #ff4757;
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.stuck-sub {
    color: #ecf0f1;
    font-size: 13px;
    font-weight: 800;
}

.stuck-taps-badge {
    background: #ff4757;
    color: #ffffff;
    font-family: 'Fredoka One', sans-serif;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 10px;
    font-weight: 900;
    white-space: nowrap;
    animation: pulseBadge 0.5s infinite alternate;
}

.stuck-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.6);
}

.stuck-progress-fill {
    height: 100%;
    background: #2ecc71;
    transition: width 0.08s ease;
}

@keyframes slideDownBanner {
    from { transform: translate(-50%, -30px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* =========================================
   FULL-COVER EPIC INTENSE MENU SCREEN
========================================= */
.full-cover-menu {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50 !important;
}

.intense-menu {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(ellipse at center, #2e0d08 0%, #1a0807 40%, #0d0406 75%, #050204 100%) !important;
    overflow: hidden;
    z-index: 50 !important;
}

.intense-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 69, 0, 0.12) 0%, transparent 60%);
    animation: firePulseBg 4s infinite alternate ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes firePulseBg {
    0% { transform: scale(0.95); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

.menu-fire-haze {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 69, 0, 0.15) 50%, rgba(231, 76, 60, 0.28) 100%);
    pointer-events: none;
    z-index: 1;
    animation: hazeGlow 3s infinite alternate ease-in-out;
}

@keyframes hazeGlow {
    0% { opacity: 0.5; filter: blur(4px); }
    100% { opacity: 0.95; filter: blur(8px); }
}

.menu-ambient-decor {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.menu-particle {
    position: absolute;
    font-size: 24px;
    opacity: 0.28;
    filter: blur(0.5px);
    animation: floatAmbient 7s infinite ease-in-out;
}

.mp-1 { top: 12%; left: 5%; animation-delay: 0s; font-size: 34px; filter: drop-shadow(0 0 10px #ff4500); }
.mp-2 { top: 68%; left: 8%; animation-delay: 2s; font-size: 28px; }
.mp-3 { top: 22%; right: 6%; animation-delay: 1s; font-size: 32px; filter: drop-shadow(0 0 12px #ff4757); }
.mp-4 { top: 72%; right: 10%; animation-delay: 3s; font-size: 26px; }
.mp-5 { top: 38%; left: 3%; animation-delay: 1.5s; font-size: 24px; filter: drop-shadow(0 0 10px #f1c40f); }
.mp-6 { top: 48%; right: 4%; animation-delay: 2.5s; font-size: 28px; }
.mp-7 { top: 8%; right: 28%; animation-delay: 0.8s; font-size: 26px; }
.mp-8 { top: 82%; left: 24%; animation-delay: 3.2s; font-size: 28px; }
.mp-9 { top: 18%; left: 30%; animation-delay: 1.8s; font-size: 24px; }
.mp-10 { top: 62%; right: 24%; animation-delay: 2.2s; font-size: 22px; filter: drop-shadow(0 0 8px #f1c40f); }
.mp-11 { top: 30%; left: 16%; animation-delay: 3.6s; font-size: 24px; filter: drop-shadow(0 0 8px #3498db); }
.mp-12 { top: 78%; right: 36%; animation-delay: 1.2s; font-size: 26px; }

@keyframes floatAmbient {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(18deg); }
}

.menu-full-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px 20px;
    z-index: 2;
}

.menu-top-ribbon {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ribbon-badge {
    font-family: 'Fredoka One', sans-serif;
    font-size: 13px;
    letter-spacing: 1.2px;
    color: #f39c12;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(243, 156, 18, 0.35);
    padding: 5px 16px;
    border-radius: 30px;
}

.intense-ribbon-badge {
    color: #ffdd59 !important;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.4), rgba(243, 156, 18, 0.5), rgba(231, 76, 60, 0.4)) !important;
    border: 1.5px solid #ff4757 !important;
    box-shadow: 0 0 16px rgba(255, 71, 87, 0.5) !important;
    animation: ribbonFirePulse 2s infinite alternate;
}

@keyframes ribbonFirePulse {
    0% { border-color: #ff4757; box-shadow: 0 0 10px rgba(255, 71, 87, 0.4); }
    100% { border-color: #f1c40f; box-shadow: 0 0 20px rgba(241, 196, 15, 0.7); }
}

.menu-url-badge {
    font-family: 'Fredoka One', sans-serif;
    font-size: 12px;
    color: #00e5ff;
    text-decoration: none;
    background: rgba(0, 229, 255, 0.12);
    border: 1.5px solid rgba(0, 229, 255, 0.45);
    padding: 5px 14px;
    border-radius: 30px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.menu-url-badge:hover {
    background: #00e5ff;
    color: #0d1b2a;
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.7);
}

.menu-top-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
    z-index: 100;
}

.btn-icon {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(243, 156, 18, 0.55);
    border-radius: 12px;
    color: #ffffff;
    font-size: 20px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-select: none;
}

.btn-icon:hover {
    background: #f39c12;
    border-color: #f1c40f;
    color: #000000;
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(243, 156, 18, 0.85);
}

.btn-icon:active {
    transform: scale(0.92);
}

/* 3-Column Intense Layout */
.menu-hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    flex: 1;
}

.intense-hero-section {
    display: grid !important;
    grid-template-columns: 1fr 1.25fr 1fr;
    gap: 20px;
    align-items: center;
    width: 100%;
    max-width: 1220px;
    flex: 1;
    margin: 4px 0;
}

@media (max-width: 1080px) {
    .intense-hero-section {
        grid-template-columns: 1fr 1fr;
    }
    .menu-gameplay-preview-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .intense-hero-section {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
    }
}

.menu-logo-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.intense-logo-wrap {
    text-align: center;
}

.menu-corn-hero {
    position: relative;
    font-size: 64px;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6));
    animation: heroHover 2s infinite ease-in-out;
}

.intense-corn-hero {
    position: relative;
    font-size: 64px;
    margin-bottom: 6px;
    display: inline-block;
}

.hero-fire-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 71, 87, 0.5) 0%, rgba(243, 156, 18, 0.3) 50%, transparent 75%);
    filter: blur(10px);
    z-index: -1;
    animation: auraPulse 1.5s infinite alternate;
}

@keyframes auraPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
}

@keyframes heroHover {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.hero-halo {
    position: absolute;
    top: -16px;
    right: -4px;
    font-size: 26px;
    animation: pulseBadge 1.2s infinite alternate;
}

.hero-sparks {
    position: absolute;
    top: 6px;
    left: -10px;
    font-size: 22px;
}

.epic-game-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4px 0;
}

.title-sub {
    font-family: 'Fredoka One', sans-serif;
    font-size: 12px;
    letter-spacing: 2.5px;
    color: #f39c12;
    text-transform: uppercase;
}

.title-main {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 40px;
    letter-spacing: 2px;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 4px 0 #c0392b, 0 8px 20px rgba(0,0,0,0.8);
}

.intense-game-title .title-main {
    font-size: 36px;
    text-shadow: 0 4px 0 #961e12, 0 8px 25px rgba(255, 71, 87, 0.8);
    background: linear-gradient(180deg, #ffffff 0%, #ffd8d8 70%, #ff7675 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-highlight {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 28px;
    letter-spacing: 2px;
    color: #f1c40f;
    text-shadow: 0 3px 0 #b78708, 0 6px 16px rgba(241, 196, 15, 0.4);
}

.intense-highlight {
    font-size: 24px;
    color: #f1c40f !important;
    text-shadow: 0 3px 0 #9c6800, 0 0 18px rgba(241, 196, 15, 0.8) !important;
}

.hero-quote {
    font-size: 12px;
    font-style: italic;
    color: #94a3b8;
    margin-top: 3px;
}

.hero-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    color: #e2e8f0;
}

.tag-fire { border-color: #ff4757 !important; color: #ff7675 !important; background: rgba(255, 71, 87, 0.18) !important; }
.tag-corn { border-color: #f1c40f !important; color: #f9ca24 !important; background: rgba(241, 196, 15, 0.18) !important; }
.tag-broc { border-color: #2ecc71 !important; color: #2ed573 !important; background: rgba(46, 204, 113, 0.18) !important; }
.tag-rooms { border-color: #3498db !important; color: #70a1ff !important; background: rgba(52, 152, 219, 0.18) !important; }

/* =========================================
   GAMEPLAY ACTION PREVIEW SHOWCASE CARD
========================================= */
.menu-gameplay-preview-card {
    position: relative;
    background: rgba(18, 22, 34, 0.95);
    border: 3px solid #f39c12;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(243, 156, 18, 0.45);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 440px;
}

.menu-gameplay-preview-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: #ff4757;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 71, 87, 0.75);
}

.preview-badge-live {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.85);
    border: 1.5px solid #ff4757;
    color: #ffffff;
    font-family: 'Fredoka One', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.8);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    display: inline-block;
    animation: liveBlink 1s infinite alternate;
}

@keyframes liveBlink {
    0% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 8px #ff4757; }
}

.preview-img-wrap {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.gameplay-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.menu-gameplay-preview-card:hover .gameplay-preview-img {
    transform: scale(1.06);
}

.preview-overlay-flare {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    animation: lensSweep 5s infinite ease-in-out;
}

@keyframes lensSweep {
    0%, 75% { left: -100%; }
    100% { left: 200%; }
}

.preview-hud-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.88) 100%);
    padding: 6px 10px;
    display: flex;
    justify-content: space-around;
    font-family: 'Fredoka One', sans-serif;
    font-size: 10px;
    color: #f1c40f;
    letter-spacing: 0.5px;
}

.preview-caption {
    width: 100%;
    padding: 6px 4px 2px 4px;
    text-align: center;
}

.preview-tagline {
    font-family: 'Fredoka One', sans-serif;
    font-size: 11px;
    color: #ffdd59;
    letter-spacing: 0.5px;
}

/* =========================================
   ACTION AREA
========================================= */
.menu-action-card {
    flex: 1;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-start-hero {
    width: 100%;
    height: 68px;
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
    border: 3px solid #abebc6;
    border-radius: 18px;
    color: #ffffff;
    box-shadow: 0 8px 0 #1e8449, 0 12px 25px rgba(46, 204, 113, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    position: relative;
}

.intense-start-btn {
    box-shadow: 0 8px 0 #1e8449, 0 0 25px rgba(46, 204, 113, 0.8) !important;
    animation: startBtnPulse 2s infinite alternate ease-in-out;
}

@keyframes startBtnPulse {
    0% { transform: scale(1); box-shadow: 0 8px 0 #1e8449, 0 0 18px rgba(46, 204, 113, 0.6); }
    100% { transform: scale(1.02); box-shadow: 0 10px 0 #1e8449, 0 0 32px rgba(46, 204, 113, 0.95); }
}

.btn-start-hero:hover {
    background: linear-gradient(180deg, #3cdb80 0%, #2ecc71 100%);
    transform: translateY(-3px);
}

.btn-start-hero:active {
    transform: translateY(5px);
    box-shadow: 0 3px 0 #1e8449, 0 6px 12px rgba(46, 204, 113, 0.4);
}

.btn-start-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.btn-start-text strong {
    font-family: 'Fredoka One', sans-serif;
    font-size: 23px;
    letter-spacing: 1.5px;
}

.btn-start-text small {
    font-size: 11px;
    color: #e8f8f5;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.menu-sub-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    width: 100%;
}

.menu-sub-buttons .btn {
    font-size: 12px;
    padding: 9px 8px;
    border-radius: 12px;
    gap: 6px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.menu-marquee-bar {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 5px 14px;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
}

.intense-marquee-bar {
    border-color: rgba(243, 156, 18, 0.35) !important;
    background: rgba(15, 10, 15, 0.8) !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important;
}

.menu-marquee-bar b {
    color: #f1c40f;
}

/* Dialog screens */
.dialog-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 4px solid #f39c12;
    border-radius: 24px;
    padding: 20px 24px;
    text-align: center;
    max-width: 960px;
    width: 95%;
    max-height: 88vh;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    position: relative;
    z-index: 70;
}

.dialog-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dialog-header h2 {
    font-family: 'Fredoka One', sans-serif;
    font-size: 24px;
    color: #f1c40f;
    letter-spacing: 1px;
    margin: 0;
}

.dialog-body {
    flex: 1 1 auto;
    overflow-y: auto !important;
    max-height: 60vh;
    padding: 8px 6px;
    scrollbar-width: thin;
    scrollbar-color: #f39c12 rgba(0, 0, 0, 0.5);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.dialog-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 6px;
}

/* 100 Rooms Kitchen Map Grid */
.map-floorplan, #map-floorplan {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 6px 4px !important;
}

@media (max-width: 680px) {
    .map-floorplan, #map-floorplan {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.fail-screen .dialog-box, .fail-dialog {
    border-color: #ff4757 !important;
    max-width: 580px;
    padding: 26px 32px;
    box-shadow: 0 18px 50px rgba(255, 71, 87, 0.5), 0 0 35px rgba(255, 71, 87, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2) !important;
}

.fail-icon-anim {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 4px;
    animation: bounceIn 0.5s ease-out;
}

.fail-reason {
    font-size: 15px;
    color: #ffb8b8;
    font-weight: 800;
    margin-bottom: 2px;
}

.fail-level-info {
    font-size: 13px;
    color: #f1c40f;
    font-weight: 700;
    margin-bottom: 14px;
}

.victory-screen .dialog-box, .victory-dialog {
    border-color: #2ecc71 !important;
    max-width: 680px;
    padding: 24px 30px;
    box-shadow: 0 18px 50px rgba(46, 204, 113, 0.5), 0 0 35px rgba(46, 204, 113, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2) !important;
}

.victory-icon-anim {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 2px;
    animation: bounceIn 0.6s ease-out;
}

.victory-level-info {
    font-size: 15px;
    color: #f1c40f;
    font-weight: 800;
    margin-bottom: 2px;
}

.victory-message {
    font-size: 13px;
    color: #e8f8f5;
    font-weight: 700;
    margin-bottom: 12px;
}

.victory-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin: 8px 0 16px 0;
}

@media (max-width: 600px) {
    .victory-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(46, 204, 113, 0.4);
    border-radius: 14px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.stat-label {
    font-family: 'Fredoka One', sans-serif;
    font-size: 11px;
    color: #85e89d;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.stat-val {
    font-family: 'Fredoka One', sans-serif;
    font-size: 18px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.dialog-actions .btn {
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 12px;
}

.dialog-actions .btn-large {
    font-size: 16px;
    padding: 12px 24px;
}

.game-title {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 46px;
    letter-spacing: 2px;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 4px 0 #d35400, 0 8px 16px rgba(0,0,0,0.8);
}

.highlight-title {
    color: #f1c40f;
    text-shadow: 0 4px 0 #d68910, 0 8px 16px rgba(0,0,0,0.8);
}

.tagline {
    font-size: 15px;
    color: #bdc3c7;
    margin-top: 6px;
    font-weight: 700;
}

.fail-title {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 46px;
    letter-spacing: 3px;
    color: #ff4757;
    text-shadow: 0 4px 0 #b32d3a, 0 8px 20px rgba(255, 71, 87, 0.6);
}

.victory-title {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 44px;
    letter-spacing: 2px;
    color: #2ed573;
    text-shadow: 0 4px 0 #1e824c, 0 8px 20px rgba(46, 213, 115, 0.6);
}

.section-title, .pause-title {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 32px;
    color: #f39c12;
    text-shadow: 0 3px 0 #b9770e;
}

.fail-message {
    font-size: 18px;
    font-weight: 800;
    color: #ffcccc;
    line-height: 1.4;
}

.victory-message {
    font-size: 18px;
    font-weight: 800;
    color: #d1f2eb;
}


/* Full-screen Menu & Modal Backdrop Screens */
.menu-screen {
    background: radial-gradient(ellipse at center, rgba(30, 41, 59, 0.97) 0%, rgba(13, 21, 34, 0.98) 70%, rgba(5, 10, 16, 0.99) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 60;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 65;
}

/* =========================================
   BUTTONS
========================================= */
.menu-buttons, .action-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    gap: 12px;
}

.btn {
    font-family: 'Fredoka One', 'Nunito', sans-serif;
    padding: 13px 24px;
    font-size: 18px;
    letter-spacing: 1px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 8px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    top: 0;
}

.btn:active {
    top: 4px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(180deg, #2ecc71, #27ae60);
    color: #fff;
    box-shadow: 0 6px 0 #1e8449, 0 8px 18px rgba(46, 204, 113, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #3cdb80, #2ecc71);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(180deg, #ff4757, #e74c3c);
    color: #fff;
    box-shadow: 0 6px 0 #a92828, 0 8px 18px rgba(231, 76, 60, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #ff6b81, #ff4757);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(180deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 6px 0 #1b4f72, 0 8px 18px rgba(52, 152, 219, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #5dade2, #3498db);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(180deg, #f39c12, #d68910);
    color: #fff;
    box-shadow: 0 6px 0 #935116, 0 8px 18px rgba(243, 156, 18, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(180deg, #f5b041, #f39c12);
    transform: translateY(-2px);
}

.btn-large {
    font-size: 22px;
    padding: 16px 28px;
}

.btn-small {
    font-size: 15px;
    padding: 10px 18px;
    margin-top: 6px;
}

.btn-icon-label {
    font-size: 20px;
}

.btn-modal-close {
    background: rgba(255, 71, 87, 0.2);
    border: 2px solid #ff4757;
    color: #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.btn-modal-close:hover {
    background: #ff4757;
    color: #ffffff;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 18px rgba(255, 71, 87, 0.6);
}

.btn-modal-close:active {
    transform: scale(0.95);
}

.hotkey-tip, .quick-controls-hint {
    font-size: 13px;
    color: #95a5a6;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hotkey-tip b, .quick-controls-hint b {
    color: #f1c40f;
}

/* =========================================
   KITCHEN MAP (12 ROOMS BLUEPRINT)
========================================= */
.map-modal-content {
    max-width: 840px;
    max-height: 90vh;
    padding: 14px 18px;
    background: radial-gradient(circle at center, #1b263b 0%, #0d131f 100%);
    border: 3px solid #f39c12;
    box-shadow: 0 0 35px rgba(243, 156, 18, 0.35), inset 0 0 20px rgba(0,0,0,0.6);
}

.map-header {
    width: 100%;
    margin-bottom: 6px;
}

.map-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.map-icon {
    font-size: 30px;
}

.map-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-progress-badge {
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    color: #f1c40f;
}

.map-legend {
    display: flex;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #bdc3c7;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.current { background: #f1c40f; box-shadow: 0 0 6px #f1c40f; }
.legend-dot.unlocked { background: #2ecc71; }
.legend-dot.locked { background: #7f8c8d; }

.map-floorplan-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    width: 100%;
    max-height: 330px;
    overflow-y: auto;
    padding: 4px 2px;
    margin: 6px 0;
}

@media (max-width: 950px) {
    .map-floorplan-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 650px) {
    .map-floorplan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   BROCCOLI BADGE & INFERNO BANNER
========================================= */
.broccoli-badge {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.45), rgba(46, 204, 113, 0.25));
    border: 1.5px solid #2ecc71;
    color: #a8f5bb;
    font-weight: 900;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.35);
}

.inferno-banner {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.95), rgba(243, 156, 18, 0.95), rgba(231, 76, 60, 0.95));
    background-size: 200% 100%;
    animation: infernoShift 2s infinite linear, infernoPulse 0.8s infinite alternate;
    border: 2px solid #fff;
    border-radius: 30px;
    padding: 8px 24px;
    z-index: 40;
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.85), inset 0 0 12px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.inferno-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.flame-anim {
    font-size: 20px;
    animation: flameFlicker 0.4s infinite alternate;
}

@keyframes infernoShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes infernoPulse {
    0% { transform: translateX(-50%) scale(0.98); }
    100% { transform: translateX(-50%) scale(1.03); }
}

@keyframes flameFlicker {
    0% { transform: scale(0.9) rotate(-6deg); }
    100% { transform: scale(1.15) rotate(6deg); }
}

.fog-banner {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(0, 180, 216, 0.95), rgba(72, 202, 228, 0.95), rgba(0, 180, 216, 0.95));
    background-size: 200% 100%;
    animation: infernoShift 2.5s infinite linear, fogPulse 0.9s infinite alternate;
    border: 2px solid #ffffff;
    border-radius: 30px;
    padding: 8px 24px;
    z-index: 40;
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.85), inset 0 0 12px rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.fog-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.frost-anim {
    font-size: 20px;
    animation: frostTwinkle 0.6s infinite alternate;
}

@keyframes fogPulse {
    0% { transform: translateX(-50%) scale(0.98); }
    100% { transform: translateX(-50%) scale(1.03); }
}

@keyframes frostTwinkle {
    0% { transform: scale(0.9) rotate(-10deg); opacity: 0.8; }
    100% { transform: scale(1.2) rotate(10deg); opacity: 1; }
}

/* =========================================
   CORN COLLECTIONS MODAL & CARDS
========================================= */
.btn-collections-btn {
    background: linear-gradient(180deg, #f39c12 0%, #d35400 100%) !important;
    border: 2px solid #f9e79f !important;
    color: #ffffff !important;
    box-shadow: 0 5px 0 #935116, 0 8px 18px rgba(243, 156, 18, 0.5) !important;
}

.btn-collections-btn:hover {
    background: linear-gradient(180deg, #f1c40f 0%, #e67e22 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #935116, 0 12px 24px rgba(243, 156, 18, 0.7) !important;
}

.collections-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.collections-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collections-icon {
    font-size: 32px;
}

.collections-balance-badge {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.6), rgba(46, 204, 113, 0.3));
    border: 2px solid #2ecc71;
    border-radius: 24px;
    padding: 6px 18px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    color: #e8f8f5;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
}

.collections-balance-badge strong {
    color: #2ecc71;
    font-size: 18px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 12px;
    width: 100%;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px 6px;
    scrollbar-width: thin;
    scrollbar-color: #f39c12 rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
}

.corn-card {
    background: #1e293b;
    border: 2.5px solid #334155;
    border-radius: 16px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.corn-card:hover {
    border-color: #64748b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.corn-card.equipped {
    border-color: #f1c40f;
    background: linear-gradient(145deg, #2b3945, #1e293b);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.45);
}

.corn-card.equipped::before {
    content: "EQUIPPED";
    position: absolute;
    top: 6px;
    right: 8px;
    background: #f39c12;
    color: #000;
    font-family: 'Fredoka One', sans-serif;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 900;
}

.corn-card-icon {
    font-size: 42px;
    line-height: 1;
    margin: 4px 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.corn-card-name {
    font-family: 'Fredoka One', sans-serif;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.1;
}

.corn-card-title {
    font-size: 11px;
    color: #f39c12;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.corn-card-perk {
    font-size: 11px;
    color: #cbd5e0;
    line-height: 1.35;
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 6px 8px;
    width: 100%;
    margin-top: 2px;
}

.corn-card-cost {
    font-family: 'Fredoka One', sans-serif;
    font-size: 13px;
    color: #2ecc71;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-corn-action {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
    font-family: 'Fredoka One', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.btn-corn-equip {
    background: #3498db;
    color: #fff;
    box-shadow: 0 4px 0 #217dbb;
}

.btn-corn-equip:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #217dbb;
}

.btn-corn-buy {
    background: #2ecc71;
    color: #fff;
    box-shadow: 0 4px 0 #27ae60;
}

.btn-corn-buy:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #1e8449;
}

.btn-corn-buy:disabled {
    background: #475569;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-corn-equipped {
    background: #f1c40f;
    color: #000;
    box-shadow: 0 4px 0 #d68910;
    cursor: default;
}

.collections-actions-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
}

.map-room-card {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 10px 11px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    overflow: hidden;
}

.map-room-card:hover:not(.locked) {
    border-color: #f1c40f;
    transform: translateY(-3px) scale(1.02);
    background: #273549;
    box-shadow: 0 8px 18px rgba(0,0,0,0.5), 0 0 10px rgba(241, 196, 15, 0.4);
}

.map-room-card.current {
    border-color: #f1c40f;
    background: linear-gradient(135deg, #2b3945, #1e293b);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.6);
}

.map-room-card.current::before {
    content: "🌽 CURRENT";
    position: absolute;
    top: 4px;
    right: 6px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 9px;
    background: #f39c12;
    color: #000;
    padding: 2px 5px;
    border-radius: 6px;
    font-weight: 900;
    animation: pulseBadge 1.2s infinite alternate;
}

@keyframes pulseBadge {
    0% { transform: scale(0.95); opacity: 0.85; }
    100% { transform: scale(1.05); opacity: 1; }
}

.map-room-card.locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.map-room-card.cleared {
    border-color: #2ecc71;
}

.map-room-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map-room-num {
    font-family: 'Fredoka One', sans-serif;
    font-size: 12px;
    color: #f39c12;
}

.map-room-target {
    font-size: 13px;
}

.map-room-title {
    font-size: 14px;
    font-weight: 900;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-room-stars {
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.map-room-time {
    font-size: 11px;
    color: #a0aec0;
    font-weight: 700;
}

.map-actions-bar {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.instructions-modal {
    max-width: 720px;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    text-align: left;
}

.instruction-card {
    background: #1a202c;
    border: 2px solid #2d3748;
    border-radius: 14px;
    padding: 14px;
}

.instruction-card .card-icon {
    font-size: 32px;
    margin-bottom: 6px;
}

.instruction-card h3 {
    font-size: 16px;
    color: #f1c40f;
    margin-bottom: 6px;
}

.instruction-card p {
    font-size: 12px;
    color: #cbd5e0;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* Victory stats */
.victory-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
}

.stat-value {
    color: #f1c40f;
}

.stat-stars {
    font-size: 26px;
    letter-spacing: 4px;
    margin-top: 4px;
}

/* =========================================
   ANIMATIONS
========================================= */
@keyframes smoothPopIn {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.shake-in {
    animation: smoothPopIn 0.3s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.7); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    80% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.bounce-in {
    animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* =========================================
   TOUCH CONTROLS
========================================= */
.touch-controls {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 25;
}

.touch-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    background: rgba(20, 25, 35, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    touch-action: manipulation;
}

.touch-btn:active {
    background: rgba(241, 196, 15, 0.6);
    border-color: #f1c40f;
}

.jump-btn {
    width: 110px;
    font-size: 15px;
    background: rgba(46, 204, 113, 0.5);
    border-color: #2ecc71;
}

.extinguish-btn {
    width: 110px;
    font-size: 14px;
    background: rgba(41, 128, 185, 0.6);
    border-color: #3498db;
    color: #a9e4ff;
}

.extinguish-btn:active {
    background: rgba(52, 152, 219, 0.9);
    border-color: #00d2d3;
}

@media (max-width: 850px), (pointer: coarse) {
    .touch-controls {
        display: flex;
    }
}

/* =========================================
   CORN COLLECTIONS & POWER-UPS MODAL
========================================= */
.collections-modal-content {
    max-width: 950px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1e272e 0%, #2d3436 100%);
    border: 3px solid #f1c40f;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
    overflow-y: auto;
}

.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.collections-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collections-icon {
    font-size: 32px;
}

.collections-balance-badge {
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #2ecc71;
    border-radius: 30px;
    padding: 6px 16px;
    font-size: 15px;
    font-weight: bold;
    color: #2ecc71;
    display: flex;
    align-items: center;
    gap: 6px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding: 8px 4px 16px;
    overflow-y: auto;
}

.corn-card {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.corn-card:hover {
    transform: translateY(-4px);
    border-color: #f1c40f;
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.2);
}

.corn-card.equipped {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.12);
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.4);
}

.corn-card.locked {
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.3);
}

.corn-card-icon {
    font-size: 42px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.corn-card-name {
    font-family: 'Fredoka One', cursive, sans-serif;
    font-size: 18px;
    color: #ffeaa7;
    margin-bottom: 2px;
}

.corn-card-title {
    font-size: 12px;
    color: #74b9ff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.corn-card-perk {
    font-size: 13px;
    color: #dfe6e9;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
    line-height: 1.4;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corn-card-actions {
    width: 100%;
    margin-top: auto;
}

.corn-card-actions .btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
}

.collections-actions-bar {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    padding-top: 16px;
    margin-top: 12px;
    gap: 12px;
}

/* Inferno banner */
.inferno-banner {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #c0392b, #e74c3c, #f39c12, #c0392b);
    background-size: 300% 100%;
    animation: flamePulse 1.5s infinite linear;
    color: #ffffff;
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    padding: 8px 24px;
    border-radius: 20px;
    border: 2px solid #f1c40f;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
    z-index: 100;
    pointer-events: none;
    letter-spacing: 1px;
}

/* Greenhouse Solar Heat Banner */
.greenhouse-banner {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #d35400, #e67e22, #f39c12, #d35400);
    background-size: 300% 100%;
    animation: solarGlow 2s infinite linear;
    color: #ffffff;
    font-family: 'Fredoka One', sans-serif;
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid #f9ca24;
    box-shadow: 0 0 24px rgba(243, 156, 18, 0.85);
    z-index: 100;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.greenhouse-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    letter-spacing: 1px;
}

.greenhouse-timer-badge {
    background: #ffffff;
    color: #c0392b;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 15px;
    border: 2px solid #e74c3c;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.greenhouse-heat-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.greenhouse-heat-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 6px;
    transition: width 0.1s linear;
}

@keyframes solarGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes flamePulse {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.broccoli-badge {
    background: rgba(46, 204, 113, 0.25);
    border: 2px solid #2ecc71;
    color: #2ecc71;
}

/* =========================================
   ACHIEVEMENTS SYSTEM (50 ACHIEVEMENTS & TOASTS)
========================================= */
.btn-achievements-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border-color: #f1c40f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.45) !important;
}

.btn-achievements-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.65) !important;
}

.achievements-modal-content {
    max-width: 880px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 20px 26px;
    border-radius: 24px;
    position: relative;
    z-index: 70;
    border: 2px solid rgba(241, 196, 15, 0.4);
    background: rgba(18, 22, 34, 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(241, 196, 15, 0.2);
}

.achievements-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.achievements-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievements-icon {
    font-size: 32px;
}

.achievements-progress-container {
    flex: 1;
    min-width: 240px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievements-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Fredoka One', sans-serif;
    font-size: 13px;
    color: #f1c40f;
    margin-bottom: 5px;
}

.achievements-count-badge {
    background: rgba(241, 196, 15, 0.2);
    padding: 2px 8px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
}

.achievements-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.achievements-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #f1c40f, #2ecc71);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.achievements-filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #bdc3c7;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.filter-pill.active {
    background: #f39c12;
    border-color: #f1c40f;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.achievements-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding-right: 6px;
    margin-bottom: 14px;
    max-height: 480px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.achievement-card.unlocked {
    background: rgba(46, 204, 113, 0.08);
    border-color: rgba(46, 204, 113, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.achievement-card.unlocked:hover {
    transform: translateY(-2px);
    border-color: #2ecc71;
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.25);
}

.achievement-card.locked {
    opacity: 0.65;
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.05);
}

.ach-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.achievement-card.unlocked .ach-icon-circle {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.15);
}

.ach-info-col {
    flex: 1;
    min-width: 0;
}

.ach-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}

.ach-title {
    font-family: 'Fredoka One', sans-serif;
    font-size: 14px;
    color: #f1c40f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.achievement-card.unlocked .ach-title {
    color: #2ecc71;
}

.ach-status-badge {
    font-family: 'Fredoka One', sans-serif;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.badge-done {
    background: #2ecc71;
    color: #ffffff;
}

.badge-locked {
    background: rgba(255, 255, 255, 0.1);
    color: #95a5a6;
}

.ach-desc {
    font-size: 12px;
    color: #ecf0f1;
    line-height: 1.25;
    margin: 0 0 4px 0;
}

.ach-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
}

.ach-category-tag {
    color: #74b9ff;
    letter-spacing: 0.5px;
}

.ach-reward-tag {
    color: #2ed573;
    background: rgba(46, 204, 113, 0.15);
    padding: 1px 5px;
    border-radius: 4px;
}

.achievements-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =========================================
   SECRET PASSCODE SCREEN & BUTTON
========================================= */
.btn-top-left-code {
    background: rgba(243, 156, 18, 0.25) !important;
    border: 2px solid #f1c40f !important;
    font-size: 20px !important;
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.4) !important;
    animation: codeKeyGlow 2.5s infinite alternate ease-in-out;
}

@keyframes codeKeyGlow {
    0% { transform: scale(1); box-shadow: 0 0 8px rgba(241, 196, 15, 0.3); }
    100% { transform: scale(1.08); box-shadow: 0 0 18px rgba(241, 196, 15, 0.8); }
}

.secret-code-dialog {
    max-width: 520px;
    padding: 30px 36px;
    text-align: center;
    border-color: #f1c40f !important;
    box-shadow: 0 0 40px rgba(241, 196, 15, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.2) !important;
}

.secret-code-prompt {
    font-family: 'Fredoka One', sans-serif;
    font-size: 22px;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 18px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.secret-code-input-wrap {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.secret-code-input {
    flex: 1;
    background: #0f172a;
    border: 3px solid #334155;
    border-radius: 14px;
    padding: 12px 16px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: #f1c40f;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7);
}

.secret-code-input:focus {
    border-color: #f1c40f;
    box-shadow: 0 0 16px rgba(241, 196, 15, 0.6), inset 0 2px 6px rgba(0, 0, 0, 0.7);
}

.btn-submit-code {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 14px;
    flex-shrink: 0;
}

.secret-code-feedback {
    min-height: 28px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 16px;
    margin-top: 14px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.secret-code-feedback.success {
    color: #2ecc71;
    text-shadow: 0 0 12px rgba(46, 204, 113, 0.8);
    animation: bounceIn 0.3s ease-out;
}

.secret-code-feedback.error {
    color: #ff4757;
    text-shadow: 0 0 12px rgba(255, 71, 87, 0.8);
    animation: shake 0.3s ease-in-out;
}

/* =========================================
   ACHIEVEMENT UNLOCK POPUP TOAST
========================================= */
.achievement-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 9999;
    background: linear-gradient(135deg, #1e272e 0%, #2f3542 100%);
    border: 2px solid #f1c40f;
    border-radius: 16px;
    padding: 10px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(241, 196, 15, 0.6);
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 420px;
    width: 90%;
}

.achievement-toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon-wrap {
    position: relative;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-trophy {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 14px;
}

.toast-text-wrap {
    flex: 1;
    min-width: 0;
}

.toast-sub {
    font-family: 'Fredoka One', sans-serif;
    font-size: 10px;
    color: #f1c40f;
    letter-spacing: 1px;
}

.toast-title {
    display: block;
    font-family: 'Fredoka One', sans-serif;
    font-size: 15px;
    color: #ffffff;
    line-height: 1.2;
}

.toast-desc {
    font-size: 11px;
    color: #bdc3c7;
    margin: 2px 0 0 0;
    line-height: 1.2;
}

.toast-reward {
    font-family: 'Fredoka One', sans-serif;
    font-size: 13px;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.2);
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid #2ecc71;
    white-space: nowrap;
}

