@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Poppins:wght@400;500;600;700&display=swap');

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

:root {
    --gold: #f4c542;
    --gold-soft: #ffe08a;
    --red: #e0263f;
    --green: #1fae5f;
    --bg: #0a0a0d;
    --panel: #131217;
    --panel-border: #2a2530;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: #f2f0ea;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }

#fxCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* ===== Лента "живых" выигрышей ===== */

.ticker {
    background: #100e13;
    border-bottom: 1px solid var(--panel-border);
    overflow: hidden;
    padding: 9px 0;
}

.ticker-track {
    display: flex;
    gap: 34px;
    white-space: nowrap;
    width: max-content;
    animation: tickerScroll 32s linear infinite;
}

.ticker-item {
    font-size: 13px;
    color: #b8b5c0;
}

.ticker-item b {
    color: var(--gold);
}

.ticker-item .tk-game {
    color: #6f6c78;
}

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

h1, h2 {
    font-family: 'Cinzel', serif;
}

.accent {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(244, 197, 66, 0.5);
}

.container {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 13, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--panel-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
}

.logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.site-header nav ul {
    display: flex;
    gap: 26px;
}

.site-header nav a {
    color: #cfcad6;
    font-size: 14.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-header nav a:hover {
    color: var(--gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-sound {
    background: #17151b;
    border: 1px solid var(--panel-border);
    color: #cfcad6;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-sound:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.balance-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #17151b;
    border: 1px solid var(--gold);
    border-radius: 50px;
    padding: 8px 14px;
    white-space: nowrap;
}

.balance-label {
    font-size: 11px;
    color: #9a9aa5;
    text-transform: uppercase;
}

.balance-value {
    font-weight: 700;
    color: var(--gold);
    font-size: 15px;
    transition: transform 0.15s ease;
}

.balance-value.bump {
    transform: scale(1.15);
}

.btn-reset {
    background: transparent;
    color: #7a7a85;
    font-size: 15px;
    padding: 2px 4px;
    transition: color 0.2s ease, transform 0.3s ease;
}

.btn-reset:hover {
    color: var(--gold);
    transform: rotate(-180deg);
}

/* ===== Buttons ===== */

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--gold-soft), var(--gold));
    color: #1a1305;
    box-shadow: 0 0 0 rgba(244, 197, 66, 0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(244, 197, 66, 0.35);
}

.btn-primary:active {
    transform: translateY(0) scale(0.97);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--panel-border);
    color: #f2f0ea;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ===== Hero ===== */

.hero {
    position: relative;
    padding: 110px 0 90px;
    text-align: center;
    overflow: hidden;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(circle, rgba(244, 197, 66, 0.18), transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 14px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 22px;
    position: relative;
}

.hero-lead {
    color: #b8b5c0;
    max-width: 520px;
    margin: 0 auto 34px;
    font-size: 17px;
}

.promo-ribbon {
    display: inline-block;
    background: linear-gradient(90deg, rgba(244,197,66,0.15), rgba(244,197,66,0.05));
    border: 1px solid rgba(244,197,66,0.4);
    color: var(--gold-soft);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 50px;
    margin-bottom: 28px;
    transition: all 0.2s ease;
}

.promo-ribbon:hover {
    background: rgba(244,197,66,0.18);
    transform: translateY(-1px);
}

.hero-chips {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-chips span {
    position: absolute;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: rgba(244, 197, 66, 0.08);
    font-size: 90px;
    animation: chipFloat 9s ease-in-out infinite;
}

.hero-chips span:nth-child(1) { top: 10%; left: 6%; animation-delay: 0s; }
.hero-chips span:nth-child(2) { top: 60%; left: 12%; font-size: 60px; animation-delay: 1.5s; }
.hero-chips span:nth-child(3) { top: 15%; right: 8%; animation-delay: 3s; }
.hero-chips span:nth-child(4) { top: 65%; right: 14%; font-size: 70px; animation-delay: 4.5s; }
.hero-chips span:nth-child(5) { top: 40%; left: 50%; font-size: 50px; animation-delay: 2s; }

@keyframes chipFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(8deg); }
}

/* ===== Game sections ===== */

.game-section {
    padding: 80px 0;
    border-top: 1px solid var(--panel-border);
}

.game-section h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.section-lead {
    color: #9a9aa5;
    margin-bottom: 40px;
}

.game-result {
    min-height: 24px;
    font-weight: 600;
    margin-top: 16px;
}

.game-result.win { color: var(--green); }
.game-result.lose { color: var(--red); }

.bet-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.bet-buttons {
    display: flex;
    gap: 8px;
}

.bet-btn {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    color: #cfcad6;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.bet-btn.active, .bet-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ===== VIP ===== */

.vip-card {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #1c1720, #0e0c11);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 30px 36px;
    margin-bottom: 30px;
}

.vip-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0a0a0d;
    border: 1px solid var(--vip-color, var(--gold));
    border-radius: 14px;
    padding: 14px 20px;
    flex-shrink: 0;
}

.vip-tier-icon { font-size: 26px; }

.vip-tier-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--vip-color, var(--gold));
}

