:root {
    --gold: #c5a059;
    --gold-glow: #e6c17a;
    --gold-light: #f3e5ab;
    --gold-dark: #8e6d31;
    --bg-dark: #050505;
    --glass-bg: rgba(15, 15, 15, 0.7);
    --glass-border: rgba(197, 160, 89, 0.25);
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
}

/* 🚫 Strictly hide game on desktop/large screens */
@media screen and (min-width: 1001px) {
    #game_section {
        display: none !important;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: #000;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(10, 25, 47, 0.4) 0%, transparent 40%);
    color: var(--text-main);
    margin: 0;
    padding: 20px 15px;
    min-height: 100vh;
}

.master-card {
    max-width: 600px;
    margin: 30px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px 30px;
    border-radius: 35px;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(197, 160, 89, 0.05),
        inset 0 0 40px rgba(197, 160, 89, 0.03);
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1.1) forwards;
}

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

.header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.logo-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 25px auto;
    border-radius: 50%;
    border: 3px solid var(--gold);
    overflow: hidden;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 50px var(--gold);
    opacity: 0;
    animation: glowPulse 3s infinite 1.5s;
    z-index: -1;
}

@keyframes logoReveal {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        transform: scale(1.6) rotate(0deg);
        opacity: 1;
        filter: blur(0);
    }
}

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

.header h1 {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light) 50%, var(--gold-dark));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.header .subtitle {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--gold-light);
    text-transform: uppercase;
    font-weight: 300;
}

.header .founder-sig {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    font-family: 'Times New Roman', serif;
}

.quality-promise {
    text-align: center;
    font-size: 15px;
    color: #d0d0d0;
    background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.05), transparent);
    padding: 20px;
    margin-bottom: 30px;
    line-height: 1.8;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.section {
    background: rgba(255, 255, 255, 0.02);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, background 0.3s ease;
}

.section:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
}

.section-title {
    font-size: 15px;
    color: var(--gold);
    font-weight: 900;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 18px;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark));
    border-radius: 4px;
    box-shadow: 0 0 15px var(--gold);
}

label {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
    color: #e0e0e0;
}

input,
textarea,
select {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: 'Cairo';
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 18px;
}

.selection-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: visible;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, border-color 0.3s ease;
}

.selection-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}

.selection-card.selected {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.15), rgba(197, 160, 89, 0.05));
    box-shadow: 
        0 0 25px rgba(197, 160, 89, 0.2),
        inset 0 0 10px rgba(197, 160, 89, 0.1);
    transform: translateY(-3px) scale(1.02);
}

.selection-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--gold);
    font-weight: bold;
}

.card-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.card-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    margin-bottom: 6px;
    display: block;
}

.card-desc {
    font-size: 12px;
    color: #e6e6e6;
    line-height: 1.5;
    display: block;
}

.addon-group {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.addon-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.addon-item:hover {
    background: rgba(212, 175, 55, 0.05);
}

.addon-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    margin: 0;
    box-shadow: none;
    border: none;
}

.btn-brew {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    background-size: 200% auto;
    color: #000;
    border: none;
    padding: 18px 24px;
    width: 100%;
    border-radius: 20px;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
    margin-top: 30px;
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-brew:hover {
    background-position: right center;
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(197, 160, 89, 0.5);
}

.btn-brew::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: 0.5s;
}

.btn-brew:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.3);
}

.btn-brew:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.form-hidden {
    display: none;
    margin-top: 15px;
    animation: slideDown 0.4s ease;
}

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

.footer {
    text-align: center;
    font-size: 11px;
    color: #555;
    margin-top: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   PROFESSIONAL LUXURY GAME CSS
   ============================================= */

#game_section {
    background: linear-gradient(160deg, #0d0a04, #1a1200, #0d0a04);
    border: 2px solid var(--gold);
    text-align: center;
    display: block; /* Default to show for progressive enhancement */
    position: relative;
    z-index: 10;
    padding: 30px 20px 35px;
    border-radius: 28px;
    box-shadow:
        0 30px 70px rgba(0,0,0,0.95),
        inset 0 0 60px rgba(197,160,89,0.08),
        0 0 30px rgba(197,160,89,0.15);
    overflow: hidden;
}

#game_section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.12) 0%, transparent 65%);
    pointer-events: none;
}

/* ── Game Title ─────────────────────── */
.game-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.game-badge {
    background: linear-gradient(135deg, var(--gold), #8e6d31);
    color: #000;
    font-size: 9px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ── Level Track ────────────────────── */
.game-levels-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
}

.level-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(212,175,55,0.25);
    transition: all 0.4s ease;
    position: relative;
}

.level-dot.active {
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold), 0 0 25px rgba(212,175,55,0.5);
    transform: scale(1.4);
    border-color: var(--gold-light);
}

.level-dot.passed {
    background: #4CAF50;
    box-shadow: 0 0 8px #4CAF50;
    border-color: #4CAF50;
}

