/* =========================================================
   101010 CASH AUCTION — APP.CSS V3 THEME SYSTEM
   Single source of truth for public UI.
   ========================================================= */

/* 1) GLOBAL THEME VARIABLES */
:root {
    /* Widths */
    --site-max-width: 1100px;
    --hero-width: 1100px;
    --content-width: 950px;
    --form-width: 700px;
    --nav-width: 1100px;

    /* Background */
    --site-background: radial-gradient(circle at top left, #0f172a, #020617 62%);
    --section-background: transparent;

    /* Colors */
    --site-text: #f8fafc;
    --site-muted: #94a3b8;
    --site-yellow: #facc15;
    --site-yellow-hover: #fde047;
    --site-green: #22c55e;
    --site-danger: #ef4444;
    --site-orange: #f97316;
    --site-blue: #38bdf8;

    /* Lines */
    --site-border: rgba(148, 163, 184, 0.22);
    --site-row-border: rgba(148, 163, 184, 0.14);
    --site-soft-border: rgba(148, 163, 184, 0.10);
    --section-divider: 1px solid var(--site-border);
    --row-divider: 1px solid var(--site-row-border);
    --row-soft-divider: 1px solid var(--site-soft-border);

    /* Navigation */
    --nav-bottom-gap: 28px;
    --nav-padding-y: 16px;
    --nav-padding-x: 0px;
    --nav-bg: transparent;
    --nav-border: none;
    --nav-bottom-border: 1px solid var(--site-border);
    --nav-radius: 0px;
    --nav-shadow: none;
    --nav-logo-size: 1.35rem;
    --nav-name-size: 0.9rem;
    --nav-link-size: 0.92rem;
    --nav-link-gap: 14px;

    /* Mobile navigation */
    --mobile-nav-bottom-gap: 22px;
    --mobile-menu-bg: rgba(2, 6, 23, 0.98);
    --mobile-menu-border: 1px solid var(--site-border);
    --mobile-menu-radius: 14px;
    --mobile-menu-shadow: 0 18px 45px rgba(0,0,0,0.45);

    /* Hero */
    --hero-logo-size: clamp(5.5rem, 17vw, 8.8rem);
    --hero-logo-weight: 850;
    --hero-logo-spacing: -0.08em;
    --hero-subtitle-size: clamp(3rem, 8vw, 4.8rem);
    --hero-subtitle-weight: 500;
    --hero-subtitle-spacing: -0.055em;
    --hero-slogan-size: clamp(1rem, 2.5vw, 1.55rem);
    --hero-slogan-weight: 550;
    --hero-bottom-gap: 34px;
    --mobile-hero-logo-size: clamp(3.6rem, 18vw, 4.9rem);
    --mobile-hero-subtitle-size: clamp(1.9rem, 9vw, 2.65rem);

    /* Stats */
    --stat-number-size: 2rem;
    --stat-label-size: 0.9rem;
    --stat-padding-y: 10px;
    --stat-padding-x: 28px;

    /* Section headings */
    --section-title-size: clamp(1.55rem, 3vw, 2rem);
    --section-title-weight: 620;
    --section-title-spacing: -0.02em;
    --section-title-line-height: 1.08;
    --section-subtitle-size: 0.95rem;
    --section-subtitle-weight: 400;
    --section-subtitle-line-height: 1.45;
    --section-gap-top: 34px;
    --section-gap-bottom: 42px;

    /* Rows */
    --row-title-size: clamp(1.25rem, 2.6vw, 1.65rem);
    --row-title-weight: 650;
    --row-body-size: 0.92rem;
    --row-padding-bottom: 18px;
    --row-gap: 18px;

    /* Buttons */
    --button-bg: var(--site-yellow);
    --button-hover-bg: var(--site-yellow-hover);
    --button-text: #0f172a;
    --button-radius: 12px;
    --button-height: 40px;
    --button-padding-x: 14px;
    --button-font-size: 0.9rem;
    --button-font-weight: 750;
    --button-shadow: 0 10px 22px rgba(250,204,21,0.14);

    /* Forms */
    --input-bg: rgba(2, 6, 23, 0.72);
    --input-border: rgba(148, 163, 184, 0.28);
    --input-focus-border: var(--site-yellow);
    --input-radius: 16px;
    --input-padding-y: 14px;
    --input-padding-x: 16px;

    /* FAQ */
    --faq-question-color: var(--site-yellow);
    --faq-question-size: clamp(1.35rem, 3vw, 1.75rem);
    --faq-question-weight: 700;
    --faq-answer-size: clamp(1rem, 1.7vw, 1.08rem);
    --faq-answer-line-height: 1.8;
}

/* 2) Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--site-background); }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--site-background);
    color: var(--site-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* 3) Page widths */
.page-shell {
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 22px 16px 32px;
    background: transparent;
}
.content-width,
.home-line-page .content-width,
.line-section.content-width,
.line-stats.content-width,
.faq-list.content-width,
.faq-cta.content-width,
.public-section.content-width {
    width: 100%;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    background: transparent;
}
.hero-lockup,
.line-hero,
.how-hero {
    width: 100%;
    max-width: var(--hero-width);
    margin: 0 auto var(--hero-bottom-gap);
    text-align: center;
    background: transparent;
}
.form-stack,
.buy-find-form,
.page-center form {
    width: 100%;
    max-width: var(--form-width);
    margin-left: auto;
    margin-right: auto;
}

/* 4) Navigation */
.site-nav {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: var(--nav-width);
    margin: 0 auto var(--nav-bottom-gap);
    padding: var(--nav-padding-y) var(--nav-padding-x);
    background: var(--nav-bg);
    border: var(--nav-border);
    border-bottom: var(--nav-bottom-border);
    border-radius: var(--nav-radius);
    box-shadow: var(--nav-shadow);
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.nav-brand { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.nav-logo { color: var(--site-yellow); font-weight: 800; font-size: var(--nav-logo-size); }
.nav-name { color: var(--site-muted); font-weight: 600; font-size: var(--nav-name-size); }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: var(--nav-link-gap); }
.nav-link,
.nav-admin {
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    background: transparent;
    border-radius: 0;
    color: #cbd5e1;
    font-size: var(--nav-link-size);
    text-decoration: none;
}
.nav-link:hover,
.nav-admin:hover { background: transparent; color: #fff; }
.mobile-menu-btn { display: none; }

/* 5) Hero */
.text-brand {
    font-size: var(--hero-logo-size);
    font-weight: var(--hero-logo-weight);
    letter-spacing: var(--hero-logo-spacing);
    line-height: 0.82;
    margin: 0;
}
.text-logo-sub {
    font-size: var(--hero-subtitle-size);
    font-weight: var(--hero-subtitle-weight);
    letter-spacing: var(--hero-subtitle-spacing);
    line-height: 0.95;
    color: #e2e8f0;
}
.text-slogan,
.hero-slogan {
    font-size: var(--hero-slogan-size);
    font-weight: var(--hero-slogan-weight);
    color: #e2e8f0;
}
.line-slogan,
.hero-slogan {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.text-slogan-number,
.hero-pricing-line strong,
.highlight,
.slot-mark { color: var(--site-yellow); }
.hero-pricing-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 18px;
    color: #e2e8f0;
}
.hero-trust,
.text-meta,
.row-sub,
.public-row-sub { color: var(--site-muted); }
.hero-trust { max-width: 720px; margin: 18px auto 0; text-align: center; }

/* 6) Stats */
.line-stats { display: flex; justify-content: center; margin-bottom: 30px; }
.line-stat {
    padding: var(--stat-padding-y) var(--stat-padding-x);
    text-align: center;
    position: relative;
}
.line-stat:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background: rgba(255,255,255,0.25);
}
.line-stat strong { display: block; color: var(--site-text); font-size: var(--stat-number-size); }
.line-stat span { color: var(--site-muted); font-size: var(--stat-label-size); }

/* 7) Section headings */
.line-section,
.public-section,
.faq-section {
    border-top: var(--section-divider);
    padding-top: var(--section-gap-top);
    margin-bottom: var(--section-gap-bottom);
    background: var(--section-background);
}
.line-section-head,
.public-section-head,
.section-header,
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}
.line-section-head > div,
.public-section-head > div,
.section-header > div,
.section-header-row > div {
    min-width: 0;
    flex: 1 1 auto;
}
.line-section-head h2,
.public-section-title,
.section-header h1,
.section-header h2,
.section-header-row h1,
.section-header-row h2,
.text-heading {
    margin: 0;
    color: var(--site-text);
    font-size: var(--section-title-size);
    font-weight: var(--section-title-weight);
    letter-spacing: var(--section-title-spacing);
    line-height: var(--section-title-line-height);
}
.line-section-head p,
.public-section-subtitle,
.section-header p,
.section-header-row p {
    margin: 7px 0 0;
    color: var(--site-muted);
    font-size: var(--section-subtitle-size);
    font-weight: var(--section-subtitle-weight);
    line-height: var(--section-subtitle-line-height);
}

/* 8) Rows */
.line-draw,
.row-block,
.public-row {
    padding: 4px 0 var(--row-padding-bottom);
    border-bottom: var(--row-divider);
    background: transparent;
}
.line-draw-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--row-gap);
    margin-bottom: 12px;
}
.line-draw-head > div { min-width: 0; flex: 1 1 auto; }
.line-draw-head h3,
.row-title,
.public-row-title {
    margin: 0;
    color: var(--site-text);
    font-size: var(--row-title-size);
    font-weight: var(--row-title-weight);
    line-height: 1.05;
}
.line-draw-head p,
.row-sub,
.public-row-sub {
    margin: 6px 0 0;
    font-size: 0.94rem;
    line-height: 1.4;
}