.vip-progress-wrap {
    flex: 1;
    min-width: 200px;
}

.vip-progress-bar {
    width: 100%;
    height: 10px;
    background: #050507;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--panel-border);
}

.vip-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--vip-color, var(--gold)), var(--gold-soft));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.vip-progress-label {
    font-size: 13px;
    color: #9a9aa5;
    margin-top: 8px;
}

.vip-next {
    font-size: 13.5px;
    color: #cfcad6;
    white-space: nowrap;
}

.vip-tiers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.vip-tier-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 18px 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.vip-tier-card.reached {
    border-color: var(--tier-color, var(--gold));
    box-shadow: 0 0 20px rgba(244, 197, 66, 0.12);
}

.vip-tier-card .vip-tier-icon {
    display: block;
    margin-bottom: 8px;
}

.vip-tier-card .name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.vip-tier-card .req {
    font-size: 11.5px;
    color: #7a7a85;
}

/* ===== Slots ===== */

.slot-machine {
    background: linear-gradient(160deg, #1c1720, #0e0c11);
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 40px;
    max-width: 520px;
    text-align: center;
    box-shadow: 0 0 60px rgba(244, 197, 66, 0.08), inset 0 0 40px rgba(0,0,0,0.5);
    transition: box-shadow 0.3s ease;
}

.slot-machine.jackpot {
    animation: jackpotPulse 0.6s ease 2;
}

@keyframes jackpotPulse {
    0%, 100% { box-shadow: 0 0 60px rgba(244, 197, 66, 0.08), inset 0 0 40px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 90px rgba(244, 197, 66, 0.55), inset 0 0 40px rgba(0,0,0,0.5); }
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 30px;
}

.reel {
    width: 90px;
    height: 100px;
    background: #050507;
    border: 2px solid var(--panel-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    overflow: hidden;
}

.reel.spinning {
    animation: reelShake 0.12s linear infinite;
    filter: blur(2px);
}

@keyframes reelShake {
    0% { transform: translateY(0); }
    50% { transform: translateY(6px); }
    100% { transform: translateY(0); }
}

.slot-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-spin {
    width: 100%;
    max-width: 260px;
}

.btn-spin:disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== Roulette ===== */

.roulette-wrap {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.wheel-holder {
    position: relative;
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}

.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid var(--gold);
    background: repeating-conic-gradient(
        #101014 0deg 9.7deg,
        #101014 9.7deg 19.4deg,
        var(--red) 19.4deg 29.1deg,
        var(--red) 29.1deg 38.8deg
    );
    box-shadow: 0 0 50px rgba(244, 197, 66, 0.15), inset 0 0 30px rgba(0,0,0,0.6);
    transition: transform 3.2s cubic-bezier(0.15, 0.85, 0.25, 1);
}

.wheel-numbers {
    position: absolute;
    inset: 0;
}

.wheel-number {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #2a2530, #0a0a0d);
    border: 2px solid var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid var(--gold);
    z-index: 2;
}

.roulette-controls {
    flex: 1;
    min-width: 260px;
}

.color-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.color-btn {
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid transparent;
    color: #fff;
}

.color-red { background: #7a1220; }
.color-black { background: #1a1a1e; border-color: #333; }
.color-green { background: #0e4a2a; }

.color-btn.active {
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(244, 197, 66, 0.3);
}

/* ===== Cards ===== */

.cards-table {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    background: radial-gradient(circle at top left, #0e2b1c, #081b12 70%);
    border: 1px solid #1c4a30;
    border-radius: 24px;
    padding: 40px;
}

.card-slot {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.playing-card {
    width: 110px;
    height: 155px;
    background: #f4f0e6;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transition: transform 0.4s ease;
}

.playing-card .card-rank {
    font-size: 30px;
    line-height: 1;
}

.playing-card .card-suit {
    font-size: 34px;
    line-height: 1;
    margin-top: 4px;
}

.playing-card.red-suit {
    color: var(--red);
}

.playing-card.back {
    background: linear-gradient(135deg, #2a2530, #17151b);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 30px;
}

.playing-card.flip {
    animation: cardFlip 0.5s ease;
}

@keyframes cardFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.cards-controls {
    flex: 1;
    min-width: 240px;
}

.guess-row {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.streak-line {
    color: #9a9aa5;
    font-size: 14px;
    margin-top: 6px;
}

.streak-line span {
    color: var(--gold);
    font-weight: 700;
}

/* ===== Crash ===== */

.crash-panel {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: stretch;
}

.crash-graph {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 100%;
    height: 280px;
    background: linear-gradient(180deg, #120f16, #08070a);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    overflow: hidden;
}

.crash-graph::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
}

.crash-line {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 10%;
    height: 10%;
    border-top: 3px solid var(--gold);
    border-radius: 0 60px 0 0;
    background: linear-gradient(0deg, rgba(244,197,66,0.18), transparent);
    transition: width 0.1s linear, height 0.1s linear;
}

.crash-rocket {
    position: absolute;
    left: 10%;
    bottom: 10%;
    font-size: 26px;
    transform: translate(-50%, -50%) rotate(-45deg);
    transition: left 0.1s linear, bottom 0.1s linear;
    filter: drop-shadow(0 0 8px rgba(244, 197, 66, 0.6));
}

.crash-rocket.crashed {
    animation: rocketBoom 0.5s ease forwards;
}

@keyframes rocketBoom {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(2.4); }
}

.crash-multiplier {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 44px;
    color: var(--gold-soft);
    text-shadow: 0 0 24px rgba(244, 197, 66, 0.4);
}

.crash-multiplier.busted {
    color: var(--red);
    text-shadow: 0 0 24px rgba(224, 38, 63, 0.5);
}

.crash-status {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #9a9aa5;
    text-align: center;
    width: 90%;
}

.crash-controls {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== История активности ===== */

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 640px;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
}

.history-list .hist-game {
    color: #9a9aa5;
    flex-shrink: 0;
}

.history-list .hist-amount.win { color: var(--green); font-weight: 600; }
.history-list .hist-amount.lose { color: var(--red); font-weight: 600; }
.history-list .hist-amount.neutral { color: #cfcad6; }

.history-empty {
    color: #7a7a85;
    font-style: italic;
}

/* ===== Footer ===== */

.site-footer {
    padding: 40px 0;
    text-align: center;
    color: #7a7a85;
    font-size: 13.5px;
    border-top: 1px solid var(--panel-border);
}

.footer-muted {
    margin-top: 6px;
    opacity: 0.6;
}

/* ==========================================================
   Планшеты: 769px - 1024px
   ========================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 { font-size: 46px; }
    .roulette-wrap { gap: 36px; }
    .cards-table { gap: 36px; padding: 32px; }
    .vip-tiers { grid-template-columns: repeat(3, 1fr); }
    .crash-panel { flex-direction: column; }
    .crash-graph {
        flex: none;
        width: 100%;
        min-width: 0;
    }
    .crash-controls {
        flex: none;
        width: 100%;
    }
}

/* ==========================================================
   Мобильные: до 768px
   ========================================================== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        padding: 14px 16px;
    }
    .site-header nav ul {
        gap: 16px;
    }

    .hero { padding: 60px 0 60px; }
    .hero h1 { font-size: 34px; }
    .hero-lead { font-size: 15px; }

    .game-section { padding: 56px 0; }
    .game-section h2 { font-size: 22px; }

    .slot-machine {
        padding: 24px;
    }
    .reel {
        width: 70px;
        height: 80px;
        font-size: 34px;
    }

    .roulette-wrap {
        flex-direction: column;
        gap: 30px;
    }
    .wheel-holder {
        width: 220px;
        height: 220px;
    }

    .cards-table {
        flex-direction: column;
        gap: 26px;
        padding: 26px;
    }
    .card-slot {
        justify-content: center;
        width: 100%;
    }
    .playing-card {
        width: 90px;
        height: 130px;
    }

    .header-right {
        gap: 8px;
    }

    .vip-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 24px;
    }
    .vip-badge { justify-content: center; }
    .vip-tiers { grid-template-columns: repeat(2, 1fr); }

    .crash-panel { flex-direction: column; }
    .crash-graph {
        flex: none;
        width: 100%;
        min-width: 0;
        height: 220px;
    }
    .crash-controls {
        flex: none;
        width: 100%;
    }
    .crash-multiplier { font-size: 32px; }

    .history-list li {
        flex-direction: column;
        gap: 4px;
    }
}