/* ── Timing Bar ─────────────────────── */
.timing-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 18px 0 10px;
    user-select: none;
}

.timing-bar {
    width: 100%;
    height: 110px;
    background: linear-gradient(to bottom, #0a0700, #1a1200, #0a0700);
    border: 1.5px solid rgba(197,160,89,0.3);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 40px rgba(0,0,0,0.95),
        0 0 20px rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
}

/* Subtle track lines */
.timing-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 40px,
            rgba(255,255,255,0.02) 40px,
            rgba(255,255,255,0.02) 41px);
    pointer-events: none;
}

/* ── Target Zone (center) ───────────── */
.target-zone {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 96%;
    height: 48px;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(76,175,80,0.12) 30%,
        rgba(76,175,80,0.25) 50%,
        rgba(76,175,80,0.12) 70%,
        transparent 100%);
    border-top: 2px solid rgba(76,175,80,0.6);
    border-bottom: 2px solid rgba(76,175,80,0.6);
    z-index: 5;
    pointer-events: none;
}

.target-zone::before {
    content: '🎯';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    opacity: 0.8;
    animation: targetBounce 1.5s infinite ease-in-out;
}

@keyframes targetBounce {
    0%,100% { transform: translate(-50%, -50%) translateY(0); opacity:0.6; }
    50% { transform: translate(-50%, -50%) translateY(-4px); opacity:1; }
}

.target-pulse {
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(76,175,80,0.4);
    border-radius: 4px;
    animation: targetRing 2s infinite ease-in-out;
    pointer-events: none;
}

@keyframes targetRing {
    0%,100% { opacity:0.3; transform:scale(1); }
    50% { opacity:0.8; transform:scale(1.06); }
}

/* Near-miss zones */
.near-zone-left, .near-zone-right {
    position: absolute;
    top: 50%;
    width: 14%;
    height: 40px;
    background: rgba(255,200,0,0.05);
    border: 1px solid rgba(255,200,0,0.15);
    z-index: 4;
    pointer-events: none;
    transform: translateY(-50%);
}
.near-zone-left  { left: 16%; }
.near-zone-right { right: 16%; }

/* Bar flash feedback */
.timing-bar.hit-flash {
    animation: barFlashGreen 0.6s ease forwards;
}
.timing-bar.miss-flash {
    animation: barFlashRed 0.5s ease forwards;
}

@keyframes barFlashGreen {
    0%   { box-shadow: inset 0 0 40px rgba(0,0,0,0.95), 0 0 40px rgba(76,175,80,0.8); border-color: #4CAF50; }
    100% { box-shadow: inset 0 0 40px rgba(0,0,0,0.95), 0 0 20px rgba(0,0,0,0.7); border-color: rgba(197,160,89,0.3); }
}

@keyframes barFlashRed {
    0%   { box-shadow: inset 0 0 40px rgba(0,0,0,0.95), 0 0 40px rgba(255,60,60,0.7); border-color: #ff3c3c; }
    100% { box-shadow: inset 0 0 40px rgba(0,0,0,0.95), 0 0 20px rgba(0,0,0,0.7); border-color: rgba(197,160,89,0.3); }
}

/* ── The Moving Key ─────────────────── */
.luxury-key {
    position: absolute;
    height: 60px;
    width: 130px;
    z-index: 100;
    pointer-events: none;
    display: flex;
    align-items: center;
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.8)) drop-shadow(0 4px 8px rgba(0,0,0,0.8));
    will-change: left;
    top: 50%;
    transform: translateY(-50%);
}

.key-handle {
    width: 46px;
    height: 46px;
    background: radial-gradient(circle at 35% 30%, #fff5c0, var(--gold-glow), var(--gold), var(--gold-dark));
    border: 3px solid var(--gold-light);
    border-radius: 50%;
    position: relative;
    box-shadow:
        0 0 15px rgba(212,175,55,0.7),
        inset 0 2px 4px rgba(255,255,255,0.5),
        inset 0 -2px 4px rgba(0,0,0,0.4);
    flex-shrink: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-handle::after {
    content: 'FS';
    font-size: 13px;
    font-weight: 900;
    color: rgba(0,0,0,0.75);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.5px;
}

.key-shaft {
    flex: 1;
    height: 13px;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.4) 0%,
        var(--gold-light) 10%,
        var(--gold) 50%,
        var(--gold-dark) 90%,
        rgba(0,0,0,0.2) 100%);
    margin-left: -4px;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.6), inset 0 1px 2px rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}

/* Shaft shine sweep */
.key-shaft::after {
    content: '';
    position: absolute;
    top: 0; left: -40%; width: 40%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.5), transparent);
    animation: shaftShine 3s infinite ease-in-out;
}

@keyframes shaftShine {
    0%   { left: -40%; }
    40%  { left: 130%; }
    100% { left: 130%; }
}

.key-bit {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 22px;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold), var(--gold-dark));
    border-radius: 2px 3px 3px 2px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
}

