/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --oxford-blue: #0F172A;
    --purple-blue: #5C55E9;
    --pale-grey: #F7F9FC;
    --white: #FFFFFF;
    --bright-orange: #FF7507;
    --emerald-green: #00D690;
    --vivid-purple: #A700F1;
    --sky-blue: #97D7FD;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, var(--oxford-blue) 0%, #1a2942 100%);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.dark-bg {
    width: 100%;
    min-width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Screens */
.screen {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#game-screen {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.screen.hidden {
    display: none;
}

/* Headings */
.heading {
    font-family: Arial Black, Arial, sans-serif;
    font-weight: 900;
    font-size: 2.5em;
    margin-bottom: 1.5rem;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--bright-orange);
    border-radius: 2px;
}

/* Text Elements */
.tagline, .high-score, .final-score {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: 1.2em;
    margin: 1rem 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Achievement styles removed */

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    width: 100%;
    z-index: 10;
}

.timer, .score, .fees-paid, .paypal-balance, .lightning-status {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timer::after, .score::after, .fees-paid::after, .paypal-balance::after, .home-button::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
}

.timer:hover::after, .score:hover::after, .fees-paid:hover::after, .paypal-balance:hover::after, .home-button:hover::after {
    opacity: 1;
}

.home-button {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--vivid-purple) 0%, #8500c1 100%);
    color: var(--white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(167, 0, 241, 0.3);
    font-family: 'Inter', Arial, sans-serif;
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(167, 0, 241, 0.5);
}

.paypal-balance {
    color: var(--purple-blue);
}

.lightning-status {
    color: var(--vivid-purple);
    font-size: 0.9rem;
    font-weight: 600;
    background-color: rgba(167, 0, 241, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    animation: fadeIn 0.5s;
    border: 1px solid var(--vivid-purple);
}

.timer {
    color: var(--emerald-green);
}

.timer.urgent {
    color: var(--vivid-purple);
}

.score {
    color: var(--white);
}

.fees-paid {
    color: var(--vivid-purple);
    animation: fadeIn 0.5s;
}

@keyframes feePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fee-increase {
    animation: feePulse 0.5s;
}

/* Transaction Box */
.transaction-box {
    background: linear-gradient(135deg, var(--pale-grey) 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.transaction-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bright-orange), var(--emerald-green));
}

.customer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bright-orange);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.transaction {
    color: var(--oxford-blue);
    font-family: Arial Black, Arial, sans-serif;
    font-weight: 900;
    font-size: 1.2em;
    flex-grow: 1;
}

/* Payment Buttons */
.payment-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

.payment-button {
    padding: 1rem;
    border: none;
    border-radius: 16px;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.payment-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease, box-shadow 0.3s;
}

.payment-button:hover:not(.disabled) .payment-icon {
    transform: scale(1.2);
    box-shadow: 0 0 10px currentColor;
}

/* Payment icon specific colors */
.paypal .payment-icon {
    filter: drop-shadow(0 0 3px var(--purple-blue));
}

.bank .payment-icon {
    filter: drop-shadow(0 0 3px var(--emerald-green));
}

.credit .payment-icon {
    filter: drop-shadow(0 0 3px var(--vivid-purple));
}

.lightning .payment-icon {
    filter: drop-shadow(0 0 3px var(--bright-orange));
}

.withdraw .payment-icon {
    filter: drop-shadow(0 0 3px var(--purple-blue));
}

.payment-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-button:hover:not(.disabled)::before {
    opacity: 1;
}