/* 9) Current/locked draw */
.line-prize-badge {
    display: inline-block;
    margin: 6px 0 14px;
    color: var(--site-yellow);
    font-weight: 750;
    font-size: 1.05rem;
}
.line-participant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
}
.line-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 4px 0;
    border-bottom: var(--row-soft-divider);
    font-size: var(--row-body-size);
}
.line-slot span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-slot.filled { color: #dcfce7; }
.line-slot.empty { color: var(--site-muted); }
.line-lock-note { margin: 14px 0 0; color: var(--site-muted); font-size: 0.88rem; }
.progress-track,
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(2, 6, 23, 0.85);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--site-yellow), var(--site-orange));
    border-radius: 999px;
}
.line-progress { margin-top: 16px; }

/* 10) Buttons */
.gold-line-button,
.cta-button,
button[type="submit"],
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--button-height);
    padding: 10px var(--button-padding-x);
    border: 0;
    border-radius: var(--button-radius);
    background: var(--button-bg);
    color: var(--button-text);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--button-shadow);
    text-decoration: none;
}
.gold-line-button:hover,
.cta-button:hover,
button[type="submit"]:hover,
.btn-primary:hover { background: var(--button-hover-bg); }
.cta-inline { width: auto; }

/* 11) Recent winners */
.line-winner-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .7fr) max-content;
    align-items: start;
    gap: 18px;
    padding: 18px 0;
    border-bottom: var(--row-divider);
    background: transparent;
}
.line-winner-row h3 { margin: 0; color: var(--site-text); font-size: 1.1rem; font-weight: 650; }
.line-winner-row p { margin: 5px 0 0; color: var(--site-muted); font-size: 0.88rem; }
.line-winner-row strong {
    display: block;
    margin-top: 4px;
    color: var(--site-text);
    font-size: 1rem;
    font-weight: 650;
}
.line-winner-row .gold-line-button { justify-self: end; align-self: start; }
.mini-label {
    color: var(--site-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* 12) Trust */
.line-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 26px;
}
.line-trust-grid div {
    padding-bottom: 9px;
    border-bottom: var(--row-soft-divider);
    color: #dbeafe;
    line-height: 1.45;
}

