﻿:root {
    --bg-color: #050505;
    --panel-color: rgba(30, 30, 30, 0.7);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent-color: #00e676;
    --accent-hover: #00c853;
    --danger-color: #ff5252;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --font-stack: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);

    /* Animation Timings */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes customerEntry {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.customer-card {
    animation: customerEntry 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    border-left: 4px solid var(--accent-color);
}

.patience-fill {
    box-shadow: 0 0 10px currentColor;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 230, 118, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 230, 118, 0.03) 0%, transparent 20%);
    color: var(--text-primary);
    font-family: var(--font-stack);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}

/* --- Layout Components --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    padding-top: max(1.2rem, env(safe-area-inset-top));
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-cucumber {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 10px var(--accent-color));
}

.resource {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--panel-border);
}

/* --- Responsive Workstation --- */
#workstation {
    position: relative;
    width: 100%;
    height: calc(100vh - 180px);
    /* Fill space between header and nav */
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2000px;
    transform-style: preserve-3d;
    padding: 20px;
    overflow: hidden;
}

/* Jars removed */

/* --- Improved Board --- */
#board-container {
    transform: rotateX(25deg) translateY(20px);
    z-index: 10;
    transform-style: preserve-3d;
}

#board {
    width: 320px;
    max-width: 90vw;
    height: 220px;
    background: #5d4037;
    border-radius: 12px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 8px solid #3e2723;
    transition: transform 0.05s;
}

#board.impact {
    transform: translateY(8px) scale(0.98);
}

/* Screen Shake Effect */
.shake {
    animation: screenShake 0.1s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Juice Particles */
.juice {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
    animation: juiceSplash 0.4s ease-out forwards;
}

@keyframes juiceSplash {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--jx), var(--jy)) scale(0);
        opacity: 0;
    }
}

#cucumber-holder {
    width: 220px;
    height: 70px;
    position: relative;
    overflow: hidden;
    transition: width 0.1s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 2;
    transform-style: preserve-3d;
}

#cucumber {
    height: 100%;
    width: 220px;
    max-width: none;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.6));
    object-fit: contain;
    object-position: left center;
    transition: transform 0.05s;
}

#cucumber.squish {
    animation: cucumberSquish 0.1s ease-out;
}

@keyframes cucumberSquish {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scaleY(0.85) scaleX(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Improved Knife --- */
#knife {
    position: absolute;
    top: 65px;
    left: 48%;
    width: 240px;
    z-index: 100;
    pointer-events: none;
    transform-origin: bottom right;
    transform: translate(-50%, -50%) rotate(-15deg) translateZ(50px);
    transition: transform 0.1s ease-out, left 0.1s ease-out;
    filter: drop-shadow(15px 25px 20px rgba(0, 0, 0, 0.6));
}

#knife.chop {
    animation: chopRebound 0.15s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes chopRebound {
    0% {
        transform: translate(-50%, -50%) rotate(-15deg) translateY(0) translateZ(50px);
    }

    35% {
        transform: translate(-50%, -50%) rotate(25deg) translateY(120px) translateZ(20px);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-15deg) translateY(0) translateZ(50px);
    }
}

/* Impact Flash */
.impact-flash {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: 110;
    transform: translate(-50%, -50%);
    animation: flashFade 0.2s ease-out forwards;
}

@keyframes flashFade {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Slow-Mo Mode */
body.slow-mo {
    transition: filter 0.3s;
    filter: contrast(1.2) brightness(1.1);
}

body.slow-mo * {
    animation-duration: 0.8s !important;
}

body.slow-mo .floater {
    animation-duration: 2s !important;
}

#knife.sweeping {
    animation: sweepParabolic 1.2s ease-in-out;
}

@keyframes sweepParabolic {
    0% {
        left: 45%;
        top: 50px;
        transform: translate(-50%, -50%) rotate(-15deg);
    }

    30% {
        left: 35%;
        top: 200px;
        transform: translate(-50%, -50%) rotate(0deg);
    }

    80% {
        left: 85%;
        top: 120px;
        transform: translate(-50%, -50%) rotate(45deg);
    }

    100% {
        left: 45%;
        top: 50px;
        transform: translate(-50%, -50%) rotate(-15deg);
    }
}