.payment-button:hover:not(.disabled) {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.payment-button.disabled {
    background: var(--pale-grey);
    color: var(--oxford-blue);
    cursor: not-allowed;
    opacity: 0.5;
}

.paypal {
    background: linear-gradient(135deg, var(--purple-blue) 0%, #4540ba 100%);
    box-shadow: 0 4px 12px rgba(92, 85, 233, 0.3);
}

.bank {
    background: linear-gradient(135deg, var(--emerald-green) 0%, #00b377 100%);
    box-shadow: 0 4px 12px rgba(0, 214, 144, 0.3);
}

.credit {
    background: linear-gradient(135deg, var(--vivid-purple) 0%, #8500c1 100%);
    box-shadow: 0 4px 12px rgba(167, 0, 241, 0.3);
}

.lightning {
    background: linear-gradient(135deg, var(--bright-orange) 0%, #e66700 100%);
    box-shadow: 0 4px 12px rgba(255, 117, 7, 0.3);
}

.lightning:not(.disabled) {
    animation: glow 2s infinite alternate;
}

/* Feedback Pop-up */
.feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem 3rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.95);
    color: var(--white);
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: 1.2em;
    max-width: 80%;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.feedback.hidden {
    display: none;
}

/* Buttons */
.cta-button {
    background: linear-gradient(135deg, var(--bright-orange) 0%, #e66700 100%);
    color: var(--white);
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 16px;
    font-family: 'Monument Extended', 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 2rem;
    box-shadow: 0 4px 12px rgba(255, 117, 7, 0.3);
    animation: pulse 1s infinite;
    align-self: center;
    text-align: center;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--vivid-purple) 0%, #8500c1 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(167, 0, 241, 0.3);
}

@media (min-width: 800px) {
    .cta-button {
        width: 200px;
        height: 60px;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Desktop Buttons */
.desktop-controls {
    display: none; /* Hidden by default, shown only on desktop with media query */
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
    width: 100%;
    align-items: center;
    text-align: center;
}

.desktop-start-button, 
.desktop-skip-button {
    width: 200px;
    height: 60px;
    border: none;
    border-radius: 16px;
    font-family: 'Monument Extended', Arial Black, Arial, sans-serif;
    font-weight: 600;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.desktop-start-button {
    background: var(--bright-orange);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 117, 7, 0.3);
    animation: pulse 1s infinite;
}

.desktop-skip-button {
    background: var(--vivid-purple);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(167, 0, 241, 0.3);
}

.desktop-start-button:hover,
.desktop-skip-button:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 117, 7, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 117, 7, 0);
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 117, 7, 0);
        transform: scale(1);
    }
}

/* Media query for desktop buttons */
@media (min-width: 800px) {
    .desktop-controls {
        display: flex;
    }

    .mobile-start-button {
        display: none;
    }

    /* Enhanced desktop styles */
    #game-container {
        width: 100%;
        min-width: 800px;
        min-height: 600px;
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        position: relative;
        overflow: hidden;
    }

    .store-background {
        height: 400px !important;
    }

    .game-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 799px) {
    .desktop-controls {
        display: none;
    }

    .mobile-start-button {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    /* Mobile styles */
    #game-container {
        width: 100%;
        min-width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0;
        gap: 0;
        overflow: hidden;
    }

    .store-background {
        height: 200px; /* Adjusted height for mobile */
    }

    .game-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .customer-cards,
    .payment-methods {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    /* Fix customer bubbles position on small screens */
    .customer-bubbles-container {
        position: absolute;
        top: 15%; /* Position much higher in the store background */
        transform: translateY(0); /* Remove the transform that was pushing it down */
        min-height: 80px; /* Smaller min-height for mobile */
        padding: 0 1rem;
    }
    
    /* Center alignment for buttons on small screens */
    .cta-button, .secondary-button {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    /* Ensure end screen buttons are centered */
    .end-buttons {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
}

/* Animations */
@keyframes glow {
    from {
        box-shadow: 0 4px 12px rgba(255, 117, 7, 0.3);
    }
    to {
        box-shadow: 0 8px 24px rgba(255, 117, 7, 0.6), 0 0 30px rgba(0, 214, 144, 0.4);
    }
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-53%, -50%); }
    75% { transform: translate(-47%, -50%); }
}

/* Layout Stabilization */
.dark-bg {
    width: 100%;
    min-width: 800px;
    max-width: 1200px;
    height: 750px; /* Increased from 600px for better vertical spacing */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#game-screen {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.game-layout {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    width: 100%;
    position: relative;
}

/* Top Bar Stability */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    width: 100%;
    z-index: 10;
    position: relative;
    height: 60px;
    margin-bottom: 0;
}

/* Store Background Stability */
.store-background {
    position: relative;
    width: 100%;
    height: 480px; /* Increased from 400px for better vertical spacing */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 24px 24px 0 0;
    z-index: 0;
    overflow: hidden;
    margin-bottom: 0;
}

/* Customer Bubbles Container Stability */
.customer-bubbles-container {
    position: absolute;
    top: 40%; /* Position below the store counter */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center alignment adjustment */
    min-height: 80px; /* Smaller min-height for mobile */
    padding: 0 1rem;
    width: 90%; /* Control width of container */
    max-width: 800px; /* Prevent too wide spread on large screens */
    display: flex; /* Use flexbox for easier alignment */
    justify-content: center; /* Center customer bubbles */
    flex-wrap: wrap; /* Allow wrapping for multiple customers */
    gap: 20px; /* Consistent spacing between bubbles */
    z-index: 1000; /* Ensure bubbles stay in foreground */
}

/* Payment Methods Area Stability */
.payment-area {
    width: 100%;
    position: relative;
    padding: 0;
    margin: 0;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 16px 16px;
    margin-top: 0;
    position: relative;
}

/* Add Transition to All Elements */
.customer-bubble,
.payment-icon-wrapper,
.payment-button,
.feedback,
.timer-add-animation,
.timer-subtract-animation,
.fee-increase-animation,
.withdrawal-bonus-animation {
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 799px) {
    .dark-bg {
        height: auto;
        min-height: 100vh;
        min-width: 100%;
    }

    .screen {
        height: auto;
        min-height: 100vh;
    }

    .store-background {
        height: 180px; /* Reduced slightly from 200px for better mobile proportions */
    }

    #game-screen {
        gap: 0;
    }

    /* Fix customer bubbles position on small screens */
    .customer-bubbles-container {
        position: absolute;
        top: 40%; /* Adjusted from 45% to position properly on mobile */
        left: 50%;
        transform: translateX(-50%);
        min-height: 70px; /* Reduced from 80px for more compact mobile layout */
        padding: 0 0.8rem;
        width: 95%;
        max-width: 100%;
        gap: 5px; /* Smaller gap on mobile */
    }

    /* Tighter layout for mobile */
    .game-layout {
        gap: 0;
    }

    .payment-area {
        padding: 0;
    }

    .payment-methods {
        padding: 0.3rem;
    }
    
    /* More compact payment icons for mobile */
    .payment-icon-wrapper {
        height: 100px; /* Reduced from 120px for more compact mobile layout */
    }
    
    .payment-icon {
        width: 50px; /* Slightly smaller icons on mobile */
        height: 50px;
    }
}

@media (min-width: 800px) {
    .dark-bg {
        min-width: 800px;
        min-height: 600px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .store-background {
        height: 400px;
    }

    .payment-area {
        padding: 0;
    }

    .customer-bubbles-container {
        padding: 0 1.5rem;
        min-height: 150px;
    }

    .top-bar {
        height: 70px;
        padding: 0 1.5rem;
    }

    #game-screen {
        gap: 0;
    }
}

@media (max-width: 500px) {
    .payment-buttons {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.8rem;
        justify-content: center;
    }

    .timer, .score, .paypal-balance, .fees-paid {
        width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        margin: 0 0.25rem;
    }

    /* Hide labels on small screens */
    .timer span:first-child, 
    .score span:first-child, 
    .paypal-balance span:first-child, 
    .fees-paid span:first-child {
        display: none;
    }

    .home-button {
        padding: 0.6rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        position: relative;
    }

    .home-button span {
        display: none;
    }

    .home-button::after {
        content: "🏠";
        font-size: 1.2rem;
        position: static;
        opacity: 1;
        transform: none;
        background: transparent;
        padding: 0;
        margin: 0;
    }

    .home-button[data-tooltip]::before {
        content: attr(data-tooltip);
        position: absolute;
        top: -40px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(15, 23, 42, 0.9);
        color: var(--white);
        padding: 5px 10px;
        border-radius: 6px;
        opacity: 0;
        transition: opacity 0.3s;
        white-space: nowrap;
        pointer-events: none;
        z-index: 100;
    }

    .home-button[data-tooltip]:hover::before {
        opacity: 1;
    }

    .customer-avatar {
        width: 50px;
        height: 50px;
    }

    .transaction {
        font-size: 0.9rem;
    }

    .payment-icon {
        width: 30px;
        height: 30px;
    }

    .payment-button {
        padding: 0.8rem;
    }

    .withdraw {
        grid-column: span 1;
    }

    #game-container {
        min-width: 100%;
        width: 100%;
    }
}

@media (min-width: 1000px) {
    .customer-bubble {
        width: 180px;
        height: 100px;
    }

    .payment-icon-wrapper {
        height: 140px;
    }

    .payment-icon {
        width: 70px;
        height: 70px;
    }
}

.hidden {
    display: none !important;
}

/* Add styles for new elements */
.store-select-container {
    margin: 1.5rem 0;
    text-align: center;
}

.store-select-container label {
    display: block;
    color: var(--white);
    font-size: 1.1em;
    margin-bottom: 0.5rem;
}

.store-select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--bright-orange);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--emerald-green);
}

.store-select option {
    background: var(--oxford-blue);
    color: var(--white);
    padding: 0.5rem;
}

/* Cooldown Effects */
.payment-button.cooldown {
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    opacity: 0.7;
}

.payment-button.cooldown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    animation: cooldownProgress 2s linear;
}

@keyframes cooldownProgress {
    from { transform: translateY(100%); }
    to { transform: translateY(0%); }
}

/* Bank Progress Bar */
.bank-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--emerald-green), var(--bright-orange));
    z-index: 1000;
}

@keyframes shrinkWidth {
    from { width: 100%; }
    to { width: 0%; }
}