/* 13) FAQ */
.faq-list { display: block; background: transparent; }
.faq-item {
    background: transparent;
    box-shadow: none;
    border: none;
    border-bottom: var(--section-divider);
    border-radius: 0;
    padding: 34px 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h2 {
    margin: 0 0 16px;
    color: var(--faq-question-color);
    font-size: var(--faq-question-size);
    font-weight: var(--faq-question-weight);
    line-height: 1.22;
    letter-spacing: -0.02em;
}
.faq-item p {
    margin: 0;
    max-width: 860px;
    color: #d1d5db;
    font-size: var(--faq-answer-size);
    font-weight: 400;
    line-height: var(--faq-answer-line-height);
}
.faq-item strong { color: var(--site-text); font-weight: 650; }
.faq-cta {
    margin-top: 54px;
    padding: 34px 0 10px;
    border-top: var(--section-divider);
    text-align: center;
    background: transparent;
}
.faq-cta h2 {
    margin: 0 0 10px;
    color: var(--site-text);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}
.faq-cta p {
    margin: 0 auto;
    max-width: 720px;
    color: var(--site-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* 14) Forms */
.card,
.card-soft,
.panel-dark,
.stats-panel,
.public-card {
    background: transparent;
    box-shadow: none;
    border: none;
}
.input,
input[type="email"],
input[type="text"],
input[type="search"] {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--site-text);
    border-radius: var(--input-radius);
    padding: var(--input-padding-y) var(--input-padding-x);
    font-size: 1rem;
    outline: none;
}
.input:focus,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="search"]:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
}
.form-stack { display: grid; gap: 22px; }
.form-label { display: block; margin-bottom: 10px; color: var(--site-text); font-weight: 650; }
.text-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--site-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.text-value { font-size: clamp(1.35rem, 4vw, 2.1rem); font-weight: 700; line-height: 1.1; }
.text-content { font-size: 1rem; line-height: 1.65; }
.success-panel {
    border-top: var(--row-divider);
    border-bottom: var(--row-divider);
    padding: 20px 0;
    background: transparent;
}
.error-panel {
    border-top: 1px solid rgba(239, 68, 68, 0.35);
    border-bottom: 1px solid rgba(239, 68, 68, 0.35);
    padding: 16px 0;
    background: transparent;
    color: #fecaca;
}
.ticket-code {
    text-align: center;
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 850;
    color: var(--site-yellow);
    letter-spacing: -0.06em;
}
.bot-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    pointer-events: none !important;
}
.centered { text-align: center; }
.section-gap { margin-top: 28px; }
.section-gap-sm { margin-top: 18px; }
.section-gap-xs { margin-top: 12px; }
.no-margin { margin: 0; }
.break-text { overflow-wrap: anywhere; word-break: break-word; }
.quiet-link { color: var(--site-muted); font-size: 0.92rem; }