/* Slices Logic */
.slice {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('../assets/images/slice.svg');
    background-size: cover;
    z-index: 3;
    pointer-events: none;
    transition: all 0.5s ease-out;
}

.zoop-collect {
    animation: flightCollect 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes flightCollect {
    0% {
        transform: translate(0, 0) scale(1) rotate(0);
        opacity: 1;
    }

    40% {
        transform: translate(100px, -150px) scale(0.9) rotate(180deg);
        opacity: 1;
    }

    100% {
        transform: translate(200px, 300px) scale(0.5) rotate(360deg);
        opacity: 0;
    }
}

/* Modal and Card Scaling for Mobile */
@media (max-width: 600px) {
    header {
        padding: 10px;
        gap: 8px;
    }

    .resource {
        padding: 4px 10px;
        font-size: 0.9rem;
    }

    nav {
        padding: 8px 12px;
        gap: 6px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        height: 70px;
    }

    nav button {
        padding: 6px 4px;
        font-size: 0.75rem;
        flex: 1;
        min-width: 75px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: center;
        justify-content: center;
    }

    nav button span:first-child {
        font-size: 1.3rem;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }

    #board {
        width: 280px;
        height: 180px;
    }

    #knife {
        width: 180px;
    }

    #cucumber-holder {
        width: 180px;
    }
}

/* Jar content logic removed */

#knife.sweeping {
    animation: sweepMotion 1s ease-in-out;
}

@keyframes sweepMotion {
    0% {
        left: 45%;
        top: 50px;
        transform: translate(-50%, -50%) rotate(-10deg);
    }

    30% {
        left: 40%;
        top: 120px;
        transform: translate(-50%, -50%) rotate(0deg);
    }

    80% {
        left: 70%;
        top: 120px;
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        left: 45%;
        top: 50px;
        transform: translate(-50%, -50%) rotate(-10deg);
    }
}


/* --- Navigation Bar --- */
nav {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: var(--panel-color);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--panel-border);
    overflow-x: auto;
    justify-content: flex-start;
    /* Better for overflow */
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 20;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

@media (min-width: 601px) {
    nav {
        justify-content: center;
    }
}

nav button {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    white-space: nowrap;
    border: 1px solid transparent;
}

nav button:hover,
nav button.active {
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-color);
    border-color: rgba(0, 230, 118, 0.3);
}

/* --- Modals and Cards (Preserved) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: #121212;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.btn-close {
    background: transparent;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card.inactive {
    opacity: 0.5;
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-primary);
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* Card Button Variants */
.btn-primary {
    background: var(--accent-color);
    color: #000;
    padding: 10px;
    border-radius: var(--radius-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger-color);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.btn-danger:hover {
    background: rgba(255, 82, 82, 0.2);
}

.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s;
}

/* --- Premium Landing Hero --- */
.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
    overflow: hidden;
    min-height: calc(100vh - 80px);
}

.hero-bg-blobs {
    position: absolute;
    inset: 0;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.4;
}

.blob {
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: var(--accent-color);
    border-radius: 50%;
    animation: blobMove 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.blob:nth-child(2) {
    background: #00bcd4;
    right: -10%;
    bottom: -10%;
    animation-delay: -5s;
    width: 40vw;
    height: 40vw;
}

@keyframes blobMove {
    0% {
        transform: translate(-10%, -10%) rotate(0deg) scale(1);
    }

    100% {
        transform: translate(10%, 10%) rotate(360deg) scale(1.2);
    }
}

.landing-container {
    text-align: center;
    max-width: 650px;
    z-index: 1;
    animation: heroFadeIn 1s cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.landing-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 24px;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff 30%, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.landing-desc {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 500px;
    margin-inline: auto;
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.primary-hero-btn {
    padding: 20px 48px;
    font-size: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--accent-color);
    color: #000;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        0 20px 40px rgba(0, 230, 118, 0.3),
        inset 0 2px 2px rgba(255, 255, 255, 0.4);
    transform-origin: center;
}

.primary-hero-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 230, 118, 0.5);
    background: #00ff81;
}

.secondary-hero-btn {
    padding: 16px 36px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.secondary-hero-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.primary-hero-btn .icon,
.secondary-hero-btn .icon {
    font-size: 1.4rem;
}

.hidden {
    display: none !important;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Floating Numbers */
.floater {
    position: absolute;
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    animation: floatUp 0.8s forwards;
    z-index: 100;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-80px) scale(0.8);
        opacity: 0;
    }
}