/* Tips Styling */
.feedback.tip {
    background: var(--oxford-blue);
    border: 2px solid var(--bright-orange);
    animation: tipFloat 0.5s ease-out;
}

@keyframes tipFloat {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Success and Error Animations */
.feedback.success {
    border: 2px solid var(--emerald-green);
    animation: successPulse 0.5s ease;
}

.feedback.error {
    border: 2px solid(--vivid-purple);
    animation: errorShake 0.5s ease;
}

@keyframes successPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-53%, -50%); }
    75% { transform: translate(-47%, -50%); }
}

/* Store Background */
.store-background {
    position: relative;
    width: 100%;
    height: 400px; /* Default height for larger screens */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 24px 24px 0 0;
    z-index: 0;
    overflow: hidden;
}

/* Background effect */
.store-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.9));
    z-index: 1;
}

.store-background.grocery {
    background-image: url('/static/images/grocery_store.jpg');
}

.store-background.cafe {
    background-image: url('/static/images/cafe.jpg');
}

.store-background.restaurant {
    background-image: url('/static/images/restaurant.jpg');
}

/* Game Layout */
.game-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    padding: 0;
    gap: 0;
}

.transaction-area {
    width: 100%;
    margin: 0;
}

.payment-area {
    width: 100%;
    margin-top: 0;
    padding: 0;
}

@keyframes bob {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Store Type Background Effects - keep as fallback */
.dark-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.1;
    transition: background-image 0.5s ease;
}

.dark-bg.grocery::before {
    background-image: url('/static/images/grocery_store.jpg');
}

.dark-bg.cafe::before {
    background-image: url('/static/images/cafe.jpg');
}

.dark-bg.restaurant::before {
    background-image: url('/static/images/restaurant.jpg');
}

/* Timer Bar */
.timer-bar {
    position: fixed;
top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--pale-grey);
    z-index:1000;
}

.timer-bar-progress {
    height: 100%;
    background: var(--emerald-green);
    transition: width 0.5s;
    position: absolute;
    top: 0;
    left: 0;
}

.timer-bar-progress.urgent {
    background: var(--vivid-purple);
    animation: urgentPulse 1s infinite;
}

/* Timer Animation Styles */
.timer-add-animation {
    position: absolute;
    color: var(--bright-orange);
    font-weight: bold;
    top: -20px;
    right: 10px;
    animation: timerAddFloat 1s forwards;
    font-size: 0.9rem;
    z-index: 1001;
    pointer-events: none;
}

.timer-subtract-animation {
    position: absolute;
    color: var(--vivid-purple);
    font-weight: bold;
    top: -20px;
    right: 10px;
    animation: timerSubtractFloat 1s forwards;
    font-size: 0.9rem;
    z-index: 1001;
    pointer-events: none;
}

.timer-penalty {
    animation: timerPenaltyShake 0.5s;
    color: var(--vivid-purple) !important;
}

.timer-pulse-animation {
    position: absolute;
    height: 100%;
    width: 50px;
    right: 0;
    top: 0;
    background-color: var(--bright-orange);
    animation: timerPulse 1.5s ease-out;
    opacity: 0.7;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--bright-orange);
    z-index: 2;
}

.timer-flash-animation {
    position: absolute;
    height: 100%;
    width: 50px;
    right: 0;
    top: 0;
    background-color: var(--vivid-purple);
    animation: timerFlash 1.5s ease-out;
    opacity: 0.7;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--vivid-purple);
    z-index: 2;
}

@keyframes timerAddFloat {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    20% { opacity: 1; transform: translateY(-5px) scale(1.2); }
    80% { opacity: 1; transform: translateY(-15px) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.8); }
}

@keyframes timerSubtractFloat {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    20% { opacity: 1; transform: translateY(5px) scale(1.2); }
    80% { opacity: 1; transform: translateY(15px) scale(1); }
    100% { opacity: 0; transform: translateY(20px) scale(0.8); }
}

@keyframes timerPenaltyShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

@keyframes timerPulse {
    0% { opacity: 0; width: 0; }
    30% { opacity: 0.9; width: 120px; }
    70% { opacity: 0.7; width: 150px; }
    100% { opacity: 0; width: 50px; }
}

@keyframes timerFlash {
    0% { opacity: 0; width: 0; }
    25% { opacity: 0.9; width: 150px; }
    60% { opacity: 0.8; width: 180px; }
    100% { opacity: 0; width: 50px; }
}

/* Customer Bubbles */
.customer-bubbles-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    padding: 1rem;
    position: relative;
    min-height: 120px;
    margin: 0;
    z-index: 5; /* Ensure bubbles are above store background */
}

.customer-bubble {
    width: 150px;
    height: 90px;
    background-color: var(--pale-grey);
    border: 3px solid var(--bright-orange);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: pop 0.5s ease-out;
    transform-origin: center center;
    transition: all 0.5s ease;
    overflow: visible;
}

/* Adjust bubble size on very large screens */
@media (min-width: 1200px) {
    .customer-bubble {
        width: 180px;
        height: 100px;
    }
}

/* Adjust bubble size on small screens */
@media (max-width: 500px) {
    .customer-bubble {
        width: 130px;
        height: 80px;
        padding: 8px;
    }
}

/* Specific styling for different customer types */
.customer-bubble[data-customer-type="Local Regular"] {
    border-color: var(--bright-orange);
}

.customer-bubble[data-customer-type="Busy Office Worker"] {
    border-color: var(--purple-blue);
}

.customer-bubble[data-customer-type="Tourist"] {
    border-color: var(--emerald-green);
}

.customer-bubble.droppable {
    box-shadow: 0 0 15px var(--emerald-green);
    transform: scale(1.05);
    border-color: var(--emerald-green);
    background-color: rgba(0, 214, 144, 0.1);
}

.customer-bubble.processing {
    opacity: 0.7;
    pointer-events: none;
}

.customer-bubble.mismatch {
    border-color: var(--vivid-purple);
    animation: mismatchShake 0.5s;
    box-shadow: 0 0 15px var(--vivid-purple);
}

.bubble-content {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    position: relative;
    width: 100%;
}

.bubble-customer-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bright-orange);
    flex-shrink: 0;
    transform-origin: center;
}

/* Customer animations */
.walk-animation {
    animation: walk 2s infinite linear;
}

.bob-animation {
    animation: bob 1.5s infinite ease-in-out;
}

.wave-animation {
    animation: wave 2.5s infinite ease-in-out;
}

@keyframes walk {
    0% { transform: translateX(-2px); }
    25% { transform: translateY(1px); }
    50% { transform: translateX(2px); }
    75% { transform: translateY(-1px); }
    100% { transform: translateX(-2px); }
}

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

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.bubble-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
}

.bubble-amount {
    font-weight: bold;
    color: var(--oxford-blue);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 117, 7, 0.1);
    padding: 5px;
    border-radius: 8px;
    text-align: center;
}