/* 15) Tables/admin-safe */
.table-wrap { overflow-x: auto; }
.clean-table { width: 100%; border-collapse: collapse; }
.clean-table th,
.clean-table td {
    padding: 14px 10px;
    border-bottom: var(--row-divider);
    text-align: left;
    vertical-align: middle;
}
.clean-table th { color: var(--site-muted); font-weight: 650; font-size: 0.9rem; }
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 0.78rem;
}
.badge-yellow { background: var(--site-yellow); color: #0f172a; }
.badge-green { background: #16a34a; color: white; }
.badge-orange { background: var(--site-orange); color: white; }

/* 16) Mobile */
@media (max-width: 760px) {
    :root {
        --content-width: 100%;
        --form-width: 100%;
        --stat-number-size: 1.75rem;
        --stat-padding-y: 16px;
        --stat-padding-x: 8px;
    }

    .page-shell { padding-top: 18px; }

    .site-nav {
        width: 100%;
        max-width: var(--site-max-width);
        margin: 0 auto var(--mobile-nav-bottom-gap);
        padding: 12px 0;
        background: transparent;
        border: none;
        border-bottom: var(--nav-bottom-border);
        border-radius: 0;
        box-shadow: none;
    }

    .nav-logo { font-size: 1.05rem; }
    .nav-name { display: none; }

    .mobile-menu-btn {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        cursor: pointer;
    }

    .mobile-menu-btn span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 999px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        z-index: 9999;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        background: var(--mobile-menu-bg);
        border: var(--mobile-menu-border);
        border-radius: var(--mobile-menu-radius);
        box-shadow: var(--mobile-menu-shadow);
    }

    .nav-links.open { display: flex; }

    .nav-link,
    .nav-admin {
        display: block;
        width: 100%;
        margin: 0;
        padding: 14px 12px;
        text-align: left;
        border-radius: 10px;
    }

    .nav-link:hover,
    .nav-admin:hover { background: rgba(255,255,255,0.08); }

    .text-brand { font-size: var(--mobile-hero-logo-size); }
    .text-logo-sub { font-size: var(--mobile-hero-subtitle-size); }

    .line-slogan,
    .hero-slogan {
        gap: 8px 14px;
        margin-top: 18px;
    }

    .hero-pricing-line { gap: 10px 18px; }

    .line-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 30px;
    }

    .line-stat {
        min-width: 0;
        border: 1px solid rgba(255,255,255,0.12);
    }

    .line-stat:not(:last-child)::after { display: none; }

    .line-draw-head,
    .line-section-head,
    .public-section-head,
    .action-head,
    .section-header,
    .section-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .gold-line-button,
    .cta-button,
    button[type="submit"] {
        width: 100%;
        max-width: none;
        min-height: 44px;
    }

    .line-participant-grid,
    .line-trust-grid {
        grid-template-columns: 1fr;
    }

    .line-winner-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 0;
    }

    .line-winner-row .gold-line-button {
        justify-self: stretch;
    }

    .faq-item {
        padding: 26px 0;
    }

    .faq-item h2 {
        margin-bottom: 12px;
    }
}