/* --- Pickling Animation & Zone --- */
#pickling-zone {
    position: absolute;
    right: 5%;
    bottom: 40px;
    /* Lowered from 120px */
    display: flex;
    gap: 15px;
    z-index: 15;
    pointer-events: none;
}

.pickling-jar {
    width: 60px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 15px 15px;
    position: relative;
    overflow: hidden;
    animation: jarSpawn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.pickling-jar::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.pickle-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    /* Dynamic */
    background: linear-gradient(to top, #2e7d32, #4caf50);
    transition: height 0.1s linear;
}

.pickle-content::after {
    content: '🥒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.pickling-jar.completing {
    animation: jarPop 0.5s forwards;
}

.pickle-fly-icon {
    position: fixed;
    font-size: 2rem;
    z-index: 1000;
    pointer-events: none;
    animation: pickleFlyToStats 0.8s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes jarSpawn {
    0% {
        transform: scale(0) translateY(20px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes jarPop {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.5);
    }

    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

@keyframes pickleFlyToStats {
    0% {
        transform: translate(0, 0) scale(1.5);
        opacity: 1;
    }

    100% {
        transform: translate(var(--dx), var(--dy)) scale(0.5);
        opacity: 0;
    }
}

/* Bubbles */
.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    bottom: 0;
    animation: bubbleUp 1s infinite ease-out;
}

@keyframes bubbleUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-60px);
        opacity: 0;
    }
}

@media (max-width: 600px) {
    #pickling-zone {
        right: 10px;
        bottom: 80px;
        /* Adjusted for mobile */
        flex-direction: column-reverse;
        /* Stack jars vertically on small screens if needed */
    }
}

/* --- Notifications --- */
#notifications {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    pointer-events: none;
}