.requested-payment {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 50%; /* Circle shape */
    width: 40px;
    height: 40px;
    position: absolute;
    bottom: -15px;
    right: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--pale-grey);
    transition: all 0.3s ease;
    overflow: hidden; /* Ensure icon stays within circle */
    background-color: #FFFFFF; /* White background for better icon visibility */
}

.requested-payment:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.requested-payment-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block; /* Ensure icon displays properly */
    filter: none; /* Remove filter to show original colors */
}

/* Specific styling for different payment methods */
.requested-payment[style*="var(--purple-blue)"] .requested-payment-icon {
    filter: drop-shadow(0 1px 1px rgba(92, 85, 233, 0.5));
}

.requested-payment[style*="var(--emerald-green)"] .requested-payment-icon {
    filter: drop-shadow(0 1px 1px rgba(0, 214, 144, 0.5));
}

.requested-payment[style*="var(--vivid-purple)"] .requested-payment-icon {
    filter: drop-shadow(0 1px 1px rgba(167, 0, 241, 0.5));
}

.requested-payment[style*="var(--bright-orange)"] .requested-payment-icon {
    filter: drop-shadow(0 1px 1px rgba(255, 117, 7, 0.5));
}

.patience-meter {
    width: 100%;
    height: 6px;
    background: var(--pale-grey);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.patience-progress {
    height: 100%;
    background: var(--emerald-green);
    width: 100%;
    transition: width 0.5s linear;
}

.patience-progress.low {
    background: var(--vivid-purple);
    animation: pulseMeter 1s infinite;
}

.patience-text {
    font-size: 0.6rem;
    color: var(--oxford-blue);
    text-align: center;
    margin-top: 2px;
}

@keyframes mismatchShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bubble-product {
    color: var(--oxford-blue);
    font-size: 0.8rem;
    margin-top: 3px;
    text-align: center;
}

/* Drag and Drop Styles */
.payment-methods {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-top: 1rem;
}

.payment-method-title {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.payment-icons-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
}

.payment-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
    height: 120px;
    transition: transform 0.3s ease; /* Added smooth transition */
}

.payment-icon-wrapper[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    font-size: 0.8rem;
    font-weight: normal;
    width: max-content;
    max-width: 200px;
}

.payment-icon-wrapper[data-tooltip]:hover::before {
    opacity: 1;
}

.payment-icon-wrapper:active {
    cursor: grabbing;
}

.payment-icon-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-icon-wrapper.cooldown {
    opacity: 0.7;
    cursor: not-allowed;
}

.payment-label {
    color: var(--white);
    font-size: 0.8rem;
    margin-top: 8px;
    font-weight: 500;
}

.payment-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease, box-shadow 0.3s;
}

.payment-icon-wrapper:hover:not(.disabled) .payment-icon {
    transform: scale(1.1);
    box-shadow: 0 0 10px currentColor;
}

.payment-icon-wrapper:hover:not(.disabled) {
    transform: translateY(-3px);
}

.payment-icon-wrapper.dragging,
.payment-icon-wrapper.selected {
    opacity: 0.8;
    transform: scale(1.1);
}

.payment-icon-wrapper.selected {
    box-shadow: 0 0 20px var(--bright-orange), 0 0 10px var(--emerald-green);
    border: 2px solid var(--bright-orange);
}

.payment-selected {
    cursor: pointer;
}

.customer-bubble {
    cursor: default;
}

/* Add pointer cursor to customer bubbles when a payment is selected */
.payment-selected .customer-bubble {
    cursor: pointer;
}

/* Add hover effect when payment selected */
.payment-selected .customer-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--bright-orange);
    transition: all 0.2s ease;
}

.button-penalty {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 3px;
}

/* Payment method colors */
.payment-icon-wrapper.paypal {
    background: linear-gradient(135deg, var(--purple-blue) 0%, #4540ba 100%);
    box-shadow: 0 4px 12px rgba(92, 85, 233, 0.3);
}

.payment-icon-wrapper.bank {
    background: linear-gradient(135deg, var(--emerald-green) 0%, #00b377 100%);
    box-shadow: 0 4px 12px rgba(0, 214, 144, 0.3);
}

.payment-icon-wrapper.credit {
    background: linear-gradient(135deg, var(--vivid-purple) 0%, #8500c1 100%);
    box-shadow: 0 4px 12px rgba(167, 0, 241, 0.3);
}

.payment-icon-wrapper.lightning {
    background: linear-gradient(135deg, var(--bright-orange) 0%, #e66700 100%);
    box-shadow: 0 4px 12px rgba(255, 117, 7, 0.3);
}

.payment-icon-wrapper.lightning:not(.disabled) {
    animation: glow 2s infinite alternate;
}

.payment-icon-wrapper.lightning .button-penalty {
    color: var(--emerald-green);
}

.payment-icon-wrapper.withdraw {
    background: linear-gradient(135deg, var(--purple-blue) 0%, #4540ba 100%);
    box-shadow: 0 4px 12px rgba(92, 85, 233, 0.3);
    margin-top: 5px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    transition: all 0.3s ease;
    height: 80px;
    position: relative;
}

/* Style for withdraw button when PayPal has funds */
.payment-icon-wrapper.withdraw.has-funds {
    background: linear-gradient(135deg, var(--bright-orange) 0%, #e66700 100%);
    box-shadow: 0 0 15px var(--emerald-green);
    animation: withdrawPulse 2s infinite alternate;
}

@keyframes withdrawPulse {
    from { box-shadow: 0 0 10px var(--emerald-green); }
    to { box-shadow: 0 0 20px var(--emerald-green), 0 0 30px var(--emerald-green); }
}

/* Animations for successful and failed payments */
.payment-success {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 214, 144, 0.2);
    border-radius: 16px;
    font-weight: 700;
    color: var(--emerald-green);
    animation: successFade 1s forwards;
    z-index: 10;
    font-size: 1.2rem;
    text-shadow: 0 2px 8px rgba(0, 214, 144, 0.7);
    box-shadow: inset 0 0 30px var(--emerald-green);
    pointer-events: none;
}

.payment-failure {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(167, 0, 241, 0.2);
    border-radius: 16px;
    font-weight: 700;
    color: var(--vivid-purple);
    animation: failureFade 1s forwards;
    z-index: 10;
    font-size: 1.2rem;
    text-shadow: 0 2px 8px rgba(167, 0, 241, 0.7);
    box-shadow: inset 0 0 30px var(--vivid-purple);
    pointer-events: none;
}

/* Success Spark Effect */
.success-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--bright-orange);
    transform-origin: center;
    animation: sparkFly 0.5s ease-out forwards;
    z-index: 20;
    pointer-events: none;
    will-change: transform; /* Optimize animations */
}

/* Failure Smoke Effect */
.failure-smoke {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--vivid-purple);
    opacity: 0.8;
    filter: blur(2px);
    animation: smokeRise 0.8s ease-out forwards;
    z-index: 20;
    pointer-events: none;
    will-change: transform, opacity; /* Optimize animations */
}

/* Particles container */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
}

@keyframes sparkFly {
    0% { 
        transform: translate(0, 0) scale(0.5); 
        opacity: 1;
    }
    100% { 
        transform: translate(var(--x), var(--y)) scale(0.1); 
        opacity: 0;
    }
}

@keyframes smokeRise {
    0% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.8; 
    }
    100% { 
        transform: translate(var(--x), var(--y)) scale(2); 
        opacity: 0; 
    }
}

