/* =========================================================================
   Casino API Demo — style.css
   Dark, modern theme with a blue accent. No betting-site clutter.
   ====================================================================== */

:root {
    --bg:          #0b0f1a;
    --bg-elev:     #131a2b;
    --bg-elev-2:   #1b2540;
    --card:        #151d30;
    --card-border: #24304d;
    --accent:      #3f6df0;
    --accent-2:    #5b8bff;
    --text:        #e8edf7;
    --muted:       #8b96ad;
    --good:        #2fd07a;
    --bad:         #ff5468;
    --gold:        #ffcf4d;
    --radius:      16px;
    --shadow:      0 12px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(63, 109, 240, .18), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(91, 139, 255, .10), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
    min-height: 100vh;
    letter-spacing: .1px;
}

/* --------------------------------------------------------- Navbar ------- */
.casino-navbar {
    background: rgba(11, 15, 26, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}
.navbar-brand { color: var(--text) !important; letter-spacing: .3px; }
.brand-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    margin-right: 4px;
    vertical-align: middle;
}
.navbar .nav-link { color: var(--muted); font-weight: 500; }
.navbar .nav-link:hover { color: var(--text); }
.navbar .nav-link.active { color: var(--accent-2); }

/* --------------------------------------------------------- Hero -------- */
.hero-badge {
    background: rgba(63, 109, 240, .15);
    color: var(--accent-2);
    border: 1px solid rgba(63, 109, 240, .35);
    font-weight: 600;
    letter-spacing: .4px;
}

/* --------------------------------------------------------- Cards ------- */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: var(--text);
}

.game-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.game-card__thumb {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-card__emoji { font-size: 3.5rem; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.game-card .card-title { color: var(--text); }

.live-chip, .live-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--good);
    color: #06231a;
    font-weight: 700;
    letter-spacing: .5px;
}

/* --------------------------------------------------------- Buttons ----- */
.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-2);
    --bs-btn-hover-border-color: var(--accent-2);
    --bs-btn-active-bg: var(--accent-2);
    font-weight: 600;
    border-radius: 12px;
}

/* --------------------------------------------------------- Status ------ */
.status-badge {
    font-weight: 700;
    letter-spacing: .5px;
    padding: .5rem .75rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.status-badge--live  { background: rgba(47, 208, 122, .16); color: var(--good); border: 1px solid rgba(47,208,122,.4); }
.status-badge--wait  { background: rgba(255, 207, 77, .14); color: var(--gold); border: 1px solid rgba(255,207,77,.35); }
.status-badge--lock  { background: rgba(240, 102, 63, .16); color: #ff8a63;     border: 1px solid rgba(240,102,63,.4); }
.status-badge--result{ background: rgba(63, 109, 240, .18); color: var(--accent-2); border: 1px solid rgba(63,109,240,.45); }
.status-badge--error { background: rgba(255, 84, 104, .16); color: var(--bad);  border: 1px solid rgba(255,84,104,.4); }

.pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
    70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.refresh-badge {
    background: var(--bg-elev);
    color: var(--muted);
    border: 1px solid var(--card-border);
    font-weight: 500;
    padding: .5rem .75rem;
    display: inline-flex;
    align-items: center;
}

/* --------------------------------------------------------- Frame ------- */
.casino-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: #000;
    box-shadow: var(--shadow);
}
.casino-frame iframe { border: 0; width: 100%; height: 100%; }
.frame-placeholder { background: linear-gradient(135deg, #0d1424, #10182c); height: 100%; }

/* --------------------------------------------------------- Stat cards -- */
.stat-card { transition: border-color .2s ease; }
.stat-label {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: .5rem;
}
.stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-sub   { color: var(--muted); font-size: .8rem; }
.winner-value { color: var(--gold); }

.side-dragon { border-top: 3px solid var(--accent); }
.side-tiger  { border-top: 3px solid #f0663f; }

/* --------------------------------------------------------- Playing cards */
.card-slot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 78px;
}
.playing-card {
    width: 52px;
    height: 74px;
    background: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,.45);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 6px;
    font-weight: 700;
    line-height: 1;
    position: relative;
    animation: dealIn .28s ease both;
}
@keyframes dealIn {
    from { transform: translateY(6px) scale(.94); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.playing-card .rank { font-size: 1.05rem; }
.playing-card .suit-sm { font-size: .8rem; margin-left: 1px; }
.playing-card .suit-lg {
    font-size: 1.4rem;
    text-align: center;
    margin-top: -4px;
}
.playing-card .rank-bottom {
    align-self: flex-end;
    transform: rotate(180deg);
    font-size: 1.05rem;
}
.playing-card.red  { color: #d4183d; }
.playing-card.black{ color: #14181f; }
.playing-card.back {
    background: repeating-linear-gradient(45deg, #1d3a8a, #1d3a8a 6px, #24469e 6px, #24469e 12px);
    color: transparent;
}

/* --------------------------------------------------------- History ----- */
.history-card { background: var(--bg-elev); }
.history-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.history-chip {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    border: 1px solid var(--card-border);
    background: var(--card);
    animation: dealIn .25s ease both;
}
.history-chip.win-d { background: rgba(63,109,240,.2);  color: var(--accent-2); border-color: rgba(63,109,240,.5); }
.history-chip.win-t { background: rgba(240,102,63,.2);  color: #ff8a63;         border-color: rgba(240,102,63,.5); }
.history-chip.win-a { background: rgba(63,109,240,.2);  color: var(--accent-2); border-color: rgba(63,109,240,.5); }
.history-chip.win-b { background: rgba(240,102,63,.2);  color: #ff8a63;         border-color: rgba(240,102,63,.5); }
.history-chip.win-tie{background: rgba(255,207,77,.2);  color: var(--gold);     border-color: rgba(255,207,77,.5); }
.history-chip.win-low{ background: rgba(255,84,104,.18); color: var(--bad);     border-color: rgba(255,84,104,.45);}
.history-chip.win-high{background: rgba(47,208,122,.18); color: var(--good);    border-color: rgba(47,208,122,.45);}
.history-chip.win-seven{background: rgba(255,207,77,.2); color: var(--gold);    border-color: rgba(255,207,77,.5); }

/* --------------------------------------------------------- Lucky bands - */
.lucky-band { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lucky-band.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(63,109,240,.4), var(--shadow);
    transform: translateY(-2px);
}
.lucky-band--seven.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(255,207,77,.5), var(--shadow);
}

/* --------------------------------------------------------- Footer ------ */
.casino-footer {
    border-top: 1px solid var(--card-border);
    background: rgba(11,15,26,.6);
}
.dev-credit { color: var(--accent-2); font-weight: 600; }

/* --------------------------------------------------------- Misc -------- */
.round-id { color: var(--accent-2); font-weight: 600; }

@media (max-width: 575.98px) {
    .playing-card { width: 44px; height: 62px; }
    .stat-value { font-size: 1.3rem; }
}
