/* ============================================================
   PLAYGOLDWINABC — Main Stylesheet
   Premium Casino Dark Gold Theme
   ============================================================ */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
    --gold:          #d4af37;
    --gold-light:    #f5d84a;
    --gold-pale:     #fffbe8;
    --gold-dark:     #9a7c1a;
    --gold-deep:     #6b560f;
    --crimson:       #8b0000;
    --crimson-mid:   #a31010;
    --crimson-light: #c42222;
    --ink:           #0a0603;
    --card-bg:       rgba(6,4,2,0.82);
    --border-gold:   rgba(212,175,55,0.32);
    --border-gold-h: rgba(245,216,74,0.55);
    --text-primary:  #f5ead8;
    --text-muted:    rgba(245,234,216,0.50);
    --text-faint:    rgba(245,234,216,0.28);
    
    /* Game-specific colors */
    --game-a-color: #FFD700;       /* Golden A - Gold/Yellow */
    --game-a-color-light: #FFEB3B;
    --game-a-color-dark: #FFC107;
    --game-b-color: #00E676;       /* Golden B - Green */
    --game-b-color-light: #69F0AE;
    --game-b-color-dark: #00C853;
    --game-c-color: #42A5F5;       /* Golden C - Blue */
    --game-c-color-light: #90CAF9;
    --game-c-color-dark: #1E88E5;
}

html, body {
    min-height: 100vh;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ── VIDEO BACKGROUND ── */
/* Fallback background - shows if video fails */
body {
    background: linear-gradient(135deg, #0a0503 0%, #150705 50%, #0a0503 100%);
}
/* Ensure video is visible by making html/body transparent */
html { background: transparent; }
body { background-color: transparent; }

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -10;
    pointer-events: none;
    filter: brightness(1.05) contrast(1.12) saturate(1.18);
    opacity: 1;
    transform: translateZ(0);
    will-change: transform;
}

/* Light Overlay - Max 15% opacity */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -9;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* Soft Gold Glow Layer */
.bg-gold-glow {
    position: fixed;
    inset: 0;
    z-index: -8;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(212,175,55,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212,175,55,0.06) 0%, transparent 45%);
    pointer-events: none;
}

.bg-vignette {
    position: fixed; inset: 0; z-index: -7;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

/* Casino Ambience Elements */
.casino-particles {
    position: fixed; inset: 0; z-index: -6;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.2;
}
.casino-particles::before,
.casino-particles::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255,215,0,.6), transparent),
        radial-gradient(2px 2px at 80% 20%, rgba(255,215,0,.5), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,215,0,.4), transparent),
        radial-gradient(1px 1px at 60% 80%, rgba(255,215,0,.5), transparent);
    background-size: 200% 200%;
    animation: float-particles 20s linear infinite;
}
.casino-particles::after {
    animation-delay: -10s;
    background-image: 
        radial-gradient(1px 1px at 70% 40%, rgba(255,215,0,.5), transparent),
        radial-gradient(2px 2px at 30% 60%, rgba(255,215,0,.4), transparent),
        radial-gradient(1px 1px at 90% 80%, rgba(255,215,0,.6), transparent);
}
@keyframes float-particles {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-100%) translateX(10%); }
}