@keyframes successFade {
    0% { opacity: 0; transform: scale(0.95); }
    20% { opacity: 1; transform: scale(1.02); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); }
}

@keyframes failureFade {
    0% { opacity: 0; transform: scale(1); }
    20% { opacity: 1; transform: scale(1.05); }
    40% { transform: scale(0.95); }
    60% { transform: scale(1.02); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

/* Fixed popup and animation positions */
.modal-overlay, 
.complication-announcement,
.achievement-popup,
.lightning-countdown {
    position: fixed;
    z-index: 1000;
}

.modal-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lightning-countdown {
    top: 20px;
    right: 20px;
    transition: all 0.3s ease;
}

@keyframes successFade {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes failureFade {
    0% { opacity: 0; transform: scale(1); }
    20% { opacity: 1; transform: scale(1.05); }
    40% { transform: scale(0.95); }
    60% { transform: scale(1.02); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

/* Responsive design for bubbles */
@media (max-width: 650px) {
    .customer-bubbles-container {
        gap: 10px;
    }

    .customer-bubble {
        width: 140px;
        min-height: 70px;
        padding: 8px;
    }

    .bubble-content {
        gap: 5px;
    }

    .bubble-customer-icon {
        width: 35px;
        height: 35px;
    }

    .bubble-customer-text {
        font-size: 0.8rem;
    }

    .bubble-amount {
        font-size: 0.9rem;
        padding: 3px;
    }

    .requested-payment {
        width: 28px;
        height: 28px;
        bottom: -12px;
        right: 2px;
    }

    .requested-payment-icon {
        width: 18px;
        height: 18px;
    }

    .payment-icons-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Frustration Bar */
.frustration-meter {
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 1rem;
    padding: 0.8rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: calc(100% - 2rem);
}

.meter-label {
    color: var(--white);
    font-size: 0.9em;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meter-progress {
    background: var(--pale-grey);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.meter-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--emerald-green), var(--bright-orange));
    transition: width 0.3s ease;
}

/* Fee Increase Animation */
.fee-increase-animation {
    position: absolute;
    top: -20px;
    right: 10px;
    color: var(--vivid-purple);
    font-weight: bold;
    animation: feeIncreaseFloat 1s forwards;
    font-size: 0.9rem;
}

@keyframes feeIncreaseFloat {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 1; transform: translateY(-5px); }
    80% { opacity: 1; transform: translateY(-15px); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* PayPal Balance Animation */
.balance-increase-animation {
    position: absolute;
    top: -20px;
    right: 10px;
    color: var(--purple-blue);
    font-weight: bold;
    animation: balanceIncreaseFloat 1s forwards;
    font-size: 0.9rem;
}

@keyframes balanceIncreaseFloat {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 1; transform: translateY(-5px); }
    80% { opacity: 1; transform: translateY(-15px); }
    100% { opacity: 0; transform: translateY(-20px); }
}

.balance-increase {
    animation: balancePulse 0.5s;
}

@keyframes balancePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: rgba(92, 85, 233, 0.3); }
    100% { transform: scale(1); }
}

/* Withdrawal Bonus Animation */
.withdrawal-bonus-animation {
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    color: var(--bright-orange);
    font-weight: bold;
    animation: withdrawalBonusFloat 2s forwards;
    font-size: 1rem;
    text-align: center;
    text-shadow: 0 0 8px var(--bright-orange);
    z-index: 5;
}

@keyframes withdrawalBonusFloat {
    0% { opacity: 0; transform: translateY(0) scale(0.8); }
    20% { opacity: 1; transform: translateY(-10px) scale(1.1); }
    80% { opacity: 1; transform: translateY(-15px) scale(1); }
    100% { opacity: 0; transform: translateY(-25px) scale(0.9); }
}

/* Fees Paid Display */
.fees-paid {
    position: relative;
    background: linear-gradient(135deg, rgba(167, 0, 241, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
    color: var(--vivid-purple);
    font-weight: 500;
    transition: all 0.3s ease;
}

.fee-increase {
    animation: feePulse 0.5s;
}

    width: 0;
    background: var(--emerald-green);
    transition: width 0.5s;
}

.meter-bar.near-threshold {
    background: linear-gradient(90deg, var(--bright-orange), var(--vivid-purple));
    animation: pulseMeter 1.5s infinite;
}

.meter-value {
    color: var(--white);
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--emerald-green);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: achievementAppear 0.5s ease-out;
    z-index: 1100;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 80%;
}

.achievement-icon {
    font-size: 2.5rem;
}

.achievement-content {
    display: flex;
    flex-direction: column;
}

.achievement-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.achievement-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes achievementAppear {
    0% { opacity: 0; transform: translate(-50%, -60%); }
    50% { opacity: 1; transform: translate(-50%, -48%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Rush Hour Countdown Display */
.rush-hour-countdown-display {
    position: fixed;
    top: 70px;
    right: 20px;
    background: linear-gradient(135deg, var(--oxford-blue) 0%, #1a2942 100%);
    border: 2px solid var(--bright-orange);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--white);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.5);
    z-index: 1005;
    animation: fadeIn 0.3s ease-out;
    max-width: 150px;
    text-align: center;
}

.countdown-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--bright-orange);
}

.countdown-time {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.rush-hour-countdown-display.warning {
    border-color: var(--vivid-purple);
    background: linear-gradient(135deg, var(--oxford-blue) 0%, rgba(167, 0, 241, 0.3) 100%);
    animation: warningPulse 0.5s infinite alternate;
}

.rush-hour-countdown-display.active-rush-hour {
    border-color: var(--bright-orange);
    background: linear-gradient(135deg, var(--oxford-blue) 0%, rgba(255, 117, 7, 0.3) 100%);
    max-width: 250px;
    padding: 0.8rem 1.2rem;
}

.rush-hour-countdown-display .customer-counter {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3px;
}

.rush-hour-countdown-display .customer-count {
    font-weight: 700;
    margin-left: 5px;
    color: var(--white);
}

.counter-pulse {
    animation: counterPulse 0.5s ease-in-out;
}

@keyframes counterPulse {
    0% { transform: scale(1); color: var(--white); }
    50% { transform: scale(1.3); color: var(--bright-orange); }
    100% { transform: scale(1); color: var(--white); }
};
}

.countdown-time.pulse {
    animation: countdownPulse 0.5s infinite alternate;
    color: var(--vivid-purple);
    text-shadow: 0 0 5px var(--vivid-purple);
}

/* Rush Hour Warning Countdown */
.rush-hour-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.95);
    border: 3px solid var(--bright-orange);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    z-index: 1050;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    animation: warningPulse 0.5s infinite alternate;
}

.warning-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bright-orange);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.warning-countdown {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 0 10px var(--bright-orange);
    animation: countdownPulse 1s infinite;
}