.key-bit::before {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 3px;
    width: 5px;
    height: 9px;
    background: var(--gold-dark);
    box-shadow: 8px 0 0 var(--gold-dark);
    border-radius: 0 0 2px 2px;
}

/* Key insert & turn animation */
.key-inserting {
    animation: keyInsertAndTurn 1.1s forwards cubic-bezier(0.4,0,0.2,1) !important;
}

@keyframes keyInsertAndTurn {
    0%   { filter: drop-shadow(0 0 10px rgba(212,175,55,0.8)); }
    30%  { transform: translateY(-50%) scale(0.85) translateX(20px); }
    60%  { transform: translateY(-50%) scale(0.75) translateX(22px) rotate(80deg);
            filter: drop-shadow(0 0 20px rgba(76,175,80,0.9)); }
    100% { transform: translateY(-50%) scale(0.5) translateX(30px) rotate(90deg); opacity: 0; }
}

/* ── Coffee Brew Challenge ─────────────────── */
.treasure-chest-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 95px;
    z-index: 10;
    perspective: 1200px;
}

.chest-image {
    display: none;
}

.chest-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 70px;
    background: radial-gradient(circle at 50% 20%, #c67d3f, #4b250d 65%);
    border: 2px solid rgba(212,175,55,0.8);
    border-radius: 24px 24px 18px 18px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.9), inset 0 0 22px rgba(255,255,255,0.05);
}

.chest-trim {
    position: absolute;
    width: 100%; height: 100%;
    pointer-events: none;
}

.chest-trim::before, .chest-trim::after {
    content: '';
    position: absolute;
    width: 10px; height: 100%;
    background: linear-gradient(to right, #7a5c20, #d4af37, #7a5c20);
    top: 0;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
    border-radius: 2px;
}

.chest-trim::before { left: 12%; }
.chest-trim::after  { right: 12%; }

.chest-lid {
    position: absolute;
    top: 0; width: 100%; height: 36px;
    background: radial-gradient(circle at 50% 35%, #f5d293, #9b5e2d 55%, #63341a);
    border: 2px solid rgba(212,175,55,0.8);
    border-radius: 50% 50% 40% 40%;
    transform-origin: bottom center;
    transition: transform 1.1s cubic-bezier(0.4,0,0.2,1);
    z-index: 3;
    box-shadow: inset 0 2px 10px rgba(255,255,255,0.12), 0 -4px 12px rgba(0,0,0,0.45);
}

.chest-lid::after {
    content: '';
    position: absolute;
    top: 12px; left: 16%; width: 20%; height: 4px;
    background: rgba(255,255,255,0.6);
    border-radius: 999px;
    opacity: 0.9;
    box-shadow: 0 0 8px rgba(255,255,255,0.15);
}

.chest-lock {
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 22px;
    background: linear-gradient(135deg, #40220a, #8b5d2f);
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 22px;
    z-index: 4;
    box-shadow: 0 5px 12px rgba(0,0,0,0.5), inset 0 0 12px rgba(255,255,255,0.08);
}

.chest-keyhole {
    display: none;
}

.chest-keyhole::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 8px; height: 8px;
    background: #000;
    border-radius: 50%;
}

.chest-keyhole::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 5px; height: 8px;
    background: #000;
    border-radius: 1px;
    animation: keyholeGlow 2s infinite ease-in-out;
}

@keyframes keyholeGlow {
    0%,100% { box-shadow: 0 0 4px rgba(212,175,55,0.2); }
    50%      { box-shadow: 0 0 8px rgba(212,175,55,0.6); }
}

/* God Rays */
.chest-rays {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(212,175,55,0.5) 0%, transparent 65%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: all 1.1s ease;
}

.chest-rays::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(from 0deg, transparent 0deg 22deg, rgba(212,175,55,0.25) 22deg 44deg);
    animation: rotateRays 12s linear infinite;
    mask-image: radial-gradient(circle, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 0%, transparent 70%);
}

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

.chest-open .chest-rays {
    transform: translate(-50%, -120%) scale(2.5);
    opacity: 1;
}

.chest-open .chest-lid {
    transform: rotateX(-90deg);
}

.chest-shake {
    animation: chestShake 0.55s ease-in-out;
}

@keyframes chestShake {
    0%,100% { transform: translate(-50%,-50%) rotate(0deg); }
    15%      { transform: translate(-50%,-50%) translateX(-6px) rotate(-2.5deg); }
    35%      { transform: translate(-50%,-50%) translateX(6px)  rotate(2.5deg);  }
    55%      { transform: translate(-50%,-50%) translateX(-4px) rotate(-1.5deg); }
    75%      { transform: translate(-50%,-50%) translateX(4px)  rotate(1.5deg);  }
}

/* Prize Reveal */
.prize-reveal {
    position: absolute;
    top: 18px; left: 50%;
    transform: translateX(-50%) scale(0);
    width: 100%; text-align: center;
    color: var(--gold-light);
    font-weight: 900;
    font-size: 28px;
    text-shadow: 0 0 30px var(--gold), 0 0 12px #fff;
    opacity: 0;
    transition: all 0.9s 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    z-index: 12;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}

