/* ==========================================================================
   Coinpirat Redesign  —  Design System
   Dark / Neon / Crypto aesthetic · Single source of truth for all pages
   ========================================================================== */

/* ---------- Design Tokens --------------------------------------------------*/
:root {
    /* Brand colors */
    --color-bitcoin:       #F7931A;
    --color-bitcoin-glow:  #FFB84D;
    --color-cyan:          #14F1D9;
    --color-cyan-glow:     #5CFFEA;
    --color-green:         #00E676;
    --color-red:           #FF3366;
    --color-purple:        #A855F7;
    --color-gold:          #FFD700;

    /* Backgrounds (deep space gradient) */
    --bg-0:  #05070F;
    --bg-1:  #0A0E1A;
    --bg-2:  #0F1524;
    --bg-3:  #151B2E;

    /* Surfaces (glassmorphism cards) */
    --surface-1: rgba(20, 27, 45, 0.65);
    --surface-2: rgba(27, 36, 58, 0.75);
    --surface-elevated: rgba(35, 45, 70, 0.9);

    /* Borders */
    --border-subtle:  rgba(247, 147, 26, 0.12);
    --border-default: rgba(247, 147, 26, 0.25);
    --border-strong:  rgba(247, 147, 26, 0.55);

    /* Text */
    --text-primary:   #F5F7FA;
    --text-secondary: #A0A8BD;
    --text-muted:     #6A7389;
    --text-accent:    var(--color-bitcoin);

    /* Typography */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

    /* Shadows / glows */
    --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:  0 20px 50px rgba(0, 0, 0, 0.55);
    --glow-btc:   0 0 24px rgba(247, 147, 26, 0.45);
    --glow-cyan:  0 0 24px rgba(20, 241, 217, 0.45);
    --glow-green: 0 0 24px rgba(0, 230, 118, 0.45);
    --glow-red:   0 0 24px rgba(255, 51, 102, 0.45);

    /* Radii / spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: 160ms;
    --dur-med:  260ms;
    --dur-slow: 520ms;

    /* Layout */
    --nav-height: 68px;
    --container-max: 1280px;
}

/* ---------- Reset / base ---------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
    background: var(--bg-0);
    background-image:
        radial-gradient(ellipse at top left,  rgba(247, 147, 26, 0.08), transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(20, 241, 217, 0.06), transparent 55%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* Animated grid background overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(247, 147, 26, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 147, 26, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    pointer-events: none;
    z-index: 0;
    animation: grid-drift 60s linear infinite;
}

@keyframes grid-drift {
    from { background-position: 0 0; }
    to   { background-position: 50px 50px; }
}

h1, h2, h3, h4 { margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 2.4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.6vw, 1.75rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-secondary); }

a { color: var(--color-cyan); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--color-cyan-glow); }

/* Mono tags for numbers / balances / wallet addresses */
.mono, code, kbd {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
}

/* ---------- Navigation -----------------------------------------------------*/
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}
.nav__brand-logo {
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-bitcoin) 0%, #FF6B00 100%);
    display: grid; place-items: center;
    font-weight: 900; color: #0A0E1A;
    box-shadow: var(--glow-btc);
}
.nav__brand-name span { color: var(--color-bitcoin); }

.nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    list-style: none;
    margin: 0; padding: 0;
}
.nav__item { position: relative; }
.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    transition: all var(--dur-fast) var(--ease-out);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}
.nav__link:hover,
.nav__link--active {
    color: var(--text-primary);
    background: rgba(247, 147, 26, 0.08);
    border-color: var(--border-subtle);
}

.nav__dropdown { position: relative; }
.nav__dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--surface-elevated);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all var(--dur-fast) var(--ease-out);
}
.nav__dropdown:hover .nav__dropdown-panel,
.nav__dropdown:focus-within .nav__dropdown-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nav__dropdown-panel a {
    display: block;
    padding: 9px 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.nav__dropdown-panel a:hover {
    background: rgba(247, 147, 26, 0.12);
    color: var(--color-bitcoin);
}

.nav__stats {
    display: flex;
    gap: 10px;
    align-items: center;
}
.nav__stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(247, 147, 26, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
}
.nav__stat--coins { color: var(--color-gold); border-color: rgba(255, 215, 0, 0.25); background: rgba(255, 215, 0, 0.06); }
.nav__stat--tickets { color: var(--color-cyan); border-color: rgba(20, 241, 217, 0.25); background: rgba(20, 241, 217, 0.06); }

.nav__toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* ---------- Container / layout --------------------------------------------*/
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 32px 24px;
    position: relative;
    z-index: 1;
}