@keyframes warningPulse {
    from { box-shadow: 0 0 20px rgba(255, 117, 7, 0.5); }
    to { box-shadow: 0 0 30px rgba(255, 117, 7, 0.8); }
}

@keyframes countdownPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Rush Hour Notification Bar */
.rush-hour-notification {
    position: fixed;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--bright-orange) 0%, #e66700 100%);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--white);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 117, 7, 0.5);
    z-index: 1005;
    animation: slideInRight 0.3s ease-out;
    max-width: 250px;
}

/* Smaller notifications for less intrusive rush hour alerts */
.smaller-notification {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
    max-width: 200px;
}

/* Rush Hour Complete notification */
.rush-hour-complete {
    position: fixed;
    top: 120px;
    right: 12px;
    background: linear-gradient(135deg, var(--emerald-green) 0%, #00a870 100%);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 214, 144, 0.5);
    z-index: 1005;
    animation: slideInRight 0.3s ease-out;
    max-width: 200px;
    height: auto;
    width: auto;
    display: inline-block;
}

.notification-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.customer-counter {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customer-count {
    font-weight: 700;
    margin-left: 5px;
}

.counter-pulse {
    animation: counterPulse 0.5s;
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--white); }
    100% { transform: scale(1); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Rush Hour Complete Message */
.rush-hour-complete {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--emerald-green);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 214, 144, 0.5);
    animation: slideInRight 0.3s ease-out;
    z-index: 1005;
}

/* Fraud Alert Styling removed */

/* Fraud pulse animation removed */

/* Achievements Container */
.achievements-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin: 1rem 0;
}

/* Enhanced Achievements */
.achievement {
    margin: 0;
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    font-weight: 500;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.achievement:hover {
    transform: scale(1.1);
}

#efficientManager {
    background: linear-gradient(135deg, var(--emerald-green) 0%, #00b377 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 214, 144, 0.3);
}

#feeDodger {
    background: linear-gradient(135deg, var(--sky-blue) 0%, #5eb8fc 100%);
    color: var(--oxford-blue);
    box-shadow: 0 4px 12px rgba(151, 215, 253, 0.3);
}

@media (max-width: 650px) {
    .achievement {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .achievement-popup {
        flex-direction: column;
        padding: 1rem;
    }

    .complication-announcement {
        padding: 1.5rem;
    }

    .complication-title {
        font-size: 1.4rem;
    }

    .complication-effect {
        font-size: 1rem;
    }
}


@keyframes pulseMeter {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Enhanced Feedback */.feedback {
    padding: 2rem 4rem;
    font-size: 1.4em;
    line-height: 1.4;
    text-align: center;
    white-space: pre-line;
}

.feedback.wait {
    background: linear-gradient(135deg, var(--oxford-blue) 0%, var(--vivid-purple) 100%);
    animation: waitPulse 1s infinite;
}

.feedback.special {
    background: linear-gradient(135deg, var(--bright-orange) 0%, var(--emerald-green) 100%);
    font-size: 1.6em;
    padding: 3rem 5rem;
    animation: specialPopup 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button States */
.payment-button.waiting {
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    opacity: 0.7;
}

.payment-button.waiting::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--pale-grey), transparent);
    animation: waitingShine 1.5s linear infinite;
}

/* Animations */
@keyframes waitPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes specialPopup {
    0% { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes waitingShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tutorial Popup */
.tutorial-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tutorial-popup.visible {
    opacity: 1;
    visibility: visible;
    animation: tutorialFadeIn 0.5s ease-out;
}

@keyframes tutorialFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--oxford-blue);
    opacity: 0.7;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.tutorial-content {
    position: relative;
    width: 600px;
    height: 400px;
    background-color: var(--pale-grey);
    border-radius: 24px;
    border: 3px solid var(--bright-orange);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--bright-orange);
    overflow: hidden;
    z-index: 1001;
    animation: popIn 0.5s ease-out;
    transition: all 0.3s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tutorial-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: var(--oxford-blue);
    transition: all 0.3s ease;
}

.tutorial-step.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.tutorial-heading {
    font-family: 'Monument Extended', Arial Black, Arial, sans-serif;
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--oxford-blue);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.tutorial-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--bright-orange);
    border-radius: 1.5px;
    transition: all 0.3s ease;
}

.tutorial-image-container {
    width: 300px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 16px;
    background-color: rgba(15, 23, 42, 0.05);
    transition: all 0.3s ease;
}

.tutorial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.payment-icons-tutorial {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
    width: 300px;
    height: 100px;
    background-color: var(--pale-grey);
    transition: all 0.3s ease;
}

.tutorial-payment-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.tutorial-payment-icon:hover {
    transform: scale(1.1);
}

.lightning-container {
    background-color: var(--bright-orange);
    width: 300px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.lightning-icon-large {
    width: 100px;
    height: 100px;
    animation: spark 1.5s infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    transition: all 0.3s ease;
}

@keyframes spark {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
}

.tutorial-text {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
    color: var(--oxford-blue);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    max-width: 90%;
    transition: all 0.3s ease;
}

.tutorial-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    transition: all 0.3s ease;
}