.prize-reveal span {
    font-size: 13px;
    color: #fff;
    letter-spacing: 1px;
    opacity: 0.95;
}

.chest-open .prize-reveal {
    transform: translateX(-50%) translateY(-75px) scale(1.3);
    opacity: 1;
}

/* Magic glow */
.magic-glow {
    position: absolute;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(212,175,55,0.35) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    transition: all 1.2s cubic-bezier(0.4,0,0.2,1);
}

.chest-open .magic-glow {
    transform: translate(-50%,-80%) scale(2);
    opacity: 0;
}

/* ── Glint Effect ───────────────────── */
.glint { position: relative; overflow: hidden !important; }

.glint::after {
    content: '';
    position: absolute;
    top: -50%; left: -150%;
    width: 80%; height: 200%;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(255,255,255,0) 25%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0) 75%,
        transparent 100%);
    transform: rotate(20deg);
    animation: glintEffect 5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes glintEffect {
    0%   { left: -150%; }
    18%  { left: 150%; }
    100% { left: 150%; }
}

/* ── Game Status & Buttons ──────────── */
.game-status-text {
    margin-top: 12px;
    font-size: 15px;
    text-align: center;
    min-height: 44px;
    color: #e0e0e0;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    transition: color 0.3s;
}

.glow-win {
    color: var(--gold);
    text-shadow: 0 0 15px var(--gold), 0 0 30px rgba(212,175,55,0.5);
    font-weight: 900;
}

.btn-stop {
    margin-top: 16px;
    padding: 14px 38px;
    border: none;
    border-radius: 40px;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2,0.8,0.2,1);
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.5px;
}

#btn_start_game {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    color: #000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.35);
    animation: startPulse 2s infinite ease-in-out;
}

@keyframes startPulse {
    0%,100% { box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.3); }
    50%      { box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 40px rgba(212,175,55,0.7); }
}

#btn_stop {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 20px rgba(255,68,68,0.4);
    animation: stopPulse 0.8s infinite ease-in-out;
}

@keyframes stopPulse {
    0%,100% { transform: scale(1); box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 20px rgba(255,68,68,0.4); }
    50%      { transform: scale(1.04); box-shadow: 0 8px 35px rgba(0,0,0,0.5), 0 0 35px rgba(255,68,68,0.7); }
}

#btn_next_round {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 15px rgba(76,175,80,0.4);
}

#btn_retry_round {
    background: linear-gradient(135deg, #424242, #212121);
    color: #ccc;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    border: 1px solid #555;
}

.btn-stop:hover:not(:disabled) { transform: translateY(-3px) scale(1.06); }
.btn-stop:active:not(:disabled) { transform: scale(0.94); }

.btn-stop:disabled {
    background: #222 !important;
    color: #444 !important;
    box-shadow: none !important;
    animation: none !important;
    cursor: not-allowed;
}

/* ── Mobile ─────────────────────────── */
@media (max-width: 480px) {
    .timing-bar { height: 85px; }
    .luxury-key { width: 100px; height: 46px; }
    .key-handle { width: 38px; height: 38px; }
    .key-handle::after { font-size: 11px; }
    .treasure-chest-container { width: 90px; height: 68px; }
    .prize-reveal { font-size: 20px; }
    .target-zone { width: 96%; height: 42px; }
    .near-zone-left { top: calc(50% - 58px); width: 90%; }
    .near-zone-right { top: calc(50% + 40px); width: 90%; }
}





/* The Moving Golden Key */
.luxury-key {
    position: absolute;
    height: 60px;
    width: 150px;
    z-index: 100;
    pointer-events: none;
    display: flex;
    align-items: center;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6));
    transition: transform 0.1s ease-out, opacity 0.5s ease;
}