.page-heading {
    margin-bottom: 28px;
}
.page-heading__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-bitcoin);
    margin-bottom: 6px;
}
.page-heading__title {
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, var(--color-bitcoin) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.page-heading__subtitle {
    color: var(--text-secondary);
    margin-top: 6px;
}

.grid {
    display: grid;
    gap: 20px;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ---------- Card -----------------------------------------------------------*/
.card {
    background: var(--surface-1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-med) var(--ease-out),
                border-color var(--dur-med) var(--ease-out),
                box-shadow var(--dur-med) var(--ease-out);
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-bitcoin), transparent);
    opacity: 0.5;
}
.card:hover {
    transform: translateY(-2px);
    border-color: var(--border-default);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(247, 147, 26, 0.1);
}
.card--accent { border-color: var(--border-default); }
.card--hero {
    background:
        radial-gradient(circle at top right, rgba(247, 147, 26, 0.15), transparent 60%),
        var(--surface-1);
}

.card__title { margin: 0 0 4px; font-size: 1.2rem; }
.card__subtitle { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 20px; }

/* ---------- Buttons --------------------------------------------------------*/
.btn {
    --btn-bg: var(--surface-2);
    --btn-fg: var(--text-primary);
    --btn-border: var(--border-default);
    --btn-glow: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--btn-border);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    user-select: none;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                opacity var(--dur-fast);
    box-shadow: 0 0 0 0 var(--btn-glow);
    position: relative;
    overflow: hidden;
}
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 24px var(--btn-glow);
}
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left var(--dur-slow);
}
.btn:hover:not(:disabled)::after { left: 100%; }

.btn--primary {
    --btn-bg: linear-gradient(135deg, var(--color-bitcoin) 0%, #FF6B00 100%);
    --btn-fg: #0A0E1A;
    --btn-border: transparent;
    --btn-glow: rgba(247, 147, 26, 0.55);
}
.btn--secondary {
    --btn-bg: linear-gradient(135deg, var(--color-cyan) 0%, #00B8D4 100%);
    --btn-fg: #0A0E1A;
    --btn-border: transparent;
    --btn-glow: rgba(20, 241, 217, 0.55);
}
.btn--success {
    --btn-bg: linear-gradient(135deg, var(--color-green) 0%, #00B248 100%);
    --btn-fg: #0A0E1A;
    --btn-border: transparent;
    --btn-glow: rgba(0, 230, 118, 0.5);
}
.btn--danger {
    --btn-bg: linear-gradient(135deg, var(--color-red) 0%, #C40045 100%);
    --btn-fg: #fff;
    --btn-border: transparent;
    --btn-glow: rgba(255, 51, 102, 0.5);
}
.btn--ghost {
    --btn-bg: transparent;
    --btn-border: var(--border-default);
}
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--lg { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- Forms ----------------------------------------------------------*/
.field {
    margin-bottom: 16px;
}
.field__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    text-transform: uppercase;
}
.input,
input[type="text"].input,
input[type="email"].input,
input[type="password"].input,
input[type="number"].input,
select.input,
textarea.input {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: rgba(5, 7, 15, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
    outline: none;
}
.input:focus {
    border-color: var(--color-bitcoin);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.18);
    background: rgba(5, 7, 15, 0.9);
}
.input::placeholder { color: var(--text-muted); }
.input[readonly] {
    background: rgba(5, 7, 15, 0.3);
    color: var(--text-muted);
    cursor: not-allowed;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23A0A8BD' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.checkbox {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
    font-size: 0.9rem; color: var(--text-secondary);
}
.checkbox input {
    appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--border-default);
    border-radius: 4px;
    background: rgba(5, 7, 15, 0.6);
    display: grid; place-items: center;
    cursor: pointer;
    transition: all var(--dur-fast);
}
.checkbox input:checked {
    background: var(--color-bitcoin);
    border-color: var(--color-bitcoin);
}
.checkbox input:checked::after {
    content: '✓';
    color: #0A0E1A;
    font-size: 13px;
    font-weight: 900;
}

/* ---------- Stats / metric tiles -------------------------------------------*/
.stat {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-med), border-color var(--dur-med);
}
.stat:hover { transform: translateY(-2px); border-color: var(--border-default); }
.stat__label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 8px;
}
.stat__value {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.1;
}
.stat__value sup { font-size: 0.55em; color: var(--text-muted); }
.stat__value--btc  { color: var(--color-bitcoin); }
.stat__value--coins { color: var(--color-gold); }
.stat__value--tickets { color: var(--color-cyan); }

.stat__icon {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 1.6rem;
    opacity: 0.7;
}

/* ---------- Bitcoin display ------------------------------------------------*/
.bitcoin-display {
    display: inline-flex;
    align-items: flex-start;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-bitcoin);
}
.bitcoin-display sup { font-size: 0.55em; opacity: 0.7; margin-left: 1px; }