/* =========================================================
   V3 PATCH — GLOBAL BACKGROUND, NAV WIDTH, DRAW DETAILS
   ========================================================= */

:root {
    /* background is now a solid base plus fixed viewport glow */
    --site-background: #020617;
    --site-background-glow:
        radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0) 62%);

    /* nav follows the same global page width */
    --nav-width: var(--site-max-width);
}

html,
body {
    background: var(--site-background) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--site-background-glow);
}

/* keep nav aligned with global site width */
.site-nav {
    max-width: var(--nav-width) !important;
}

/* Draw detail divider layout */
.detail-metric-grid,
.verification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    border-top: var(--row-divider);
}

.detail-metric,
.verification-metric {
    padding: 16px 0;
    border-bottom: var(--row-divider);
}

.detail-metric .text-label,
.verification-metric .text-label {
    margin-bottom: 6px;
}

.entry-list {
    display: grid;
    gap: 0;
}

.entry-row-clean {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr) max-content;
    align-items: center;
    gap: 18px;
    padding: 12px 0;
    border-bottom: var(--row-soft-divider);
    color: var(--site-muted);
}

.entry-row-clean strong {
    color: var(--site-text);
}

.entry-row-clean.entry-winner {
    color: var(--site-yellow);
}

.entry-row-clean.entry-winner strong,
.entry-row-clean.entry-winner span {
    color: var(--site-yellow);
    font-weight: 750;
}

.details-block {
    border-top: var(--row-divider);
    border-bottom: var(--row-divider);
    padding: 16px 0;
}

.details-block summary {
    cursor: pointer;
    color: var(--site-yellow);
    font-weight: 750;
}

.code-block {
    width: 100%;
    max-width: 100%;
    margin: 16px 0 0;
    padding: 16px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--site-row-border);
    border-radius: 12px;
    color: #d1d5db;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow-x: hidden;
    font-size: 0.82rem;
    line-height: 1.55;
}

@media (max-width: 760px) {
    .detail-metric-grid,
    .verification-grid {
        grid-template-columns: 1fr;
    }

    .entry-row-clean {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
