/* ========================================================
   CHEF'S RUSH: KITCHEN FRENZY - GAMEPLAY SCREEN STYLES
   Customer counter, appliances, assembly plates, ingredient bins.
======================================================== */

.gameplay-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background: radial-gradient(circle at 50% 30%, #2A334A 0%, #151924 100%);
    overflow: hidden;
}

/* ========================================================
   TOP: HUD BAR
======================================================== */
.game-hud {
    width: 100%;
    height: 56px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 22, 33, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 20;
}

.hud-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hud-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.hud-badge.coins {
    color: var(--color-gold);
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.15);
}

.hud-badge.score {
    color: #FFF;
}

.hud-badge.timer {
    color: var(--color-mint);
}

.hud-badge.timer.urgent {
    color: var(--color-crimson);
    animation: pulseUrgent 0.6s infinite alternate;
}

@keyframes pulseUrgent {
    from { transform: scale(1); box-shadow: 0 0 4px var(--color-crimson-glow); }
    to { transform: scale(1.08); box-shadow: 0 0 16px var(--color-crimson-glow); }
}

/* Combo Banner */
.combo-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FF5E36, #FF9F1C);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 900;
    color: #FFF;
    text-transform: uppercase;
    box-shadow: 0 0 16px var(--color-primary-glow);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.combo-badge.frenzy {
    background: linear-gradient(135deg, #FF0055, #9D4EDD);
    animation: frenzyGlow 0.4s infinite alternate;
}

@keyframes frenzyGlow {
    from { transform: scale(1); }
    to { transform: scale(1.12); box-shadow: 0 0 20px rgba(255, 0, 85, 0.8); }
}

/* ========================================================
   CUSTOMER COUNTER (TOP AREA)
======================================================== */
.customer-counter {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 24px;
    position: relative;
    border-bottom: 4px solid #38425C;
    background: linear-gradient(180deg, rgba(30, 36, 52, 0.4) 0%, rgba(20, 24, 36, 0.9) 100%);
}

.counter-seat {
    position: relative;
    width: 140px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.customer-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounceIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    0% { transform: translateY(40px) scale(0.6); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ========================================================
   ILLUSTRATED CUSTOMER CHARACTERS (STUDIO QUALITY)
======================================================== */
.customer-avatar-figure {
    width: 86px;
    height: 94px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    animation: idleCustomerBob 2.6s ease-in-out infinite alternate;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    user-select: none;
}

.customer-avatar-figure:hover {
    transform: scale(1.06) translateY(-2px);
}

.customer-character-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.customer-card.happy .customer-avatar-figure {
    animation: happyCustomerBounce 0.42s 3 alternate cubic-bezier(0.34, 1.56, 0.64, 1);
}

.customer-card.angry .customer-avatar-figure {
    animation: angryCustomerShake 0.1s 6 alternate ease-in-out;
}

.customer-card.urgent .customer-avatar-figure {
    animation: urgentCustomerJitter 0.25s infinite alternate ease-in-out;
}

.counter-seat.has-thief .customer-avatar-figure {
    animation: thiefSneakSway 0.35s infinite alternate ease-in-out;
}

@keyframes idleCustomerBob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

@keyframes happyCustomerBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-16px) scale(1.08); filter: drop-shadow(0 0 14px rgba(46, 196, 182, 0.7)); }
}

@keyframes angryCustomerShake {
    0% { transform: translateX(-5px) rotate(-2deg); }
    100% { transform: translateX(5px) rotate(2deg); filter: drop-shadow(0 0 14px rgba(230, 57, 70, 0.7)); }
}

@keyframes urgentCustomerJitter {
    0% { transform: translateX(-1px) translateY(0); }
    100% { transform: translateX(1px) translateY(-1px); }
}

@keyframes thiefSneakSway {
    0% { transform: translateX(-3px) rotate(-1.5deg); }
    100% { transform: translateX(3px) rotate(1.5deg); }
}

/* Character Nameplate Tag */
.customer-nametag {
    position: absolute;
    bottom: -2px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #FFF;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    letter-spacing: 0.4px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 2;
}