.tutorial-button {
    width: 150px;
    height: 50px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.next-button, .start-button {
    background: linear-gradient(135deg, var(--bright-orange) 0%, #e66700 100%);
    color: var(--white);
    animation: pulse 1.5s infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Monument Extended', Arial Black, Arial, sans-serif;
    font-weight: 600;
}

.prev-button, .skip-button {
    background: linear-gradient(135deg, var(--vivid-purple) 0%, #8500c1 100%);
    color: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Monument Extended', Arial Black, Arial, sans-serif;
    font-weight: 600;
}

.tutorial-button:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(255, 117, 7, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 117, 7, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 117, 7, 0);
        transform: scale(1);
    }
}

/* Media queries for responsive design */
@media (max-width: 767px) {
    /* Small screens */
    .tutorial-content {
        width: 90%;
        height: 300px;
    }

    .tutorial-heading {
        font-size: 1.5rem;
    }

    .tutorial-text {
        font-size: 0.9rem;
        max-width: 95%;
    }

    .tutorial-image-container,
    .payment-icons-tutorial,
    .lightning-container {
        width: 200px;
        height: 80px;
    }

    .lightning-container {
        height: 100px;
    }

    .tutorial-payment-icon {
        width: 40px;
        height: 40px;
    }

    .lightning-icon-large {
        width: 80px;
        height: 80px;
    }

    .tutorial-button {
        width: 120px;
        height: 40px;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .tutorial-step {
        padding: 1.5rem 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Medium screens */
    .tutorial-content {
        width: 80%;
        height: 350px;
    }

    .tutorial-heading {
        font-size: 1.8rem;
    }

    .tutorial-text {
        font-size: 1rem;
    }

    .tutorial-image-container,
    .payment-icons-tutorial,
    .lightning-container {
        width: 250px;
        height: 100px;
    }

    .lightning-icon-large {
        width: 90px;
        height: 90px;
    }

    .tutorial-payment-icon {
        width: 50px;
        height: 50px;
    }

    .tutorial-button {
        width: 140px;
        height: 45px;
    }
}

@media (min-width: 1024px) {
    /* Large screens */
    .tutorial-content {
        width: 600px;
        height: 400px;
    }

    .tutorial-heading {
        font-size: 2rem;
    }

    .tutorial-text {
        font-size: 1.1rem;
        max-width: 85%;
    }

    .tutorial-button {
        width: 150px;
        height: 50px;
    }
}

/* Button Penalties */
.button-penalty {
    font-size: 0.8em;
    margin-top: 0.5rem;
    color: var(--pale-grey);
    opacity: 0.8;
}

/* Enhanced Frustration Meter */
.frustration-meter {
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* Mobile-friendly styles for touch interactions */
@media (max-width: 800px) {
    .payment-icon-wrapper {
        padding: 15px;
        min-height: 70px;
    }

    .payment-icon {
        width: 40px;
        height: 40px;
    }

    .customer-bubble {
        min-height: 80px;
        padding: 12px;
    }

    .payment-icon-wrapper.selected {
        box-shadow: 0 0 25px var(--bright-orange);
        position: relative;
        z-index: 5;
    }

    .customer-bubble.droppable,
    .payment-selected .customer-bubble:hover {
        transform: scale(1.05);
        box-shadow: 0 0 15px var(--emerald-green);
        border-color: var(--emerald-green);
    }
    
    /* Enhanced button alignment for small screens */
    .cta-button, .secondary-button, .desktop-start-button, .desktop-skip-button {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
        width: 80%;
        max-width: 250px;
    }
    
    /* Center buttons in tutorial */
    .tutorial-nav {
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .tutorial-button {
        min-width: 120px;
        padding: 0.8rem 1rem;
        text-align: center;
    }
}

/* Tutorial update for touch interaction */
#tutorial-step-2 .tutorial-text {
    line-height: 1.6;
}

.meter-label {
    color: var(--white);
    font-size: 0.9em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meter-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin: 0.8rem 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.meter-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--emerald-green), var(--bright-orange));
    transition: width 0.3s ease;
}

.meter-bar.near-threshold {
    background: linear-gradient(90deg, var(--bright-orange), var(--vivid-purple));
    animation: pulseMeter 1s infinite;
}

.meter-value {
    color: var(--white);
    font-size: 0.8em;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* Button States */
.payment-button.waiting {
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    opacity: 0.7;
}

.payment-button.waiting::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--pale-grey), transparent);
    animation: waitingShine 1.5s linear infinite;
}

/* Cooldown Progress */
.cooldown-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--pale-grey);
    transform-origin: left;
    animation: shrinkProgress 3s linear forwards;
}

/* New Animations */
@keyframes waitingShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulseMeter {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shrinkProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}


/* PayPal Balance */
.paypal-balance {
    background: linear-gradient(135deg, var(--purpleblue) 0%, #4540ba 100%);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Withdraw Button */
.withdraw {
    background: linear-gradient(135deg, var(--purple-blue) 0%, #4540ba 100%);
    grid-column: span 3;
    margin-top: 0.5rem;
}

/* Button States */
.payment-button.cooldown {
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    opacity: 0.7;
}

.payment-button.cooldown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, var(--pale-grey));
    opacity: 0.3;
    animation: cooldownWave 3s linear;
}

.payment-button.cooldown::after {
    content: attr(data-cooldown);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--pale-grey);
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Button Penalties */
.button-penalty {
    font-size: 0.8em;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Cooldown Timer */
.cooldown-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--pale-grey);
    transform-origin: left;
    z-index: 5;
}

/* Cooldown Text Display */
.cooldown-text {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    z-index: 5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Cooldown Pulse Overlay */
.cooldown-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--pale-grey);
    opacity: 0.4;
    border-radius: 12px;
    z-index: 2;
    animation: cooldownPulse 1.2s infinite alternate;
    pointer-events: none;
}

/* Cooldown Styles for Payment Icons */
.payment-icon-wrapper.cooldown {
    position: relative;
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(80%);
    transform: none !important;
    transition: all 0.3s ease;
}

.payment-icon-wrapper.cooldown .payment-icon {
    transform: none !important;
    box-shadow: none !important;
}

.payment-icon-wrapper.cooldown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--pale-grey);
    opacity: 0.2;
    border-radius: 12px;
    z-index: 1;
}

@keyframes shrinkWidth {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes cooldownPulse {
    from { opacity: 0.2; }
    to { opacity: 0.4; }
}

.timer-bar-progress {
    height: 100%;
    background: var(--emerald-green);
    transition: width 0.5s;
}

.timer-bar-progress.urgent {
    background: var(--vivid-purple);
    animation: urgentPulse 1s infinite;
}

.timer {
    color: var(--emerald-green);
    font-weight: 600;
}

.timer.urgent {
    color: var(--vivid-purple);
    animation: urgentPulse 1s infinite;
}

/* Add transition for smoother animations */
.customer-bubble, .payment-icon-wrapper {
    transition: all 0.5s ease;
}

/* Add Bright Orange glow/trail during drag */
.payment-icon-wrapper.dragging {
    box-shadow: 0 0 10px var(--bright-orange);
    filter: drop-shadow(0 0 8px var(--bright-orange));
}

/* Add Emerald Green trail during drag */
.payment-icon-wrapper.dragging.bank {
    filter: drop-shadow(0 0 8px var(--emerald-green));
}

/* Fade out glow/trail on drop */
.payment-icon-wrapper.dropped {
    box-shadow: none;
    filter: none;
}

/* Add opacity transition for fade-in/out */
.customer-bubble {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Add transform transition for slide animation */
.customer-bubble {
    transform: translateY(20px);
    animation: slideIn 0.5s forwards;
}

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

/* Remove customer bubble with fade-out */
.customer-bubble.removed {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Lightning Progress and Unlock Styles */
#lightning-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    width: 0%;
    background: var(--emerald-green);
    border-radius: 0 0 0 12px;
    transition: width 0.5s ease;
    z-index: 2;
}

/* Additional progress label that floats above the progress bar */
.lightning-progress-label {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--emerald-green);
    font-size: 0.7rem;
    font-weight: 500;
    pointer-events: none;
}

#lightning-progress.unlocked {
    background: var(--bright-orange);
    width: 100%;
    height: 8px;
}