.key-handle {
    width: 50px;
    height: 50px;
    border: 5px solid;
    border-image: linear-gradient(135deg, #d4af37, #f3e5ab, #aa8c2c) 1;
    border-radius: 50%; /* This might not work with border-image, using solid color + background instead */
    border: 5px solid var(--gold);
    background: radial-gradient(circle at 30% 30%, #3e2723, #1a0f0a);
    position: relative;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8), 0 0 20px var(--gold);
    flex-shrink: 0;
}

.key-handle::after {
    content: 'TS'; /* The Secret */
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 14px;
    text-shadow: 0 0 5px var(--gold-glow);
}

.key-shaft {
    width: 80px;
    height: 10px;
    background: linear-gradient(to bottom, #aa8c2c, #f3e5ab, #d4af37, #8e6d31);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    position: relative;
    margin-left: -5px;
    z-index: -1;
}

.key-bit {
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #d4af37, #aa8c2c);
    margin-left: -2px;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 70%, 70% 100%, 30% 100%, 30% 70%, 0 70%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.key-handle {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 35% 35%, #fff, var(--gold-glow), var(--gold-dark));
    border: 4px solid var(--gold);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.key-handle::after {
    content: 'FS';
    font-size: 16px;
    font-weight: 900;
    color: rgba(0,0,0,0.8);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.3);
}

.key-shaft {
    flex: 1;
    height: 14px;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold), var(--gold-dark));
    margin-left: -5px;
    position: relative;
    border-radius: 0 4px 4px 0;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-shaft span {
    font-size: 9px;
    font-weight: 900;
    color: rgba(0,0,0,0.7);
    letter-spacing: 1.5px;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: 'Cairo', sans-serif;
    text-shadow: 0.5px 0.5px 0 rgba(255,255,255,0.2);
}

.key-bit {
    width: 25px;
    height: 25px;
    background: linear-gradient(to bottom, var(--gold-light), var(--gold), var(--gold-dark));
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.4);
}

.key-bit::before {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 4px;
    width: 6px;
    height: 10px;
    background: var(--gold-dark);
    box-shadow: 8px 0 0 var(--gold-dark);
    border-radius: 1px;
}

/* Treasure Chest */
.treasure-chest-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 100px;
    z-index: 10;
    perspective: 1000px;
}

.treasure-chest {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chest-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 65px;
    background: linear-gradient(135deg, #2d1b0d, #140b05);
    border: 2px solid var(--gold-dark);
    border-radius: 4px 4px 15px 15px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.8),
        inset 0 0 20px rgba(197, 160, 89, 0.1);
}

.chest-trim {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chest-trim::before, .chest-trim::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 100%;
    background: linear-gradient(to right, #8e6d31, #c5a059, #8e6d31);
    top: 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.chest-trim::before { left: 8%; }
.chest-trim::after { right: 8%; }

.chest-lid {
    position: absolute;
    top: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, #3d2b14, #2d1b0d);
    border: 2px solid var(--gold);
    border-radius: 25px 25px 4px 4px;
    transform-origin: bottom;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: inset 0 2px 10px rgba(255,255,255,0.1);
}

.chest-lid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 4px;
    background: var(--gold-dark);
    border-radius: 2px;
    opacity: 0.3;
}

.chest-lock {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: radial-gradient(circle, var(--gold-light), var(--gold-dark));
    border: 2px solid var(--gold);
    border-radius: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/* God Rays Effect for Chest Opening */
.chest-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.6) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: all 1s ease;
}

.chest-rays::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-conic-gradient(from 0deg, transparent 0deg 20deg, rgba(212, 175, 55, 0.3) 25deg 45deg);
    animation: rotateRays 10s linear infinite;
    mask-image: radial-gradient(circle, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 0%, transparent 70%);
}

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

.chest-open .chest-rays {
    transform: translate(-50%, -100%) scale(2);
    opacity: 1;
}

/* Shine Glint Effect */
.glint {
    position: relative;
    overflow: hidden !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari fix */
}

.glint::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 100%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    transform: rotate(25deg);
    animation: glintEffect 4s infinite ease-in-out;
    pointer-events: none;
}

@keyframes glintEffect {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

/* Level Indicators */
.game-levels-track {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.level-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.4s ease;
}

.level-dot.active {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    transform: scale(1.3);
}

.level-dot.passed {
    background: #4CAF50;
    box-shadow: 0 0 8px #4CAF50;
    border-color: #4CAF50;
}

.chest-keyhole::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
}

.chest-keyhole::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--gold) 0%, transparent 80%);
    opacity: 0.3;
    animation: keyholeGlow 2s infinite ease-in-out;
}

@keyframes keyholeGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.prize-reveal {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 100%;
    text-align: center;
    color: var(--gold-light);
    font-weight: 900;
    font-size: 28px;
    text-shadow: 0 0 30px var(--gold), 0 0 10px #fff;
    opacity: 0;
    transition: all 0.8s 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.prize-reveal span {
    font-size: 14px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Game Animations */
.chest-open .chest-lid {
    transform: rotateX(-120deg);
}

.chest-open .prize-reveal {
    transform: translateX(-50%) translateY(-70px) scale(1.4);
    opacity: 1;
}

.key-active {
    animation: keyFloating 2s infinite ease-in-out;
}

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

.key-inserting {
    animation: keyInsertAndTurn 1.2s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes keyInsertAndTurn {
    0% { transform: scale(1) translate(0, 0); }
    40% { transform: scale(0.7) translate(30px, 0); opacity: 1; }
    70% { transform: scale(0.7) translate(30px, 0) rotate(90deg); opacity: 1; }
    100% { transform: scale(0.4) translate(40px, 0) rotate(90deg); opacity: 0; }
}

.chest-shake {
    animation: chestShake 0.6s ease-in-out;
}

@keyframes chestShake {
    0%, 100% { transform: translateX(-50%) translate(0, -50%); }
    20% { transform: translateX(-50%) translate(-5px, -50%) rotate(-2deg); }
    40% { transform: translateX(-50%) translate(5px, -50%) rotate(2deg); }
    60% { transform: translateX(-50%) translate(-3px, -50%) rotate(-1deg); }
    80% { transform: translateX(-50%) translate(3px, -50%) rotate(1deg); }
}

.magic-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    transition: transform 1s ease;
}

.chest-open .magic-glow {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
}

.game-status-text {
    margin-top: 15px;
    font-size: 16px;
    text-align: center;
    min-height: 50px;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-stop {
    margin-top: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-transform: uppercase;
}

.btn-stop:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.5);
}

.btn-stop:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-stop:disabled {
    background: #333;
    color: #666;
    box-shadow: none;
}

@media (max-width: 480px) {
    .timing-bar { height: 80px; }
    .luxury-key { width: 110px; height: 50px; }
    .key-body { width: 75px; font-size: 7px; }
    .key-head { width: 35px; height: 35px; }
    .treasure-chest-container { width: 80px; height: 60px; }
    .prize-reveal { font-size: 18px; }
}


.status-card {
    background: #111;
    border-top: 3px solid var(--gold);
    border-radius: 30px 30px 0 0;
    padding: 40px 25px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.9);
    position: relative;
    animation: slideUpModal 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    z-index: 10000;
}

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