.customer-nametag.thief-tag {
    background: #DC2626;
    border-color: #F87171;
    color: #FFF;
    font-weight: 900;
    animation: pulseThiefTag 0.4s infinite alternate;
}

@keyframes pulseThiefTag {
    from { transform: scale(1); }
    to { transform: scale(1.08); box-shadow: 0 0 10px rgba(220, 38, 38, 0.8); }
}

/* Order Speech Bubble with Patience Ring */
.order-bubble {
    position: absolute;
    bottom: 96px;
    background: #FFF;
    color: var(--color-text-dark);
    padding: 5px 10px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-weight: 800;
    font-size: 11px;
    white-space: nowrap;
    animation: popBubble 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.order-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #FFF;
}

@keyframes popBubble {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.patience-bar-container {
    width: 100%;
    height: 5px;
    background: #E2E8F0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 4px;
}

.patience-bar-fill {
    height: 100%;
    background: var(--color-mint);
    transition: width 0.1s linear, background-color 0.3s ease;
}

.patience-bar-fill.medium {
    background: var(--color-gold);
}

.patience-bar-fill.urgent {
    background: var(--color-crimson);
    animation: blinkUrgent 0.4s infinite alternate;
}

@keyframes blinkUrgent {
    from { opacity: 1; }
    to { opacity: 0.4; }
}

/* ========================================================
   MIDDLE: KITCHEN WORKSTATIONS
======================================================== */
.kitchen-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 12px 20px;
    background: #181E2C;
}