/* Light Rays */
.light-rays {
    position: fixed; inset: 0; z-index: -5;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.15;
}
.light-rays::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(120deg, transparent 20%, rgba(255,215,0,.1) 25%, transparent 30%),
        linear-gradient(60deg, transparent 60%, rgba(255,215,0,.08) 65%, transparent 70%);
    animation: rotate-rays 60s linear infinite;
}
@keyframes rotate-rays {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── ANNOUNCEMENT BAR ── */
.announcement-bar {
    position: relative; z-index: 50;
    background: linear-gradient(90deg, var(--crimson) 0%, #a00 50%, var(--crimson) 100%);
    color: #fff;
    text-align: center;
    padding: 8px 20px;
    font-size: 12px;
    letter-spacing: 0.12em;
    font-weight: 500;
    border-bottom: 1px solid rgba(212,175,55,0.35);
}
.ann-icon { color: var(--gold-light); margin: 0 8px; }

/* ── LAYOUT ── */
.page {
    position: relative; z-index: 10;
    min-height: 100vh;
    display: flex; flex-direction: column;
    padding-bottom: 70px;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ── HEADER ── */
.header {
    padding: 28px 0 18px;
    text-align: center;
    position: relative;
}

.header-sites {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 4px 16px;
    margin-bottom: 18px;
}
.header-sites a {
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-muted); text-decoration: none;
    transition: color .2s;
}
.header-sites a:hover { color: var(--gold-light); }

.divider-line {
    width: 100%; height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 0 auto 16px;
}

.logo-wrap {
    display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
}
.logo-eyebrow {
    font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--gold-dark); font-weight: 400;
}
.logo {
    font-family: 'Cinzel Decorative', 'Playfair Display', serif;
    font-size: 36px; font-weight: 700;
    background: linear-gradient(180deg, #fffbe8 0%, #f5d84a 35%, #d4af37 65%, #a07c10 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    filter: drop-shadow(0 0 14px rgba(212,175,55,0.55)) drop-shadow(0 3px 6px rgba(0,0,0,0.9));
    line-height: 1.1; letter-spacing: 0.04em;
}
.home-logo {
    max-width: 500px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(255,200,50,.35));
}
.logo-sub {
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--text-muted); font-weight: 300; margin-top: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.logo-sub-item {
    display: block;
}
.logo-sub-sep {
    display: none;
}

.live-badge {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(0,200,80,0.35);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
    color: #3ddc84;
}
.live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #3ddc84;
    box-shadow: 0 0 8px #3ddc84;
    animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.5; transform:scale(0.75); }
}

/* ── LOGIN BAR ── */
.login-bar { margin: 16px auto; max-width: 520px; }
.login-inner {
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--border-gold);
    border-radius: 8px; padding: 10px 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.login-inner label {
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); white-space: nowrap;
}
.login-inner input {
    flex: 1; min-width: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 4px; padding: 6px 10px;
    color: var(--text-primary); font-size: 13px; font-family: 'Inter',sans-serif;
    outline: none; transition: border-color .2s;
}
.login-inner input:focus { border-color: rgba(212,175,55,0.5); }
.login-btn {
    background: var(--crimson); border: none; border-radius: 5px;
    padding: 7px 18px; color: #fff;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer; white-space: nowrap; transition: background .2s;
}
.login-btn:hover { background: var(--crimson-light); }

/* ── TIMER BAR ── */
.timer-bar { margin: 0 auto 36px; max-width: 900px; }
.timer-inner {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
    gap: 10px 32px;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--border-gold);
    border-radius: 8px; padding: 18px 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.timer-row { display: contents; }
.timer-item { display: flex; align-items: center; gap: 10px; flex-direction: column; }
.timer-label {
    color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; font-size: 18px; font-weight: 700;
}
.timer-value {
    color: var(--gold-light); font-weight: 800; font-size: 26px;
    font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.timer-sep { display: none; }

/* Sound toggle button size */
.sound-btn {
    font-size: 26px;
}
.timer-sep { display: none; }
.countdown-display { color: #f5d84a; font-size: 26px; }

/* Sound toggle */
.sound-btn {
    background: none; border: none; cursor: pointer;
    font-size: 18px; padding: 2px 4px; line-height: 1;
    transition: transform .2s;
}
.sound-btn:hover { transform: scale(1.2); }

/* ── SECTION LABEL ── */
.section-label { text-align: center; margin-bottom: 32px; }
.section-label h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px; font-style: italic; font-weight: 700;
    color: var(--gold-dark); letter-spacing: 0.25em; text-transform: uppercase;
}

/* ── RESULT CARDS ── */
.results-grid {
    display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
    margin-bottom: 44px;
}

.result-card {
    width: 270px;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 30px 24px 26px;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(212,175,55,0.1);
}
.result-card::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('../img/frame.png');
    background-repeat: no-repeat;
    background-size: contain; background-position: center;
    pointer-events: none; z-index: 4; opacity: .85;
}