.status-icon {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--gold);
    margin: 0 auto 15px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-close-status {
    background: linear-gradient(135deg, var(--gold), #AA8C2C);
    color: #000;
    border: none;
    padding: 14px 40px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    font-family: 'Cairo', sans-serif;
    transition: 0.3s;
}

.btn-close-status:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.particle {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
}

#estimate_section {
    position: relative;
    z-index: 10;
    margin: 20px 0;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--gold);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@keyframes pulse-whatsapp {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

#whatsappConfirmBtn {
    animation: pulse-whatsapp 2s infinite;
}

body {
    padding-bottom: 40px; 
}

/* Show game on mobile/tablet, hide only on large desktop */
@media (min-width: 1025px) {
    #game_section {
        display: none !important;
    }
}

/* Tablet tuning for clearer game visuals */
@media (min-width: 768px) and (max-width: 1024px) {
    #game_section {
        display: block !important;
        padding: 34px 26px 40px;
    }

    #game_chest {
        width: 145px !important;
    }

    #gc_lid {
        width: 145px !important;
    }

    #timing_bar {
        height: 96px !important;
    }

    #moving_icon {
        width: 145px !important;
        height: 54px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .master-card {
        padding: 25px 15px;
        border-radius: 30px;
        margin: 10px auto;
        width: 100%;
        box-sizing: border-box;
    }
    .header h1 {
        font-size: 22px;
    }
    .logo-container {
        width: 80px;
        height: 80px;
    }
    .quality-promise {
        padding: 15px;
        font-size: 13px;
    }
    .section {
        padding: 18px 15px;
    }
    .section-title {
        font-size: 13px;
    }
    .selection-grid {
        gap: 8px;
    }
    .selection-card {
        padding: 10px 5px;
    }
    .card-icon {
        font-size: 22px;
    }
    .card-title {
        font-size: 13px;
    }
    .card-desc {
        font-size: 11px;
    }
    .btn-brew {
        padding: 14px 18px;
        font-size: 16px;
    }
    input, textarea, select {
        padding: 14px;
        font-size: 13px;
    }
    .status-card {
        padding: 30px 20px;
    }
}

.logo-container {
    animation: logo-float 6s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.5; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes loadingLine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.rolling-number {
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-rolling {
    animation: priceFlash 0.5s ease-out;
}

@keyframes priceFlash {
    0% { transform: scale(1); color: var(--gold); }
    50% { transform: scale(1.1); color: #fff; text-shadow: 0 0 15px var(--gold); }
    100% { transform: scale(1); color: inherit; }
}

/* Accessibility: reduce heavy motion for sensitive users */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Premium unlock sequence feedback */
#game_chest.unlock-ready {
    filter: drop-shadow(0 0 18px rgba(212,175,55,0.5));
}

#game_chest.unlock-impact {
    animation: chestUnlockImpact 0.45s ease-out;
}

@keyframes chestUnlockImpact {
    0%   { transform: translateY(0) scale(1); }
    40%  { transform: translateY(-5px) scale(1.04); }
    100% { transform: translateY(0) scale(1); }
}

#gc_prize {
    transform-origin: center bottom;
    will-change: transform, opacity;
}

#timing_bar::after {
    content: '';
    position: absolute;
    left: var(--key-x, 50%);
    top: calc(100% - 12px);
    width: 52px;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.05) 70%, transparent 100%);
    pointer-events: none;
    transition: left 0.06s linear;
}

#gc_flag {
    animation: flagFloat 1.8s ease-in-out infinite;
}

@keyframes flagFloat {
    0%,100% { transform: translateX(-50%) translateY(0); opacity: 0.8; }
    50% { transform: translateX(-50%) translateY(-4px); opacity: 1; }
}

