* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Instrument Serif', serif;
    background-color: #000000;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Blurred background layer with raining logos */
.logo-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* ADJUST HERE FOR BLUR EFFECT: 0 (no blur) to 100 (max blur) - value in pixels */
    filter: blur(2px);
    opacity: 0.3;
    overflow: hidden;
}

.falling-logo {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.6;
    pointer-events: none;
}

.falling-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Foreground content */
.content {
    position: relative;
    z-index: 2;
    height: 100vh;
    text-align: center;
}

.header-text {
    position: absolute;
    top: 25vh;
    left: 50%;
    transform: translate(-50%, -50%);
}

.header-text p {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Intro one-liner pop after 0.6s */
.intro-line {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    animation: popIn 300ms ease-out 600ms forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: translateY(8px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.main-title {
    position: absolute;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}

/* Title glow + scale shortly after intro appears */
.main-title {
    text-shadow: 0 0 0 rgba(255,255,255,0);
    filter: drop-shadow(0 0 0 rgba(255,255,255,0));
    animation: glowScale 800ms ease-out 1000ms forwards;
}

@keyframes glowScale {
    0% {
        transform: translate(-50%, -50%) scale(0.98);
        text-shadow: 0 0 0 rgba(255,255,255,0);
        filter: drop-shadow(0 0 0 rgba(255,255,255,0));
    }
    60% {
        transform: translate(-50%, -50%) scale(1.06);
        text-shadow: 0 0 10px rgba(255,255,255,0.5), 0 0 20px rgba(255,255,255,0.25);
        filter: drop-shadow(0 0 6px rgba(255,255,255,0.35));
    }
    100% {
        transform: translate(-50%, -50%) scale(1.06);
        text-shadow: 0 0 8px rgba(255,255,255,0.35), 0 0 16px rgba(255,255,255,0.2);
        filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
    }
}

/* Game UI */
.game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Floating score pop */
.floating-score {
    position: fixed;
    pointer-events: none;
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255,215,0,0.8), 0 0 20px rgba(255,215,0,0.5);
    animation: floatUp 600ms ease-out forwards;
    z-index: 20;
}

@keyframes floatUp {
    0% { opacity: 0; transform: translateY(0) scale(0.9); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-40px) scale(1); }
}

.score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.time-left {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    color: #ffffff;
    font-weight: 400;
    font-size: 28px;
    white-space: nowrap;
}

.timer-icon svg {
    display: block;
}

.timer-text {
    font-size: 28px;
    letter-spacing: 1px;
}

.score-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.coin-icon {
    width: 32px;
    height: 32px;
    animation: coinSpin 3s linear infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.4));
    transition: all 0.3s ease;
}

.coin-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 1)) drop-shadow(0 0 32px rgba(255, 215, 0, 0.6));
}

.coin-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.game-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 12px 24px;
    color: #ffffff;
    font-family: 'Instrument Serif', serif;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.game-button:active {
    transform: translateY(0);
}

.button-text {
    display: block;
    white-space: nowrap;
}

/* Bucket */

/* Money Bag Bucket */
.bucket {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: none;
    width: 180px; /* Matches BUCKET_WIDTH in JS */
    height: 130px;
    background-color: transparent;
    z-index: 5;
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.3s ease;
    overflow: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    border: none;
    outline: none;
}

.bucket.visible {
    opacity: 1;
}


/* Catch reaction */
.bucket.catch {
    transform: translateY(-6px) scale(1.03);
}

/* Game mode styles */
body.game-mode .content {
    transform: translateY(100vh);
    opacity: 0.3;
    filter: blur(5px);
    transition: all 0.8s ease;
}

body.game-mode .logo-rain-container {
    filter: none;
    opacity: 1;
    z-index: 3;
}

body.game-mode .falling-logo {
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.game-mode .falling-logo:hover {
    transform: scale(1.1);
}

body.game-mode .score-display {
    opacity: 1;
    transform: translateY(0);
}

body.game-mode .bucket {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-text p {
        font-size: 16px;
    }
    
    .main-title {
        font-size: 60px;
    }
    
    .game-button {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .score-display {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header-text p {
        font-size: 14px;
    }
    
    .main-title {
        font-size: 40px;
    }
    
    .game-button {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .score-display {
        font-size: 18px;
    }
}

/* Game Over overlay */
.game-over-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(80% 60% at 50% 40%, rgba(0,0,0,0.5), rgba(0,0,0,0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.game-over-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.game-over-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 28px 28px 22px;
    width: min(520px, 92vw);
    box-shadow: 0 12px 48px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.06);
    transform: translateY(10px) scale(0.96);
    opacity: 0;
    transition: all 300ms ease;
}

.game-over-overlay.visible .game-over-card {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: popSlight 220ms ease-out;
}

@keyframes popSlight {
    0% { transform: translateY(4px) scale(0.96); }
    70% { transform: translateY(0) scale(1.03); }
    100% { transform: translateY(0) scale(1); }
}

.retro-title {
    font-size: 48px;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.35), 0 0 18px rgba(255,255,255,0.2);
    margin-bottom: 12px;
    line-height: 1.2;
}

.final-score {
    font-size: 22px;
    color: #ffffffcc;
    margin-bottom: 20px;
}

.claim-row {
    display: flex;
    gap: 12px;
}

.btn {
    border: none;
    cursor: pointer;
    font-family: 'Instrument Serif', serif;
    font-size: 16px;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 200ms ease;
}

.btn.glass.white {
    color: #000;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 6px 22px rgba(255,255,255,0.25), 0 0 0 1px rgba(255,255,255,0.5) inset;
}

.btn.glass.white:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(255,255,255,0.35);
}

.btn.glass.white.wide { width: 100%; }

.btn.ghost {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn.ghost:hover {
    background: rgba(255,255,255,0.08);
}

/* Email Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

.modal-backdrop.visible { opacity: 1; pointer-events: all; }

.modal {
    position: relative;
    width: min(460px, 92vw);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.06);
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: all 250ms ease;
}

.modal-backdrop.visible .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-head { font-size: 24px; color: #fff; margin-bottom: 6px; }
.modal-sub { font-size: 14px; color: #ffffffb3; margin-bottom: 14px; }

.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.3);
    color: #fff;
    outline: none;
    margin-bottom: 12px;
}

.modal-foot { font-size: 12px; color: #ffffffb3; margin-top: 8px; }

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
}