.notif {
    background: rgba(255, 82, 82, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(255, 82, 82, 0.4);
    animation: notifSlide 3.5s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes notifSlide {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }

    10% {
        transform: translateX(0);
        opacity: 1;
    }

    90% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* --- Market Stall Scene --- */
.stall-modal {
    max-width: 600px;
    background: #1a1a1a;
}

.stall-body {
    padding: 0 !important;
    overflow: hidden;
    position: relative;
}

.market-scene {
    height: 380px;
    background: linear-gradient(to bottom, #1a2a3a, #000);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    overflow: hidden;
}

/* Background elements for depth */
.market-scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 235, 59, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 235, 59, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.market-awning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: repeating-linear-gradient(90deg,
            #2e7d32,
            #2e7d32 40px,
            #f5f5f5 40px,
            #f5f5f5 80px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 20;
    border-bottom: 5px solid #1b5e20;
    transform: perspective(500px) rotateX(-5deg);
    transform-origin: top;
}

.market-shutter {
    position: absolute;
    top: -300px;
    /* Start higher up */
    left: 0;
    width: 100%;
    height: 280px;
    background: repeating-linear-gradient(transparent,
            transparent 15px,
            rgba(0, 0, 0, 0.1) 15px,
            rgba(0, 0, 0, 0.1) 20px), linear-gradient(to bottom, #757575, #424242);
    border-bottom: 8px solid #212121;
    z-index: 15;
    transition: top 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.market-shutter.closed {
    top: 70px;
    /* Slide down below awning */
}

.shutter-handle {
    width: 60px;
    height: 10px;
    background: #212121;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.closed-sign {
    background: #b71c1c;
    color: white;
    padding: 10px 30px;
    font-weight: 900;
    font-size: 2rem;
    border: 4px solid #fff;
    border-radius: 8px;
    margin-bottom: 50px;
    transform: rotate(-5deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.5s 0.5s;
    letter-spacing: 5px;
}

.market-shutter.closed .closed-sign {
    opacity: 1;
    animation: neonBlink 2s infinite alternate;
}

@keyframes neonBlink {
    from {
        box-shadow: 0 5px 15px rgba(183, 28, 28, 0.5);
    }

    to {
        box-shadow: 0 5px 25px rgba(255, 0, 0, 0.8);
    }
}

.market-decor {
    position: absolute;
    bottom: 80px;
    z-index: 3;
    pointer-events: none;
}

.left-props {
    left: 10px;
    width: 80px;
    height: 60px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 80"><rect x="10" y="40" width="80" height="40" fill="%235d4037" /><rect x="15" y="45" width="20" height="30" fill="%234caf50" rx="2" /><rect x="40" y="45" width="20" height="30" fill="%234caf50" rx="2" /><rect x="65" y="45" width="20" height="30" fill="%234caf50" rx="2" /></svg>') no-repeat center bottom;
    opacity: 0.8;
}

.right-props {
    right: 10px;
    width: 80px;
    height: 70px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 100"><rect x="10" y="60" width="15" height="40" fill="%2381c784" stroke="%23fff" rx="2" /><rect x="35" y="50" width="15" height="50" fill="%2381c784" stroke="%23fff" rx="2" /><rect x="60" y="70" width="15" height="30" fill="%2381c784" stroke="%23fff" rx="2" /></svg>') no-repeat center bottom;
    opacity: 0.9;
}

.wooden-counter {
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, #5d4037, #2d1b16);
    border-top: 6px solid #795548;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);
    z-index: 10;
    position: relative;
    overflow: visible;
}

.counter-props {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 25px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 25"><circle cx="50" cy="15" r="8" fill="%234caf50" /><circle cx="70" cy="10" r="8" fill="%234caf50" /><circle cx="430" cy="12" r="8" fill="%234caf50" /><circle cx="450" cy="15" r="8" fill="%234caf50" /></svg>') repeat-x;
}

.stall-customers {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    flex: 1;
    z-index: 2;
    padding-bottom: 0;
    margin-bottom: -60px;
}

.visual-customer {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.visual-customer.served {
    animation: servedAnim 0.5s forwards ease-in;
    pointer-events: none;
}

@keyframes servedAnim {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) translateY(-20px);
        opacity: 0.8;
    }

    100% {
        transform: scale(0.5) translateY(-50px);
        opacity: 0;
    }
}

.visual-customer:hover .customer-avatar {
    transform: scale(1.1);
}

.visual-customer:hover {
    transform: scale(1.05);
}

.customer-avatar {
    width: 150px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: idleFloat 3s infinite ease-in-out;
    transition: transform 0.2s, filter 0.2s;
}

.visual-customer:hover .customer-avatar {
    filter: drop-shadow(0 0 15px var(--accent-color));
    transform: scale(1.08) translateY(-5px);
}

.order-bubble {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 12px;
    position: absolute;
    left: 80%;
    /* Position to the side */
    bottom: 40%;
    width: 110px;
    text-align: center;
    color: #333;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--accent-color);
    z-index: 100;
    animation: bubblePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), bubbleIdle 2s infinite ease-in-out;
    pointer-events: none;
}

@keyframes bubblePop {
    from {
        opacity: 0;
        transform: scale(0);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bubbleIdle {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

.order-bubble::after {
    content: '';
    position: absolute;
    left: -12px;
    /* Point towards customer */
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 12px 10px 0;
    border-style: solid;
    border-color: transparent var(--accent-color) transparent transparent;
}

.patience-ring {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 99px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.patience-ring div {
    box-shadow: 0 0 10px currentColor;
}

.patience-ring div[style*="background:#f44336"] {
    animation: dangerPulse 0.5s infinite alternate;
}

@keyframes dangerPulse {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
        filter: brightness(1.5);
    }
}

.stall-hint {
    background: #333;
    color: #ccc;
    font-size: 0.8rem;
    padding: 10px;
    text-align: center;
    margin: 0;
}

@keyframes bubbleAppear {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes idleFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* --- Buff HUD --- */
#buff-hud {
    position: fixed;
    top: 85px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.buff-badge {
    background: rgba(10, 10, 10, 0.85);
    padding: 8px 15px;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(5px);
    animation: buffAppear 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

.buff-badge.tea {
    border-color: #4caf50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.buff-badge.coffee {
    border-color: #795548;
    box-shadow: 0 0 15px rgba(121, 85, 72, 0.3);
}

@keyframes buffAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#drinkList .card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

/* --- Knife Effects --- */
img[src*="knife_chef"] {
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

img[src*="knife_cleaver"] {
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
}

img[src*="knife_gold"] {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
    animation: goldShimmer 3s infinite alternate;
}

@keyframes goldShimmer {
    from {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4)) brightness(1);
    }

    to {
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8)) brightness(1.2);
    }
}