/* Rich key detailing */
#moving_icon > div:first-child {
    border: 2px solid #fff4c8 !important;
    box-shadow: 0 0 15px var(--gold), inset 0 2px 3px rgba(255,255,255,0.55), inset 0 -3px 5px rgba(0,0,0,0.35) !important;
}

.chest-enemy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 20px) scale(0.5);
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,0.5);
    box-shadow: 0 0 30px rgba(212,175,55,0.35), inset 0 0 18px rgba(255,255,255,0.08);
    opacity: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 11;
    transition: transform 0.45s ease, opacity 0.45s ease;
    pointer-events: none;
}

.chest-enemy.enemy-visible {
    opacity: 1;
    transform: translate(-50%, -100px) scale(1);
}

.btn-stop.continue-btn {
    background: linear-gradient(135deg, #ffd967, #f0b300) !important;
    color: #000 !important;
}

#moving_icon > div:nth-child(2) {
    position: relative;
    overflow: hidden;
}

#moving_icon > div:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 0;
    left: -35%;
    width: 35%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.6), transparent);
    animation: shaftSweep 2.7s linear infinite;
}

@keyframes shaftSweep {
    0% { left: -35%; }
    100% { left: 120%; }
}

@keyframes ovOpen {
    0% { transform: rotateX(0deg); }
    100% { transform: rotateX(-120deg); }
}

@keyframes ovPrize {
    0% { transform: translateX(-50%) translateY(22px) scale(0.45); opacity: 0; }
    100% { transform: translateX(-50%) translateY(-62px) scale(1.1); opacity: 1; }
}

#gc_lock.lock-hit {
    animation: lockHitFlash 0.26s ease-out;
}

#gc_lock.lock-preglow::before {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,248,190,0.95) 0%, rgba(212,175,55,0.5) 45%, rgba(212,175,55,0) 75%);
    animation: lockPreGlow 0.22s ease-out;
    pointer-events: none;
}

@keyframes lockHitFlash {
    0% { box-shadow: 0 0 15px rgba(212,175,55,0.4); transform: translateX(-50%) scale(1); }
    45% { box-shadow: 0 0 28px rgba(255,245,180,0.95), 0 0 55px rgba(212,175,55,0.7); transform: translateX(-50%) scale(1.14); }
    100% { box-shadow: 0 0 15px rgba(212,175,55,0.4); transform: translateX(-50%) scale(1); }
}

@keyframes lockPreGlow {
    0% { opacity: 0; transform: scale(0.65); }
    45% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 0; transform: scale(1.3); }
}

body.screen-shake .master-card {
    animation: screenShakeLite 0.26s ease-in-out;
}

@keyframes screenShakeLite {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
}

/* =============================================
   GOLDEN DROP GAME CSS
   ============================================= */
.golden-drop-container {
    position: relative;
    padding: 20px 0;
    margin-top: 10px;
}

.drop-track {
    width: 100%;
    height: 4px;
    background: rgba(197, 160, 89, 0.2);
    border-radius: 2px;
    position: relative;
    margin-bottom: 70px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.target-zone-indicator {
    position: absolute;
    left: 50%;
    top: -12px;
    height: 28px;
    width: 2px;
    background: rgba(197, 160, 89, 0.5);
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.8);
}
.target-zone-indicator::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(197, 160, 89, 0.8);
}

.golden-drop {
    position: absolute;
    top: -18px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    border-radius: 0 50% 50% 50%;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.8), 0 0 12px var(--gold);
    z-index: 10;
    will-change: left, top;
}

.drop-falling {
    transition: top 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53) !important;
}

.drop-splash {
    animation: dropSplash 0.5s ease-out forwards;
}

@keyframes dropSplash {
    0% { transform: translateX(-50%) rotate(45deg) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) rotate(45deg) scale(2.5); opacity: 0.5; filter: blur(2px); }
    100% { transform: translateX(-50%) rotate(45deg) scale(3.5); opacity: 0; filter: blur(4px); }
}

.cup-display-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    height: 90px;
    margin-bottom: 25px;
    perspective: 1000px;
}

.coffee-cup-container {
    position: absolute;
    bottom: 0;
    width: 140px;
    height: 85px;
    background: linear-gradient(to right, #111, #2a2a2a, #111);
    border: 2px solid var(--gold);
    border-radius: 5px 5px 45px 45px;
    box-shadow: 0 25px 35px rgba(0,0,0,0.9), inset 0 0 20px rgba(197,160,89,0.15);
    transform-style: preserve-3d;
    transition: transform 0.2s ease, box-shadow 0.5s ease;
}

.coffee-cup-container::after {
    /* Cup Handle */
    content: '';
    position: absolute;
    top: 15px;
    right: -30px;
    width: 35px;
    height: 45px;
    border: 4px solid var(--gold-dark);
    border-radius: 50%;
    border-left: none;
    z-index: -1;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
}

.cup-inner-coffee {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 136px;
    height: 24px;
    background: radial-gradient(circle at center, #3d2008, #1a0c04);
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    overflow: hidden;
}

.cup-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 80px;
    background: radial-gradient(ellipse at center, rgba(197,160,89,0.5) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}
.cup-success .cup-glow {
    opacity: 1;
    animation: pulseCupGlow 1.5s infinite;
}
@keyframes pulseCupGlow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.7; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

.cup-splash {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 136px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gold-light);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.cup-success .cup-splash {
    animation: cupSplashRipple 0.8s ease-out;
}

@keyframes cupSplashRipple {
    0% { transform: translateX(-50%) scale(0.2); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.2); opacity: 0; border-width: 0; }
}

.cup-shake {
    animation: cupShake 0.4s ease-in-out;
}
@keyframes cupShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-4px) rotate(-2deg); }
    75% { transform: translateX(4px) rotate(2deg); }
}