/* Station Row */
.stations-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Appliance Bay (Grill / Fryer / Dispenser) */
.station-bay {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.station-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.station-slots-container {
    display: flex;
    gap: 10px;
}

/* Individual Appliance Slot */
/* Individual Appliance Slot */
.appliance-slot {
    width: 96px;
    height: 80px;
    background: #1E2538;
    border: 2px solid #3B4663;
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.appliance-slot:hover {
    transform: scale(1.04);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Authentic Appliance Station Textures */
.appliance-slot.grill {
    background-color: #171B26;
    background-image: repeating-linear-gradient(
        0deg,
        #151922 0px,
        #151922 10px,
        #2A3245 10px,
        #2A3245 14px
    );
    border: 2px solid #3B4663;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.65);
}

.appliance-slot.fryer {
    background: radial-gradient(circle at 50% 60%, #2A2414 0%, #171B26 100%);
    border: 2px solid #4D3F20;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.65);
}

.appliance-slot.dispenser {
    background: linear-gradient(180deg, #1B2834 0%, #151D26 100%);
    border: 2px solid #28444E;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.65);
}

/* Slot Content & Food SVG Dimensions */
.slot-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.food-svg {
    display: block;
    width: 64px;
    height: 44px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.appliance-slot.grill .food-svg {
    width: 66px;
    height: 45px;
}

.appliance-slot.fryer .food-svg {
    width: 52px;
    height: 52px;
}

.appliance-slot.dispenser .food-svg {
    width: 46px;
    height: 54px;
}

/* Floating Status Chip on Slot */
.slot-status-chip {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3px;
    display: none;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
}

.slot-status-chip.cooking {
    display: inline-flex;
    background: linear-gradient(135deg, #EA580C, #F97316);
    color: #FFF;
    border: 1px solid #FDBA74;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
    animation: chipPulse 0.8s infinite alternate ease-in-out;
}

.slot-status-chip.ready {
    display: inline-flex;
    background: linear-gradient(135deg, #059669, #10B981);
    color: #FFF;
    border: 1px solid #A7F3D0;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
    animation: chipReadyBounce 0.4s infinite alternate cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slot-status-chip.warning {
    display: inline-flex;
    background: linear-gradient(135deg, #DC2626, #EF4444);
    color: #FFF;
    border: 1px solid #FECACA;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
    animation: chipWarningBlink 0.22s infinite alternate ease-in-out;
}

.slot-status-chip.burnt {
    display: inline-flex;
    background: #18181B;
    color: #F87171;
    border: 1px solid #991B1B;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

@keyframes chipPulse {
    from { transform: translateX(-50%) scale(0.96); }
    to { transform: translateX(-50%) scale(1.04); }
}

@keyframes chipReadyBounce {
    from { transform: translateX(-50%) translateY(0); }
    to { transform: translateX(-50%) translateY(-3px); }
}

@keyframes chipWarningBlink {
    from { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

/* Cooking States */
.appliance-slot.cooking {
    border-color: var(--color-gold);
    box-shadow: inset 0 0 16px rgba(255, 209, 102, 0.35);
}

.appliance-slot.cooked {
    border-color: #10B981 !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.75), inset 0 0 14px rgba(16, 185, 129, 0.3) !important;
    animation: cookedBounce 0.4s infinite alternate ease-in-out;
}

@keyframes cookedBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.appliance-slot.warning-burn {
    border-color: #EF4444 !important;
    animation: burnWarningAlarm 0.22s infinite alternate !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.85) !important;
}

@keyframes burnWarningAlarm {
    from { background-color: #252D40; }
    to { background-color: #4C1D24; }
}

.appliance-slot.burnt {
    border-color: var(--color-crimson);
    background: #201315 !important;
    box-shadow: 0 0 18px var(--color-crimson-glow);
    animation: burntAlarm 0.2s infinite alternate;
}

@keyframes burntAlarm {
    from { background-color: #201315; }
    to { background-color: #3F151B; }
}

/* High-Visibility Progress Bar */
.slot-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 8;
    overflow: hidden;
}

.slot-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FF5E36, #FFD166);
    box-shadow: 0 0 8px rgba(255, 209, 102, 0.7);
    transition: width 0.15s linear;
}

.appliance-slot.cooked .slot-progress-fill {
    background: linear-gradient(90deg, #10B981, #34D399);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

.slot-progress-fill.burnt-warning {
    background: linear-gradient(90deg, #FF7A00 0%, #EF4444 65%, #DC2626 100%) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.85);
}

.appliance-slot.warning-burn .slot-progress-fill.burnt-warning {
    background: linear-gradient(90deg, #EF4444, #B91C1C) !important;
    animation: burntBarFlash 0.3s infinite alternate;
}

@keyframes burntBarFlash {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* Plating / Assembly Tray */
.assembly-tray {
    width: 110px;
    height: 82px;
    background: #2A3349;
    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.2s ease;
}

.assembly-tray:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.5);
}

.assembly-tray.has-dish {
    border-style: solid;
    border-color: var(--color-mint);
    background: rgba(46, 196, 182, 0.15);
}

/* Active Selected Assembly Tray */
.assembly-tray.selected {
    border-color: #FFD166 !important;
    border-style: solid !important;
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.65), inset 0 0 10px rgba(255, 209, 102, 0.25) !important;
    transform: scale(1.05);
}

.assembly-tray.selected::before {
    content: 'ĐANG CHỌN';
    position: absolute;
    top: -8px;
    right: -2px;
    background: #FFD166;
    color: #4A3300;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
    pointer-events: none;
    z-index: 10;
}


.dish-badge {
    position: absolute;
    bottom: -6px;
    background: var(--color-mint);
    color: #033E39;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    max-width: 94px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

/* Assembled Dish Layers */
.assembled-dish-container {
    position: relative;
    width: 60px;
    height: 48px;
}

.dish-layer {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-bun-bottom { top: 6px; }
.layer-patty { top: 0px; }
.layer-cheese { top: -2px; }
.layer-lettuce { top: -4px; }
.layer-tomato { top: -6px; }
.layer-bun-top { top: -10px; }

/* Trash Bin */
.trash-station {
    width: 72px;
    height: 76px;
    background: rgba(230, 57, 70, 0.15);
    border: 2px dashed rgba(230, 57, 70, 0.4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
}

.trash-station:hover {
    transform: scale(1.05);
    background: rgba(230, 57, 70, 0.3);
}

/* ========================================================
   BOTTOM: INGREDIENTS DISPENSER BAR
======================================================== */
.ingredients-bar {
    width: 100%;
    height: 82px;
    padding: 8px 16px;
    background: #141824;
    border-top: 2px solid #2B354C;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.ingredient-bin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 64px;
    background: #202738;
    border: 2px solid #384562;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.15s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ingredient-bin:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--color-primary);
}

.ingredient-bin:active {
    transform: translateY(2px) scale(0.96);
}

.ingredient-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* ========================================================
   ACTIVE COOKING FX ANIMATIONS (GRILL, FRYER, DISPENSER)
======================================================== */
.cooking-fx-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* 1. Grill Sizzle & Steam FX */
.appliance-slot.grill.cooking {
    background-image: repeating-linear-gradient(
        0deg,
        #1E1210 0px,
        #1E1210 10px,
        #FF5722 10px,
        #FF5722 14px
    ) !important;
    border-color: #FF7B00 !important;
    box-shadow: inset 0 0 18px rgba(255, 87, 34, 0.55), 0 0 18px rgba(255, 123, 0, 0.55) !important;
}

.appliance-slot.grill.cooking .slot-content {
    animation: grillSizzleJitter 0.12s infinite alternate ease-in-out;
}

@keyframes grillSizzleJitter {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-0.8px, 0.8px) rotate(-0.5deg); }
    66% { transform: translate(0.8px, -0.6px) rotate(0.4deg); }
    100% { transform: translate(-0.4px, -0.4px) rotate(0deg); }
}

.fx-sizzle-heat {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 87, 34, 0.5) 100%);
    animation: heatPulse 0.4s infinite alternate ease-in-out;
}

@keyframes heatPulse {
    from { opacity: 0.4; }
    to { opacity: 0.9; }
}

.fx-steam-cloud {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    animation: risingSteam 0.9s infinite ease-out;
}

.fx-steam-cloud.s1 { width: 18px; height: 18px; left: 20%; bottom: 10px; animation-delay: 0s; }
.fx-steam-cloud.s2 { width: 22px; height: 22px; left: 48%; bottom: 14px; animation-delay: 0.3s; }
.fx-steam-cloud.s3 { width: 16px; height: 16px; left: 70%; bottom: 8px; animation-delay: 0.6s; }

@keyframes risingSteam {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    40% { opacity: 0.85; }
    100% { transform: translateY(-38px) scale(1.6); opacity: 0; }
}

/* 2. Fryer Boiling & Bubble FX */
.appliance-slot.fryer.cooking {
    border-color: #FFD166;
    background: radial-gradient(circle at 50% 80%, #3D3212 0%, #252D40 100%);
    box-shadow: inset 0 -12px 18px rgba(255, 209, 102, 0.5), 0 0 16px rgba(255, 209, 102, 0.35);
}

.appliance-slot.fryer.cooking .slot-content {
    animation: fryerBobbing 0.28s infinite alternate ease-in-out;
}

@keyframes fryerBobbing {
    0% { transform: translateY(0) scale(0.98); }
    100% { transform: translateY(-3px) scale(1.02); }
}

.fx-oil-shimmer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 209, 102, 0.4) 100%);
    animation: shimmerOil 0.5s infinite alternate ease-in-out;
}

@keyframes shimmerOil {
    from { opacity: 0.3; }
    to { opacity: 0.8; }
}

.fx-oil-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFF 0%, rgba(255, 209, 102, 0.9) 60%, rgba(255, 159, 28, 0.3) 100%);
    box-shadow: 0 0 4px rgba(255, 209, 102, 0.6);
    opacity: 0;
    animation: boilPop 0.8s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fx-oil-bubble.b1 { width: 9px; height: 9px; left: 18%; bottom: 12px; animation-delay: 0.1s; }
.fx-oil-bubble.b2 { width: 13px; height: 13px; left: 38%; bottom: 8px; animation-delay: 0.45s; }
.fx-oil-bubble.b3 { width: 8px; height: 8px; left: 62%; bottom: 14px; animation-delay: 0.25s; }
.fx-oil-bubble.b4 { width: 11px; height: 11px; left: 78%; bottom: 10px; animation-delay: 0.6s; }

@keyframes boilPop {
    0% { transform: translateY(0) scale(0.4); opacity: 0; }
    40% { opacity: 1; transform: translateY(-16px) scale(1.1); }
    85% { opacity: 0.9; transform: translateY(-28px) scale(1.3); }
    100% { transform: translateY(-34px) scale(1.5); opacity: 0; }
}

/* 3. Drink Dispenser Pouring Liquid Stream FX */
.appliance-slot.dispenser.cooking {
    border-color: #2EC4B6;
    background: radial-gradient(circle at 50% 80%, #0F2D33 0%, #252D40 100%);
    box-shadow: inset 0 0 18px rgba(46, 196, 182, 0.4), 0 0 16px rgba(46, 196, 182, 0.35);
}

.fx-dispenser-spout {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 6px;
    background: #64748B;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.fx-liquid-stream {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 38px;
    background: linear-gradient(180deg, #E71D36 0%, #FF5E36 60%, #FF9F1C 100%);
    border-radius: 3px;
    animation: flowStream 0.2s infinite alternate ease-in-out;
    box-shadow: 0 0 8px rgba(231, 29, 54, 0.6);
}

@keyframes flowStream {
    0% { transform: translateX(-50%) scaleX(0.85); opacity: 0.85; }
    100% { transform: translateX(-50%) scaleX(1.15); opacity: 1; }
}

.fx-liquid-splash {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 209, 102, 0.8);
    box-shadow: 0 0 10px rgba(255, 159, 28, 0.9);
    animation: splashFoam 0.25s infinite alternate;
}

@keyframes splashFoam {
    0% { transform: translateX(-50%) scale(0.8); opacity: 0.6; }
    100% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

/* Mini Status Tags */
.cooking-status-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 11px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: tagPulse 0.5s infinite alternate ease-in-out;
}

@keyframes tagPulse {
    from { transform: scale(0.9); }
    to { transform: scale(1.1); }
}

/* ========================================================
   4. DISHWASHING SINK STATION
======================================================== */
.station-sink-bay {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sink-station {
    width: 90px;
    height: 84px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #1E293B, #0F172A);
    border: 2px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.sink-station:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: #38BDF8;
    box-shadow: 0 6px 14px rgba(56, 189, 248, 0.35);
}

.sink-station:active {
    transform: scale(0.95);
}

.sink-station.needs-wash {
    border-color: #F59E0B;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
    animation: sinkPulseNeed 1.2s infinite alternate ease-in-out;
}

@keyframes sinkPulseNeed {
    from { border-color: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
    to { border-color: #EF4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

.sink-station.washing {
    border-color: #38BDF8;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
    background: radial-gradient(circle at 50% 50%, #0369A1 0%, #0F172A 100%);
}

.sink-icon-container {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sink-icon-container .icon-svg {
    width: 42px;
    height: 42px;
}

.sink-badge-row {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

.sink-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
}

.sink-badge.clean {
    background: rgba(46, 196, 182, 0.25);
    color: #4EE2D5;
    border: 1px solid rgba(46, 196, 182, 0.4);
}

.sink-badge.dirty {
    background: rgba(239, 68, 68, 0.25);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.sink-progress-bar {
    width: 90%;
    height: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
    display: none;
}

.sink-station.washing .sink-progress-bar {
    display: block;
}

.sink-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38BDF8, #818CF8);
    transition: width 0.1s linear;
}

/* 5. BROKEN APPLIANCE OVERLAY */
.appliance-slot.broken {
    border-color: #EF4444 !important;
    background: radial-gradient(circle at 50% 50%, #450A0A 0%, #1E1B1B 100%) !important;
    box-shadow: inset 0 0 16px rgba(239, 68, 68, 0.6), 0 0 14px rgba(239, 68, 68, 0.5) !important;
    animation: brokenSlotWarning 0.6s infinite alternate ease-in-out;
    cursor: pointer;
}

@keyframes brokenSlotWarning {
    0% { border-color: #EF4444; }
    100% { border-color: #F59E0B; }
}

.broken-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.broken-overlay .wrench-svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8));
    animation: wrenchBob 0.6s infinite alternate ease-in-out;
}

@keyframes wrenchBob {
    0% { transform: translateY(-3px) rotate(-15deg); }
    100% { transform: translateY(3px) rotate(15deg); }
}

.repair-taps-badge {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 900;
    color: #FFF;
    background: #DC2626;
    padding: 1px 6px;
    border-radius: 8px;
    border: 1px solid #FECACA;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 6. DINE-AND-DASH THIEF CUSTOMER ALERT */
.counter-seat.has-thief {
    position: relative;
    border-color: #EF4444 !important;
    animation: thiefSeatPulse 0.4s infinite alternate ease-in-out;
    cursor: pointer !important;
}

@keyframes thiefSeatPulse {
    0% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }
    100% { box-shadow: 0 0 24px rgba(239, 68, 68, 0.95); }
}

.thief-escape-bubble {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #DC2626;
    color: #FFF;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 12px;
    border: 2px solid #FEF08A;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    z-index: 10;
    animation: thiefBounce 0.4s infinite alternate;
}

@keyframes thiefBounce {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-6px); }
}

.thief-timer-bar {
    position: absolute;
    bottom: -6px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    overflow: hidden;
}

.thief-timer-fill {
    height: 100%;
    width: 100%;
    background: #EAB308;
    transition: width 0.1s linear;
}

/* 7. MULTI-DISH COMBO ORDER BUBBLE */
.order-bubble.multi {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
}

.order-subitem {
    display: flex;
    align-items: center;
    gap: 3px;
    position: relative;
}

.order-subitem.delivered {
    opacity: 0.35;
    filter: grayscale(0.8);
}

.order-subitem.delivered::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    background: #2EC4B6;
    color: #FFF;
    font-size: 9px;
    font-weight: 900;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 8. SCRAMBLED INGREDIENT BAR ANIMATION */
.ingredient-bin.shuffling {
    animation: binShuffle 0.5s ease-in-out;
}

@keyframes binShuffle {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    40% { transform: scale(0.85) rotate(-8deg); opacity: 0.5; }
    70% { transform: scale(1.08) rotate(6deg); opacity: 0.9; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Assembly Empty Plate Indicator */
.assembly-tray.no-plate {
    border-style: dashed;
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

.clean-plate-shadow {
    position: absolute;
    bottom: 6px;
    width: 48px;
    height: 34px;
    pointer-events: none;
    opacity: 0.9;
}

/* ========================================================
   MOBILE OPTIMIZATIONS (LANDSCAPE & PORTRAIT SCREENS)
======================================================== */

/* 1. Mobile Landscape (Cực kỳ phổ biến khi chơi game: màn hình thấp < 520px) */
@media (max-height: 520px) {
    .game-hud {
        height: 42px;
        padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
    }

    .hud-badge {
        padding: 3px 8px;
        font-size: 12px;
        gap: 5px;
    }

    .hud-group {
        gap: 8px;
    }

    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .icon-svg {
        width: 16px;
        height: 16px;
    }

    .customer-counter {
        height: 84px;
        padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    }

    .counter-seat {
        width: 100px;
    }

    .customer-avatar {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .order-bubble {
        bottom: 44px;
        padding: 2px 6px;
        font-size: 9.5px;
        gap: 2px;
    }

    .kitchen-area {
        padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
        gap: 4px;
    }

    .station-title {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .station-slots-container {
        gap: 6px;
    }

    .appliance-slot {
        width: 72px;
        height: 56px;
        border-radius: var(--radius-sm);
    }

    .food-svg {
        width: 44px;
        height: 32px;
    }

    .appliance-slot.grill .food-svg { width: 48px; height: 32px; }
    .appliance-slot.fryer .food-svg { width: 38px; height: 38px; }
    .appliance-slot.dispenser .food-svg { width: 34px; height: 40px; }

    .assembly-tray {
        width: 82px;
        height: 58px;
    }

    .assembled-dish-container {
        width: 48px;
        height: 38px;
    }

    .dish-badge {
        font-size: 8px;
        padding: 1px 5px;
        bottom: -4px;
        max-width: 76px;
    }

    .trash-station {
        width: 52px;
        height: 54px;
    }

    .sink-station {
        width: 72px;
        height: 54px;
    }

    .ingredients-bar {
        height: 58px;
        padding: 4px max(8px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        gap: 8px;
    }

    .ingredient-bin {
        width: 54px;
        height: 48px;
        border-radius: var(--radius-sm);
    }

    .ingredient-label {
        font-size: 8px;
        margin-top: 1px;
    }
}

/* 2. Mobile Portrait (Màn hình dọc điện thoại < 640px) */
@media (max-width: 640px) {
    .game-hud {
        height: 48px;
        padding: 4px 8px;
    }

    .hud-group {
        gap: 6px;
    }

    .hud-badge {
        padding: 3px 8px;
        font-size: 12px;
    }

    .btn-icon {
        width: 34px;
        height: 34px;
    }

    .customer-counter {
        height: 104px;
        padding: 0 6px;
        justify-content: space-around;
    }

    .counter-seat {
        width: 32%;
        min-width: 0;
    }

    .customer-avatar {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .order-bubble {
        bottom: 50px;
        font-size: 9.5px;
        padding: 3px 5px;
        max-width: 95px;
    }

    .kitchen-area {
        padding: 6px 8px;
        gap: 8px;
        justify-content: space-evenly;
    }

    .stations-row {
        gap: 6px;
        justify-content: space-between;
    }

    .station-title {
        font-size: 10px;
    }

    .station-slots-container {
        gap: 6px;
    }

    .appliance-slot {
        width: clamp(58px, 17vw, 76px);
        height: 60px;
    }

    .assembly-tray {
        width: clamp(68px, 20vw, 84px);
        height: 62px;
    }

    .trash-station {
        width: clamp(46px, 13vw, 56px);
        height: 62px;
    }

    .sink-station {
        width: clamp(66px, 18vw, 78px);
        height: 62px;
    }

    /* Thanh nguyên liệu cuộn mượt bằng cảm ứng trên điện thoại */
    .ingredients-bar {
        height: 68px;
        padding: 6px 10px max(6px, env(safe-area-inset-bottom)) 10px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .ingredients-bar::-webkit-scrollbar {
        display: none;
    }

    .ingredient-bin {
        flex-shrink: 0;
        width: 60px;
        height: 52px;
    }

    .ingredient-label {
        font-size: 8.5px;
    }
}

/* 3. Floating Mobile Landscape Tip (Thông báo gợi ý xoay ngang màn hình) */
.mobile-rotate-pill {
    display: none;
}

@media (max-width: 640px) and (orientation: portrait) {
    .mobile-rotate-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        position: absolute;
        top: 54px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 50;
        background: rgba(18, 22, 33, 0.94);
        border: 1px solid rgba(255, 209, 102, 0.5);
        color: var(--color-gold);
        padding: 4px 12px;
        border-radius: var(--radius-full);
        font-size: 11px;
        font-weight: 700;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
        pointer-events: auto;
        animation: rotateHintBob 1.6s infinite alternate ease-in-out;
        white-space: nowrap;
    }

    .rotate-pill-close {
        background: transparent;
        border: none;
        color: #A0AABF;
        cursor: pointer;
        padding: 0 2px;
        font-size: 12px;
        line-height: 1;
    }

    @keyframes rotateHintBob {
        from { transform: translateX(-50%) translateY(0); }
        to { transform: translateX(-50%) translateY(-4px); }
    }
}

/* ========================================================
   5 LIVELY KITCHEN THEMES (RANDOMIZED EACH LEVEL)
======================================================== */

/* 1. Theme: Neon Downtown Diner (Quán Ăn Phố Đêm Neon) */
#game-container.theme-diner-neon,
.gameplay-screen.theme-diner-neon {
    background: radial-gradient(circle at 50% 25%, #2D1B4E 0%, #150E26 60%, #0D0818 100%) !important;
}
#game-container.theme-diner-neon .customer-counter,
.gameplay-screen.theme-diner-neon .customer-counter {
    background: linear-gradient(180deg, rgba(45, 27, 78, 0.45) 0%, rgba(21, 14, 38, 0.95) 100%) !important;
    border-bottom: 4px solid #9D4EDD !important;
}
#game-container.theme-diner-neon .kitchen-area,
.gameplay-screen.theme-diner-neon .kitchen-area {
    background: #181226 !important;
    background-image: radial-gradient(circle at 80% 90%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
                      radial-gradient(circle at 20% 10%, rgba(121, 40, 202, 0.14) 0%, transparent 40%) !important;
}

/* 2. Theme: Tropical Beachside Shack (Bếp Nướng Bãi Biển Nhiệt Đới) */
#game-container.theme-beach-tiki,
.gameplay-screen.theme-beach-tiki {
    background: radial-gradient(circle at 50% 20%, #184A54 0%, #0B252B 65%, #051417 100%) !important;
}
#game-container.theme-beach-tiki .customer-counter,
.gameplay-screen.theme-beach-tiki .customer-counter {
    background: linear-gradient(180deg, rgba(24, 74, 84, 0.5) 0%, rgba(11, 37, 43, 0.95) 100%) !important;
    border-bottom: 4px solid #2EC4B6 !important;
}
#game-container.theme-beach-tiki .kitchen-area,
.gameplay-screen.theme-beach-tiki .kitchen-area {
    background: #0E1F24 !important;
    background-image: radial-gradient(circle at 20% 80%, rgba(46, 196, 182, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 85% 20%, rgba(255, 209, 102, 0.1) 0%, transparent 45%) !important;
}

/* 3. Theme: Retro 80s Synthwave (Nhà Hàng Retro Thập Niên 80) */
#game-container.theme-retro-80s,
.gameplay-screen.theme-retro-80s {
    background: radial-gradient(circle at 50% 30%, #3D1633 0%, #1E0A1A 65%, #10050E 100%) !important;
}
#game-container.theme-retro-80s .customer-counter,
.gameplay-screen.theme-retro-80s .customer-counter {
    background: linear-gradient(180deg, rgba(61, 22, 51, 0.5) 0%, rgba(30, 10, 26, 0.95) 100%) !important;
    border-bottom: 4px solid #FF007A !important;
}
#game-container.theme-retro-80s .kitchen-area,
.gameplay-screen.theme-retro-80s .kitchen-area {
    background: #190916 !important;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(255, 0, 122, 0.05) 24px, rgba(255, 0, 122, 0.05) 25px) !important;
}

/* 4. Theme: Cozy Brick Gourmet Bistro (Quán Bistro Gỗ Trầm & Gạch Mộc) */
#game-container.theme-gourmet-bistro,
.gameplay-screen.theme-gourmet-bistro {
    background: radial-gradient(circle at 50% 25%, #3E241E 0%, #1F110E 65%, #110907 100%) !important;
}
#game-container.theme-gourmet-bistro .customer-counter,
.gameplay-screen.theme-gourmet-bistro .customer-counter {
    background: linear-gradient(180deg, rgba(62, 36, 30, 0.5) 0%, rgba(31, 17, 14, 0.95) 100%) !important;
    border-bottom: 4px solid #D97706 !important;
}
#game-container.theme-gourmet-bistro .kitchen-area,
.gameplay-screen.theme-gourmet-bistro .kitchen-area {
    background: #1A0E0C !important;
    background-image: radial-gradient(circle at 50% 50%, rgba(217, 119, 6, 0.12) 0%, transparent 60%) !important;
}

/* 5. Theme: Tokyo Night Market (Chợ Đêm Tokyo Đèn Lồng) */
#game-container.theme-tokyo-night,
.gameplay-screen.theme-tokyo-night {
    background: radial-gradient(circle at 50% 25%, #381216 0%, #1C080B 65%, #0F0305 100%) !important;
}
#game-container.theme-tokyo-night .customer-counter,
.gameplay-screen.theme-tokyo-night .customer-counter {
    background: linear-gradient(180deg, rgba(56, 18, 22, 0.5) 0%, rgba(28, 8, 11, 0.95) 100%) !important;
    border-bottom: 4px solid #EF4444 !important;
}
#game-container.theme-tokyo-night .kitchen-area,
.gameplay-screen.theme-tokyo-night .kitchen-area {
    background: #170709 !important;
    background-image: radial-gradient(circle at 80% 30%, rgba(239, 68, 68, 0.14) 0%, transparent 50%),
                      radial-gradient(circle at 20% 70%, rgba(251, 191, 36, 0.1) 0%, transparent 45%) !important;
}

/* Thematic Ambient Badge on Counter */
.theme-ambient-pill {
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    pointer-events: none;
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFF;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}