/* ---------- Circular timer (faucet) ---------------------------------------*/
.ring {
    --ring-size: 220px;
    --ring-stroke: 10px;
    --ring-progress: 0;
    width: var(--ring-size);
    height: var(--ring-size);
    position: relative;
    margin: 0 auto;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: rgba(247, 147, 26, 0.08); stroke-width: var(--ring-stroke); }
.ring__fill {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: var(--ring-stroke);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 8px rgba(247, 147, 26, 0.55));
}
.ring__inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.ring__number {
    font-family: var(--font-mono);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.ring__label {
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ring--ready .ring__fill { stroke: var(--color-green); filter: drop-shadow(0 0 12px rgba(0,230,118,0.6)); }
.ring--ready .ring__number { color: var(--color-green); animation: pulse-scale 1.4s ease-in-out infinite; }

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

/* ---------- Coin drop animation --------------------------------------------*/
.coin-rain { position: fixed; inset: 0; pointer-events: none; z-index: 9000; overflow: hidden; }
.coin-rain__coin {
    position: absolute;
    top: -40px;
    font-size: 28px;
    animation: coin-fall 2.4s cubic-bezier(0.55, 0.0, 0.68, 1) forwards;
}
@keyframes coin-fall {
    0%   { transform: translateY(-40px) rotate(0deg); opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ---------- Lotto slot-machine ---------------------------------------------*/
.slot-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 0;
}
.slot {
    width: 74px;
    height: 92px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #0A0E1A 0%, #151B2E 100%);
    border: 1px solid var(--border-default);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--color-bitcoin);
    overflow: hidden;
    position: relative;
}
.slot::before, .slot::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 26px;
    pointer-events: none;
    z-index: 2;
}
.slot::before { top: 0;    background: linear-gradient(180deg, #0A0E1A, transparent); }
.slot::after  { bottom: 0; background: linear-gradient(0deg, #0A0E1A, transparent); }
.slot__reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 92px;
    transition: transform 2.6s cubic-bezier(0.22, 0.85, 0.12, 1.0);
    will-change: transform;
}
.slot__reel > span { height: 92px; display: block; }

.slot--hit {
    border-color: var(--color-green);
    box-shadow: 0 0 0 1px var(--color-green), 0 0 18px rgba(0, 230, 118, 0.55);
    animation: slot-pop 0.5s var(--ease-snap);
}
.slot--hit .slot__reel > span:last-child { color: var(--color-green); }
@keyframes slot-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* Number grid — picked / drawn / match states */
.lotto-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    max-width: 380px;
    margin: 0 auto;
}
.lotto-ball {
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(5, 7, 15, 0.6);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all var(--dur-fast);
}
.lotto-ball.drawn {
    background: linear-gradient(135deg, var(--color-bitcoin), #FF6B00);
    color: #0A0E1A;
    border-color: transparent;
    box-shadow: var(--glow-btc);
}
.lotto-ball.match {
    background: linear-gradient(135deg, var(--color-green), #00B248);
    color: #0A0E1A;
    border-color: transparent;
    box-shadow: var(--glow-green);
    animation: slot-pop 0.6s var(--ease-snap);
}

/* Number picker inputs (1..49) */
.num-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.num-picker input {
    -moz-appearance: textfield;
    appearance: textfield;
    width: 100%;
    padding: 14px 8px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-bitcoin);
    background: rgba(5, 7, 15, 0.7);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.num-picker input::-webkit-inner-spin-button,
.num-picker input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num-picker input:focus {
    outline: none;
    border-color: var(--color-bitcoin);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.22);
}

/* ---------- Toast ----------------------------------------------------------*/
.toast-host {
    position: fixed;
    top: 84px; right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.toast {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--color-cyan);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
    animation: toast-in var(--dur-med) var(--ease-snap);
}
.toast--success { border-left-color: var(--color-green); }
.toast--error   { border-left-color: var(--color-red); }
.toast--warn    { border-left-color: var(--color-bitcoin); }
.toast.leaving { animation: toast-out var(--dur-med) var(--ease-out) forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to   { opacity: 0; transform: translateX(40px); } }

/* ---------- Table ----------------------------------------------------------*/
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th, .table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.table th {
    background: rgba(5, 7, 15, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}
.table tr:hover td { background: rgba(247, 147, 26, 0.04); }
.table td.mono, .table td .mono { font-family: var(--font-mono); }

/* ---------- Footer ---------------------------------------------------------*/
.site-footer {
    margin-top: 60px;
    padding: 24px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(5, 7, 15, 0.5);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}
.site-footer a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--dur-fast);
}
.site-footer a:hover { color: var(--color-bitcoin); }

/* ---------- Modal / cookie overlay -----------------------------------------*/
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 15, 0.82);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    animation: fade-in var(--dur-med);
}
.overlay[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.overlay__card {
    max-width: 440px;
    width: 100%;
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: pop-in var(--dur-med) var(--ease-snap);
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.9) translateY(20px); } }