.lightning-glow {
    box-shadow: 0 0 15px var(--bright-orange), 0 0 30px var(--bright-orange);
    animation: glowPulse 2s infinite alternate;
}

/* New Lightning progress effects */
.lightning-progress-glow {
    box-shadow: 0 0 var(--glow-intensity) var(--bright-orange);
    transition: box-shadow 0.5s ease;
}

.payment-icon-wrapper.lightning {
    transition: background-color 0.8s ease, opacity 0.8s ease, box-shadow 0.8s ease;
}

.payment-icon-wrapper.lightning.disabled {
    cursor: default; /* Allow hover effects even when disabled */
}

.payment-icon-wrapper.lightning:hover .payment-icon {
    transform: scale(1.05); /* Slightly reduce the hover scale for disabled state */
}

@keyframes progressPulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Pulse animation for the progress bar */
.pulse-animation {
    animation: progressPulse 0.5s ease;
}

.lightning-active-aura {
    position: relative;
}

.lightning-active-aura::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 16px;
    background: transparent;
    border: 2px solid var(--bright-orange);
    animation: expandAura 1.5s infinite;
    pointer-events: none;
    z-index: 1;
}

.payment-label.lightning-active {
    color: var(--bright-orange);
    font-weight: 700;
    text-shadow: 0 0 5px var(--bright-orange);
    animation: pulseBrighter 1s infinite alternate;
}

.payment-icon-wrapper.lightning.disabled {
    background: var(--pale-grey);
    filter: grayscale(80%);
}

.star-animation {
    position: relative;
    overflow: visible !important;
}

.star-animation::after {
    content: '✨';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 20px;
    animation: spin 2s linear infinite;
    z-index: 10;
}

.lightning-countdown {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bright-orange);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 117, 7, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.lightning-countdown.time-critical {
    animation: pulseBrighter 0.5s infinite alternate;
}

.lightning-clickable {
    cursor: pointer !important;
    position: relative;
    transition: transform 0.3s ease;
}

.lightning-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--bright-orange), 0 0 30px var(--bright-orange) !important;
}

.lightning-clickable::after {
    content: 'CLICK TO ACTIVATE';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: var(--bright-orange);
    text-shadow: 0 0 5px var(--bright-orange);
    animation: pulseBrighter 1s infinite alternate;
    pointer-events: none;
}

.unlock-shake {
    animation: unlockShake 0.5s ease-out;
}

@keyframes unlockShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px) rotate(-5deg); }
    40% { transform: translateX(8px) rotate(5deg); }
    60% { transform: translateX(-5px) rotate(-3deg); }
    80% { transform: translateX(5px) rotate(3deg); }
}

@keyframes expandAura {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 0.3; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

@keyframes glowPulse {
    from { box-shadow: 0 0 15px var(--bright-orange), 0 0 25px var(--bright-orange); }
    to { box-shadow: 0 0 25px var(--bright-orange), 0 0 40px var(--bright-orange); }
}

@keyframes pulseBrighter {
    from { opacity: 0.8; }
    to { opacity: 1; filter: brightness(1.2); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseText {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Lightning Unlock Message */
.lightning-unlock-message {
    background: var(--bright-orange);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    border: 3px solid var(--white);
    box-shadow: 0 0 30px rgba(255, 117, 7, 0.5);
    color: var(--white);
    animation: glow 1.5s infinite alternate;
}

.lightning-unlock-message h2 {
    font-family: 'Monument Extended', Arial Black, Arial, sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.lightning-unlock-message p {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightning-relock-notification {
    position: absolute;
    top: -25px;
    width: 100%;
    text-align: center;
    font-weight: 600;
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Lightning active customer bubbles */
.customer-bubble.lightning-active-bubble {
    transition: all 0.3s ease;
    border: 3px solid var(--bright-orange);
    position: relative;
}

.customer-bubble.lightning-active-bubble::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 16px;
    border: 2px solid var(--bright-orange);
    animation: pulseBorder 1.2s infinite;
    pointer-events: none;
    z-index: 1;
}

.customer-bubble.lightning-hover {
    cursor: pointer;
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--bright-orange), 0 0 30px var(--bright-orange);
    border-color: var(--bright-orange);
    transition: all 0.2s ease;
}

.customer-bubble.lightning-hover .bubble-content {
    animation: brightPulse 0.8s infinite alternate;
}

@keyframes brightPulse {
    from { filter: brightness(1); }
    to { filter: brightness(1.3); }
}

@keyframes pulseBorder {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

/* Click instructions in Lightning unlock modal */
.click-instructions {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 10px;
    background: var(--white);
    color: var(--bright-orange);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}
/* Rush Hour styles removed - we're letting the customer spam speak for itself */
/* Score visual feedback animations */
.score-increase {
    animation: pulseGreen 0.5s;
    text-shadow: 0 0 10px var(--emerald-green);
    transition: all 0.3s ease;
}

.score-decrease {
    animation: pulseRed 0.5s;
    text-shadow: 0 0 10px var(--vivid-purple);
    transition: all 0.3s ease;
}

@keyframes pulseGreen {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); text-shadow: 0 0 15px var(--emerald-green); }
    100% { transform: scale(1); }
}

@keyframes pulseRed {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); text-shadow: 0 0 15px var(--vivid-purple); }
    100% { transform: scale(1); }
}

/* Particle animation styles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFly 1s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes particleFly {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y));
        opacity: 0;
    }
}

/* Ensure the game container has proper positioning */
#game-container {
    position: relative;
    overflow: hidden;
}
/* Compact notification for rush hour completion */
.compact-notification {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--oxford-blue) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid var(--emerald-green);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    z-index: 1010;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
    max-width: 300px;
}

.compact-notification.fade-out {
    animation: fadeOut 0.5s ease-in forwards;
}

/* Customer count pulse effect */
.customer-count.counter-pulse {
    animation: counterPulse 0.5s ease-in-out;
    color: var(--bright-orange);
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--white); }
    100% { transform: scale(1); }
}

/* End Screen */
.game-stats {
    margin: 1.5rem 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.stats-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    width: 80%;
    max-width: 500px;
}

.stat-item {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: 1.1em;
    margin: 0.5rem 0;
    color: var(--white);
    display: flex;
    justify-content: space-between;
}

.stat-item span {
    font-weight: 600;
}

.stats-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--bright-orange), var(--emerald-green));
    margin: 1rem 0;
    border-radius: 1px;
}

.end-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
}

.secondary-button {
    background: linear-gradient(135deg, var(--vivid-purple) 0%, #8500c1 100%);
    color: var(--white);
    padding: 1.2rem 3rem;
    border: none;
    border-radius: 16px;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(167, 0, 241, 0.3);
    width: 200px;
    text-align: center;
}

.secondary-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(167, 0, 241, 0.5);
}

@media (min-width: 800px) {
    .end-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    .cta-button, .secondary-button {
        margin-left: 10px;
        margin-right: 10px;
        width: 200px;
    }
}