.prize-popup {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
    text-align: center;
    z-index: 20;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.175,0.885,0.32,1.275);
}

.cup-success .prize-popup {
    transform: translateX(-50%) translateY(-60px) scale(1.1);
    opacity: 1;
}

#prize_amount {
    font-size: 34px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold-glow);
}

.prize-label {
    font-size: 13px;
    color: var(--gold);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(0,0,0,0.5);
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid rgba(197,160,89,0.3);
}

.golden-drop-container .btn-stop {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    color: #000;
    border: none;
    padding: 14px 28px;
    border-radius: 15px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
    transition: all 0.3s ease;
}
.golden-drop-container .btn-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(197, 160, 89, 0.5);
}
/* =============================================
   GAME SECTION CONTAINER STYLE
   ============================================= */
#game_section {
    background: linear-gradient(160deg, #0d0a04, #1a1200, #0d0a04);
    border: 2px solid var(--gold);
    text-align: center;
    display: block !important;
    position: relative;
    z-index: 10;
    padding: 30px 20px 35px;
    border-radius: 28px;
    box-shadow: 
        0 30px 70px rgba(0,0,0,0.95),
        inset 0 0 60px rgba(197,160,89,0.08),
        0 0 30px rgba(197,160,89,0.15);
    overflow: hidden;
    margin: 20px 0;
}

#game_section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.12) 0%, transparent 65%);
    pointer-events: none;
}

/* =============================================
   PORTAFILTER GAME OVERRIDES
   ============================================= */
.golden-drop {
    /* Reset old styles */
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: translateX(-50%) !important;
    width: 40px !important;
    height: 30px !important;
    top: -20px !important;
}

.portafilter-basket {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 18px;
    background: linear-gradient(to bottom, #f0f0f0, #888);
    border-radius: 2px 2px 12px 12px;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.5), 0 3px 6px rgba(0,0,0,0.5);
    border: 1px solid #666;
    z-index: 2;
}

.portafilter-handle {
    position: absolute;
    top: 2px;
    left: 28px;
    width: 20px;
    height: 6px;
    background: #111;
    border-radius: 0 4px 4px 0;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.2);
    z-index: 1;
}

.portafilter-spout {
    position: absolute;
    top: 17px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 0 0 3px 3px;
    z-index: 1;
}

.aiming-line {
    position: absolute;
    top: 23px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 70px;
    background: repeating-linear-gradient(to bottom, rgba(197, 160, 89, 0.7) 0, rgba(197, 160, 89, 0.7) 4px, transparent 4px, transparent 8px);
    z-index: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.coffee-liquid-drop {
    position: absolute;
    top: 23px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 0px;
    background: linear-gradient(to right, #4a2a12, #2c1608);
    border-radius: 2px;
    z-index: 0;
    box-shadow: 0 0 6px rgba(74, 42, 18, 0.9);
    transition: none;
}

/* When the game stops, aiming line disappears and coffee drops */
.drop-falling .aiming-line {
    opacity: 0 !important;
}
.drop-falling .coffee-liquid-drop {
    transition: height 0.35s ease-in !important;
    height: 70px !important; /* Reaches the cup */
}

/* Miss splash */
.drop-splash .coffee-liquid-drop {
    animation: liquidSplash 0.5s ease-out forwards;
}

@keyframes liquidSplash {
    0% { height: 70px; opacity: 1; }
    50% { height: 70px; transform: translateX(-50%) scaleX(3); opacity: 0.5; filter: blur(2px); }
    100% { height: 70px; transform: translateX(-50%) scaleX(5); opacity: 0; filter: blur(4px); }
}

/* Fill cup effect on hit */
.cup-success .cup-inner-coffee {
    animation: fillCup 0.6s forwards;
}
@keyframes fillCup {
    0% { transform: translateX(-50%) scaleY(0.8); background: radial-gradient(circle at center, #1a0c04, #000); }
    100% { transform: translateX(-50%) scaleY(1.2); background: radial-gradient(circle at center, #4a2a12, #2c1608); box-shadow: inset 0 0 15px rgba(212,175,55,0.4); }
}