/* ---------- Hero / landing -------------------------------------------------*/
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: grid;
    place-items: center;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    max-width: var(--container-max);
    width: 100%;
    gap: 40px;
    align-items: center;
}
.hero__title {
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
}
.hero__title span {
    background: linear-gradient(135deg, var(--color-bitcoin), var(--color-cyan));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: 1.05rem; color: var(--text-secondary); margin: 0 0 26px; max-width: 52ch; }

.auth-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: rgba(5,7,15,0.6); padding: 4px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--dur-fast);
    font-family: inherit;
}
.auth-tab--active { background: var(--color-bitcoin); color: #0A0E1A; }

.auth-panel { display: none; }
.auth-panel--active { display: block; animation: panel-in var(--dur-med) var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Utility --------------------------------------------------------*/
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--color-bitcoin); }
.text-cyan { color: var(--color-cyan); }
.text-green { color: var(--color-green); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Responsive -----------------------------------------------------*/
@media (max-width: 960px) {
    .hero__inner { grid-template-columns: 1fr; }
    .nav__menu { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 16px; border-bottom: 1px solid var(--border-subtle); }
    .nav__menu--open { display: flex; }
    .nav__menu .nav__dropdown-panel { position: static; opacity: 1; transform: none; pointer-events: auto; margin-top: 6px; }
    .nav__toggle { display: inline-flex; }
    .nav__stats { margin-left: auto; }
}

@media (max-width: 560px) {
    .container { padding: 20px 14px; }
    .card { padding: 20px; }
    .num-picker { grid-template-columns: repeat(3, 1fr); }
    .ring { --ring-size: 180px; }
    .ring__number { font-size: 2rem; }
    .nav__stat { font-size: 0.78rem; padding: 5px 10px; }
    .slot { width: 58px; height: 76px; font-size: 1.6rem; }
    .slot__reel { line-height: 76px; }
    .slot__reel > span { height: 76px; }
    .toast-host { top: 76px; left: 14px; right: 14px; max-width: none; }
}

/* ---------- Reduced motion -------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::before { animation: none; }
}