/* Soft shine animation */
.result-card .card-shine {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(245,216,74,0.1) 50%, transparent 100%);
    animation: shine 4s infinite;
    z-index: 5; pointer-events: none;
}
@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}
.result-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(0,0,0,.7), 0 0 40px rgba(212,175,55,.3);
    border-color: var(--gold-light);
}
.result-card.new-result {
    animation: card-pulse 1.2s ease-out;
}
@keyframes card-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(212,175,55,.9), 0 0 20px rgba(212,175,55,0.1); }
    50%  { box-shadow: 0 0 0 20px rgba(212,175,55,0), 0 0 60px rgba(212,175,55,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(212,175,55,0), 0 0 20px rgba(212,175,55,0.1); }
}
@keyframes card-pulse-a {
    0%   { box-shadow: 0 0 0 0 rgba(255,215,0,.9), 0 0 20px rgba(255,215,0,0.1); }
    50%  { box-shadow: 0 0 0 20px rgba(255,215,0,0), 0 0 60px rgba(255,215,0,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(255,215,0,0), 0 0 20px rgba(255,215,0,0.1); }
}
@keyframes card-pulse-b {
    0%   { box-shadow: 0 0 0 0 rgba(0,230,118,.9), 0 0 20px rgba(0,230,118,0.1); }
    50%  { box-shadow: 0 0 0 20px rgba(0,230,118,0), 0 0 60px rgba(0,230,118,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(0,230,118,0), 0 0 20px rgba(0,230,118,0.1); }
}
@keyframes card-pulse-c {
    0%   { box-shadow: 0 0 0 0 rgba(66,165,245,.9), 0 0 20px rgba(66,165,245,0.1); }
    50%  { box-shadow: 0 0 0 20px rgba(66,165,245,0), 0 0 60px rgba(66,165,245,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(66,165,245,0), 0 0 20px rgba(66,165,245,0.1); }
}

/* Card corners */
.card-corner { position: absolute; width: 18px; height: 18px; }
.card-corner.tl { top:8px; left:8px; }
.card-corner.tr { top:8px; right:8px; transform:scaleX(-1); }
.card-corner.bl { bottom:8px; left:8px; transform:scaleY(-1); }
.card-corner.br { bottom:8px; right:8px; transform:scale(-1,-1); }

/* Game title */
.game-title {
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative;
    z-index:9999;
    text-align:center;
    font-family: 'Playfair Display', serif;
    font-size:32px;
    font-weight:700;
    font-style:italic;
    letter-spacing:4px;
    margin-bottom:24px;
    text-transform:uppercase;
}
.game-a-title {
    background: linear-gradient(to bottom, #FFE994, #FFD700, #B8860B);
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    filter:
        drop-shadow(0 0 8px rgba(255,215,0,0.6))
        drop-shadow(0 0 15px rgba(255,215,0,0.3))
        drop-shadow(0 2px 2px rgba(0,0,0,0.8));
}
.game-b-title {
    background: linear-gradient(to bottom, #88ffcc, #00ff88, #00cc66);
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    filter:
        drop-shadow(0 0 8px rgba(0,255,136,0.6))
        drop-shadow(0 0 15px rgba(0,255,136,0.3))
        drop-shadow(0 2px 2px rgba(0,0,0,0.8));
}
.game-c-title {
    background: linear-gradient(to bottom, #88ccff, #44aaff, #1177dd);
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    filter:
        drop-shadow(0 0 8px rgba(68,170,255,0.6))
        drop-shadow(0 0 15px rgba(68,170,255,0.3))
        drop-shadow(0 2px 2px rgba(0,0,0,0.8));
}

.game-a .flip-number { color: var(--game-a-color); text-shadow: 0 0 10px currentColor; }
.game-b .flip-number { color: var(--game-b-color); text-shadow: 0 0 10px currentColor; }
.game-c .flip-number { color: var(--game-c-color); text-shadow: 0 0 10px currentColor; }

.game-a { box-shadow: 0 0 20px rgba(255,215,0,0.15); }
.game-a:hover { box-shadow: 0 22px 50px rgba(0,0,0,.7), 0 0 40px rgba(255,215,0,.35); border-color: var(--game-a-color); }
.game-a.new-result { animation: card-pulse-a 1.2s ease-out; }

.game-b { box-shadow: 0 0 20px rgba(0,230,118,0.15); }
.game-b:hover { box-shadow: 0 22px 50px rgba(0,0,0,.7), 0 0 40px rgba(0,230,118,.35); border-color: var(--game-b-color); }
.game-b.new-result { animation: card-pulse-b 1.2s ease-out; }

.game-c { box-shadow: 0 0 20px rgba(66,165,245,0.15); }
.game-c:hover { box-shadow: 0 22px 50px rgba(0,0,0,.7), 0 0 40px rgba(66,165,245,.35); border-color: var(--game-c-color); }
.game-c.new-result { animation: card-pulse-c 1.2s ease-out; }

/* History table game-specific number colors - CLEAN */
.history-table .golden-a { 
    color:#FFD700; 
    font-weight:800; 
    text-shadow:none !important; 
    box-shadow:none !important; 
    filter:none !important; 
    background:none !important; 
}
.history-table .golden-b { 
    color:#00D26A; 
    font-weight:800; 
    text-shadow:none !important; 
    box-shadow:none !important; 
    filter:none !important; 
    background:none !important; 
}
.history-table .golden-c { 
    color:#4DA6FF; 
    font-weight:800; 
    text-shadow:none !important; 
    box-shadow:none !important; 
    filter:none !important; 
    background:none !important; 
}
.history-table .jackpot { 
    color:#FF5555; 
    font-size:32px;
    font-weight:800; 
    text-shadow:none !important; 
    box-shadow:none !important; 
    filter:none !important; 
    background:none !important; 
}

/* Flip unit */
.flip-unit {
    display: flex; gap: 6px;
    background: linear-gradient(180deg, #0c0c0a 0%, #050503 100%);
    border-radius: 8px; padding: 10px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.9), inset 0 0 20px rgba(0,0,0,.6),
                0 2px 0 rgba(212,175,55,.12);
    position: relative; z-index: 5;
    border: 1px solid rgba(255,255,255,.04);
}
.flip-digit {
    width: 78px; height: 120px;
    background: linear-gradient(180deg, #1c1c18 0%, #111110 50%, #0c0c0a 100%);
    border-radius: 6px; position: relative; overflow: hidden;
    border: 1px solid rgba(255,255,255,.05);
    box-shadow: inset 0 0 12px rgba(0,0,0,.8);
}
.flip-digit::before {
    content: ''; position: absolute; top:50%; left:4px; right:4px; height:1px;
    background: rgba(0,0,0,.75); z-index:5;
}
.flip-digit::after {
    content: ''; position: absolute; inset:0;
    background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, transparent 40%, transparent 60%, rgba(0,0,0,.3) 100%);
    pointer-events: none; z-index:4;
}
.flip-number {
    position: absolute; inset:0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Arial Black','Helvetica Neue',Arial,sans-serif;
    font-size: 92px; font-weight: 900; color: #fff; line-height:1;
    text-shadow: 0 0 10px currentColor;
    z-index:3;
    transition: none;
}
.flip-number.pending { color: rgba(255,255,255,.2); font-size:50px; }

.draw-time {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 20px; color: rgba(245,234,216,.7);
    text-align: center; position: relative; z-index:5;
    margin-top: 16px;
}

/* ── JACKPOT ── */
.jackpot-section { margin-bottom: 40px; }
.jackpot-label {
    text-align: center; margin-bottom: 16px;
    font-size: 22px; letter-spacing: 0.25em; text-transform: uppercase;
    color: var(--gold-dark);
    font-family: 'Playfair Display', serif; font-style: italic;
}
.jackpot-frame {
    max-width: 660px; margin: 0 auto;
    background: rgba(0,0,0,0.40);
    border: 1px solid rgba(212,175,55,.3);
    border-radius: 14px; padding: 14px 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 40px rgba(139,0,0,.18), inset 0 1px 0 rgba(255,255,255,.03);
    position: relative; overflow: hidden;
}
.jackpot-frame::before {
    content: ''; position: absolute; top:4px; left:4px; right:4px; bottom:4px;
    border: 1px solid rgba(212,175,55,.1); border-radius:10px; pointer-events:none;
}
.jackpot-frame.new-jackpot { animation: jackpot-glow 2s ease-out; }
@keyframes jackpot-glow {
    0%   { box-shadow: 0 0 60px 20px rgba(212,175,55,.8); }
    100% { box-shadow: 0 0 40px rgba(139,0,0,.18); }
}

.jackpot-inner {
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.jackpot-group { display: flex; gap: 6px; }
.jackpot-sep {
    width: 1px; height: 70px;
    background: linear-gradient(to bottom, transparent, rgba(212,175,55,.3), transparent);
    align-self: center;
}
.digit-box {
    width: 95px; height: 95px;
    background: linear-gradient(180deg, #7a0000 0%, #550000 50%, #3a0000 100%);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    border: 1px solid #1d0000;
    box-shadow: inset 0 2px 0 rgba(255,100,100,.15), inset 0 -2px 0 rgba(0,0,0,.6),
                0 3px 10px rgba(0,0,0,.6);
}
.digit-box::before {
    content: ''; position: absolute; top:0; left:0; right:0; height:42%;
    background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 100%);
    border-radius: 7px 7px 0 0;
}
.digit {
    font-size: 72px; font-weight: 900;
    font-family: 'Arial Black', sans-serif; color: #fff; line-height:1;
    text-shadow: 0 0 10px rgba(255,200,200,.5), 0 2px 4px rgba(0,0,0,.6);
    position: relative; z-index:2;
}
.digit.pending { color: rgba(255,255,255,.2); font-size:48px; }

/* ── CTA BUTTON ── */
.cta-wrap { text-align: center; margin: 12px 0 40px; }
.cta-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 20px 60px;
    min-height: 70px;
    background: linear-gradient(180deg, var(--crimson-light) 0%, var(--crimson) 100%);
    color: #fff; font-size: 22px; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    text-decoration: none; border-radius: 8px;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 6px 24px rgba(139,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
    transition: all .2s ease; cursor: pointer;
}
.cta-btn:hover {
    background: linear-gradient(180deg, #d42828 0%, #a31010 100%);
    box-shadow: 0 6px 28px rgba(139,0,0,.65);
    transform: translateY(-1px);
}

/* ── HISTORY TABLE ── */
.history-section {
    margin-bottom: 40px;
    background: rgba(0,0,0,0.55);
    border: 1px solid var(--border-gold);
    border-radius: 12px; overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.history-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-gold);
}
.history-header h3 {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 30px; font-weight: 700;
    background: linear-gradient(to right, #f5d84a, #d4af37);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.history-date { font-size: 24px; color: var(--text-muted); }

.table-wrap { overflow-x: auto; }
.history-table {
    width: 100%; border-collapse: collapse;
}
.history-table th {
    background: rgba(212,175,55,.08);
    padding: 16px 24px; text-align: center;
    font-size: 22px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--gold-dark);
    border-bottom: 1px solid var(--border-gold);
}
.history-table td {
    padding: 16px 24px; text-align: center;
    border-bottom: 1px solid rgba(212,175,55,.08);
    color: var(--text-primary);
    font-size: 30px; font-weight: 800;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(212,175,55,.04); }
.num-cell { font-family: 'Arial Black', sans-serif; font-size: 15px; font-weight: 900; color: #fff; }
.jackpot-cell { font-family: 'Arial Black', sans-serif; font-size: 13px; color: var(--crimson-light); letter-spacing: 0.15em; text-shadow: 0 0 8px rgba(212, 34, 34, .6); }
.no-results { color: var(--text-muted); font-style: italic; padding: 24px !important; }
.history-table tr.highlight-new td {
    animation: row-flash .8s ease-out;
}
@keyframes row-flash {
    0%   { background: rgba(212,175,55,.3); }
    100% { background: transparent; }
}

/* ── FOOTER ── */
.footer {
    position: fixed; bottom:0; left:0; right:0; height:44px;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(212,175,55,.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    gap: 6px 20px; flex-wrap: wrap; z-index:100; padding: 0 16px;
}
.footer a {
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(212,175,55,.38); text-decoration: none; transition: color .2s;
}
.footer a:hover { color: var(--gold); }
.footer-dot { width:2px; height:2px; border-radius:50%; background: rgba(212,175,55,.22); flex-shrink:0; }

/* ── ANIMATIONS ── */
@keyframes roll-in {
    0%   { transform: translateY(-90%) scaleY(0.5); opacity:0; }
    15%  { opacity:1; }
    100% { transform: translateY(0) scaleY(1); opacity:1; }
}
.rolling { animation: roll-in .28s ease-out both; }

/* ── RESPONSIVE ── */
/* Large Desktops (1920px+ */
@media (min-width: 1920px) {
    .container { max-width: 1200px; }
    .timer-bar { max-width: 1100px; }
    .result-card { width: 320px; padding: 36px 28px 30px; }
    .flip-digit { width: 90px; height: 140px; }
    .flip-number { font-size: 108px; }
    .digit-box { width: 110px; height: 110px; }
    .digit { font-size: 84px; }
}

/* Desktop (1600px) */
@media (max-width: 1600px) and (min-width: 1280px) {
    /* Keep as is */
}

/* Tablet (1024px) */
@media (max-width:1024px) {
    .timer-item { flex-direction: column; }
}

@media (max-width:992px) {
    .timer-item { flex-direction: column; }
}

@media (max-width:768px) {
    .logo { font-size:28px; }
    .home-logo { max-width: 420px; }
    
    /* Section label */
    .section-label h2 { font-size:18px; }
    
    /* Timer bar */
    .timer-inner { padding:14px 20px; gap:12px 24px; }
    .timer-label { font-size:14px; }
    .timer-value { font-size:20px; }
    .countdown-display { font-size:20px; }
    .sound-btn { font-size:20px; }
    
    /* Result cards */
    .result-card { width:230px; padding:22px 16px 20px; gap:16px; }
    .game-title { font-size:22px; letter-spacing:3px; margin-bottom:18px; }
    .flip-digit { width:58px; height:86px; }
    .flip-number { font-size:66px; }
    .draw-time { font-size:16px; margin-top:12px; }
    
    /* Jackpot */
    .jackpot-label { font-size:16px; }
    .jackpot-frame { padding:10px 12px; }
    .digit-box { width:68px; height:68px; }
    .digit { font-size:48px; }
    .jackpot-sep { height:54px; }
    
    /* CTA Button */
    .cta-btn { font-size:18px; padding:16px 48px; min-height:60px; min-width: 200px; }
    
    /* History */
    .history-header { padding:14px 20px; }
    .history-header h3 { font-size:22px; }
    .history-date { font-size:16px; }
    .history-table th { font-size:16px; padding:12px 16px; }
    .history-table td { font-size:20px; padding:12px 16px; }
    .history-table .jackpot { font-size:22px; }
}

/* Mobile (480px and below) */
@media (max-width:480px) {
    /* Header & Logo */
    .header { padding: 18px 0 12px; }
    .home-logo { max-width: 60%; }
    .logo-eyebrow { font-size: 9px; }
    .logo-sub {
        font-size: 9px;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        overflow-x: auto;
        padding: 0 8px;
    }
    .logo-sub-item { display: inline; }
    .logo-sub-sep { display: inline; color: rgba(212, 175, 55, 0.6); }
    .live-badge { margin-top: 8px; padding: 3px 12px; font-size: 10px; }
    
    /* Section label */
    .section-label { margin-bottom: 20px; text-align: center; }
    .section-label h2 { font-size: 16px; }
    
    /* Timer Bar - Two compact rows */
    .timer-bar { margin-bottom: 24px; }
    .timer-inner {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 14px;
    }
    .timer-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }
    .timer-item {
        flex-direction: row;
        gap: 6px;
        white-space: nowrap;
    }
    .timer-label { font-size: 9px; }
    .timer-value { font-size: 14px; }
    .countdown-display { font-size: 14px; }
    .timer-sep {
        display: block;
        width: 1px;
        height: 16px;
        background: rgba(212, 175, 55, 0.4);
    }
    .sound-toggle-wrap {
        display: none;
    }
    
    /* Result Cards - 3 in a row */
    .results-grid {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 28px;
        flex-wrap: nowrap;
    }
    .result-card {
        width: 32%;
        padding: 14px 8px 12px;
        gap: 10px;
    }
    .game-title {
        font-size: clamp(12px, 3.8vw, 16px);
        letter-spacing: 2px;
        margin-bottom: 10px;
    }
    .flip-unit { padding: 6px; gap: 3px; }
    .flip-digit { width: 38px; height: 54px; }
    .flip-number { font-size: clamp(34px, 9vw, 42px); }
    .draw-time { font-size: 12px; margin-top: 8px; }
    
    /* Jackpot - keep 6 digits in row */
    .jackpot-section { margin-bottom: 28px; }
    .jackpot-label { font-size: 14px; margin-bottom: 12px; text-align: center; }
    .jackpot-frame { padding: 10px 8px; }
    .jackpot-inner { gap: 4px; }
    .jackpot-group { gap: 3px; }
    .digit-box { width: clamp(36px, 9.5vw, 48px); height: clamp(36px, 9.5vw, 48px); }
    .digit { font-size: clamp(26px, 7vw, 36px); }
    .jackpot-sep { height: clamp(30px, 9vw, 40px); }
    
    /* CTA Button - full width */
    .cta-wrap { margin: 8px 0 28px; }
    .cta-btn {
        font-size: 16px;
        padding: 14px 20px;
        min-height: 54px;
        width: 100%;
    }
    
    /* History Table */
    .history-section { margin-bottom: 28px; }
    .history-header {
        padding: 12px 14px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .history-header h3 { font-size: 18px; }
    .history-date { font-size: 14px; }
    .table-wrap { overflow-x: auto; }
    .history-table th {
        font-size: 12px;
        padding: 10px 8px;
        white-space: nowrap;
    }
    .history-table td {
        font-size: 14px;
        padding: 10px 8px;
        white-space: nowrap;
    }
    .history-table .jackpot { font-size: 16px; letter-spacing: 0.08em; }
    
    /* Footer */
    .footer {
        padding: 8px 12px;
        height: auto;
        min-height: 44px;
        gap: 4px 12px;
    }
    
    /* Container padding */
    .container { padding: 0 14px; }
}

/* Extra Small Mobile (320px-360px) */
@media (max-width:360px) {
    .home-logo { max-width: 65%; }
    .logo-sub { font-size: 8px; gap: 4px; }
    .timer-inner { gap: 8px; padding: 10px 12px; }
    .timer-label { font-size: 9px; }
    .timer-value { font-size: 14px; }
    .countdown-display { font-size: 14px; }
    .result-card {
        padding: 12px 6px 10px;
        gap: 8px;
    }
    .game-title {
        font-size: clamp(10px, 3.6vw, 14px);
        letter-spacing: 1.5px;
        margin-bottom: 8px;
    }
    .flip-digit { width: 34px; height: 48px; }
    .flip-number { font-size: clamp(30px, 8vw, 38px); }
    .flip-unit { padding: 5px; gap: 2px; }
    .draw-time { font-size: 11px; margin-top: 6px; }
    .digit-box { width: clamp(32px, 9vw, 42px); height: clamp(32px, 9vw, 42px); }
    .digit { font-size: clamp(22px, 6.5vw, 32px); }
    .jackpot-sep { height: clamp(26px, 8vw, 36px); }
}
@media (prefers-reduced-motion: reduce) {
    .result-card,.cta-btn { transition:none; }
    .live-dot { animation:none; }
    .rolling,.result-card.new-result,.jackpot-frame.new-jackpot { animation:none; }
}
