:root {
    --bg: #0e1413;
    --surface: #16211d;
    --surface-2: #1e2c27;
    --text: #eaf1ee;
    --muted: #8ea39b;
    --accent: #2dd4bf;
    --accent-2: #a3e635;
    --on-accent: #06231d;
    --border: #263630;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

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

.site-header { border-bottom: 1px solid var(--border); padding: 14px 0; position: sticky; top: 0; background: rgba(14,20,19,0.85); backdrop-filter: blur(8px); z-index: 10; }
.brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.brand img { display: block; height: 30px; width: auto; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); padding: 24px 0; margin-top: 48px; font-size: 0.9rem; }

main { padding: 24px 0; }
.page-title { font-size: 1.8rem; font-weight: 800; margin: 8px 0 24px; }
.text-muted { color: var(--muted); }

/* card grid */
.girl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.girl-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform .12s ease, border-color .12s ease; }
.girl-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.girl-card-photo { position: relative; aspect-ratio: 3/4; background: var(--surface-2); }
.girl-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.girl-card-nophoto { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .9rem; }
.girl-card-votes { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }
.girl-card-body { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.girl-card-name { font-weight: 700; }

.pager { display: flex; gap: 12px; justify-content: center; margin: 32px 0; }

/* detail */
.back-link { margin: 4px 0 16px; }
.back-link a { color: var(--muted); }
.girl-detail { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 28px; align-items: start; }
.girl-detail-profile { width: 100%; border-radius: 16px; cursor: zoom-in; display: block; }
.girl-detail-info h1 { font-size: 2rem; font-weight: 800; margin: 0 0 16px; }
.girl-bio { line-height: 1.6; margin-top: 18px; max-width: 60ch; }

.btn-vote { background: var(--accent); color: var(--on-accent); border: none; border-radius: 999px; padding: 12px 24px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: filter .12s ease; }
.btn-vote:hover { filter: brightness(1.08); }

/* gallery */
.gallery-title { font-size: 1.3rem; font-weight: 800; margin: 36px 0 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; cursor: zoom-in; display: block; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 10px; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: none; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 32px; line-height: 52px; cursor: pointer; }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* mobile sticky vote bar (shown only on small screens) */
.mobile-vote, .mobile-vote-spacer { display: none; }

@media (max-width: 640px) {
    .page-title { font-size: 1.5rem; }
    .girl-detail { grid-template-columns: 1fr; }
    .girl-detail-info h1 { font-size: 1.6rem; }

    .vote-form { display: none; }
    .mobile-vote-spacer { display: block; height: 76px; }
    .mobile-vote {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(15,15,20,.95); border-top: 1px solid var(--border);
        backdrop-filter: blur(8px); z-index: 20;
    }
    .mobile-vote form { width: 100%; }
    .mobile-vote .btn-vote { width: 100%; }
}

/* ---- landing sections ---- */
html { scroll-behavior: smooth; }

.section { margin: 56px 0; }
.section-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 24px; }

.hero { text-align: center; padding: 48px 0 8px; }
.hero h1 { font-size: 2.8rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 16px; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto 24px; line-height: 1.55; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 12px 26px; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { -webkit-appearance: none; appearance: none; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 12px 26px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: var(--accent); }

.feature-grid, .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature, .step { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.feature-icon { font-size: 1.8rem; }
.feature h3, .step h3 { font-size: 1.1rem; font-weight: 700; margin: 12px 0 6px; }
.feature p, .step p { color: var(--muted); margin: 0; line-height: 1.5; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 720px; margin: 0 auto; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.plan-premium { border-color: var(--accent); }
.plan-badge { position: absolute; top: -12px; right: 20px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.plan .price { font-size: 2rem; font-weight: 800; margin: 0 0 14px; }
.plan .price span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { color: var(--muted); padding: 6px 0; border-top: 1px solid var(--border); }

.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-nav a { color: var(--muted); margin-left: 16px; }
.footer-nav a:first-child { margin-left: 0; }
.footer-nav a:hover { color: var(--text); }
/* Support lives in the header on desktop; it moves to the footer on mobile (see media query). */
.footer-nav .footer-kofi { display: none; color: var(--accent); font-weight: 700; }

.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn-kofi { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.btn-kofi:hover { filter: brightness(1.08); }
/* Beat `.site-nav a { color: var(--muted) }` (higher specificity) so the header button text is white. */
.site-nav a.btn-kofi { color: var(--on-accent); }

/* Support / Ko-fi call-to-action block (home page under the swipe buttons, end of profile page). */
.support-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 420px; margin: 32px auto 0; padding: 22px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.support-cta-text { margin: 0; color: var(--muted); font-size: .95rem; }
.support-cta .btn-kofi { padding: 11px 22px; font-size: .95rem; }

@media (max-width: 640px) {
    .hero { padding: 28px 0 4px; }
    .hero h1 { font-size: 2rem; }
    .hero-sub { font-size: 1.05rem; }
    .section { margin: 40px 0; }

    main { padding: 12px 0; }

    /* Keep the header on one line without clipping the "online" badge. */
    .header-inner { gap: 8px; }
    .site-nav { gap: 10px; }
    .site-nav a { font-size: .9rem; }
    .online-badge { font-size: .8rem; }
    /* Support button is too wide for the top bar here — relocate it to the footer. */
    .site-header .btn-kofi { display: none; }
    .footer-nav .footer-kofi { display: inline; }
}

/* ===== engagement / swipe / rankings ===== */

/* header nav + social proof */
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.online-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.online-badge b { color: var(--accent); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #36d399; animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(54,211,153,.5);} 70%{box-shadow:0 0 0 7px rgba(54,211,153,0);} 100%{box-shadow:0 0 0 0 rgba(54,211,153,0);} }

/* swipe deck */
.swipe-section { max-width: 420px; margin: 0 auto; }
.swipe-headline { text-align: center; font-size: 1.6rem; font-weight: 800; margin: 8px 0 18px; }
.swipe-deck { position: relative; aspect-ratio: 3/4; border-radius: 20px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.swipe-card { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: var(--surface); will-change: transform, opacity; touch-action: pan-y; cursor: grab; }
.swipe-card.animating { transition: transform .32s ease, opacity .32s ease; }
.swipe-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.swipe-card-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,0) 45%); pointer-events: none; }
.swipe-card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; pointer-events: none; }
.swipe-card-info h2 { margin: 0; font-size: 1.6rem; font-weight: 800; }
.swipe-card-info .meta { color: rgba(255,255,255,.75); font-size: .9rem; margin-top: 4px; }
.swipe-card-votes { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.55); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: .9rem; }
.swipe-stamp { position: absolute; top: 22px; padding: 4px 14px; border-radius: 10px; font-weight: 800; font-size: 1.5rem; border: 3px solid; opacity: 0; }
.swipe-stamp.like { left: 18px; color: #36d399; border-color: #36d399; transform: rotate(-12deg); }
.swipe-stamp.nope { right: 18px; color: #ff5b6e; border-color: #ff5b6e; transform: rotate(12deg); }
.swipe-actions { display: flex; justify-content: center; gap: 28px; margin: 20px 0 8px; }
.swipe-btn { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 1.5rem; cursor: pointer; transition: transform .12s ease, border-color .12s; display: flex; align-items: center; justify-content: center; color: var(--text); }
.swipe-btn:hover { transform: scale(1.08); }
.swipe-skip { color: #ff5b6e; }
.swipe-like { color: var(--accent); border-color: var(--accent); background: rgba(45,212,191,.14); }
.swipe-status, .swipe-done { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 24px; color: var(--muted); }
.swipe-done .big { font-size: 2.6rem; margin-bottom: 8px; }
.swipe-done p { margin: 0 0 16px; color: var(--text); font-weight: 600; }

/* On phones, shrink the card so the Like/Skip buttons fit on screen without scrolling.
   `vh` first as a fallback, then `dvh` (accounts for the browser's collapsing toolbar). */
@media (max-width: 640px) {
    .swipe-headline { font-size: 1.25rem; margin: 4px 0 12px; }
    .swipe-deck {
        aspect-ratio: auto;
        height: calc(100vh - 200px);
        height: calc(100dvh - 200px);
        min-height: 280px;
        max-height: 68vh;
    }
    .swipe-actions { gap: 22px; margin: 14px 0 8px; }
    .swipe-btn { width: 56px; height: 56px; font-size: 1.35rem; }
}

/* girl of the week */
.gow { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 24px; background: linear-gradient(135deg, rgba(45,212,191,.16), rgba(163,230,53,.05), var(--surface)); border: 1px solid var(--accent); border-radius: 20px; padding: 20px; align-items: center; }
.gow:hover { filter: brightness(1.03); }
.gow-photo { aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.gow-photo img { width: 100%; height: 100%; object-fit: cover; }
.gow-crown { font-weight: 800; color: var(--accent); letter-spacing: .05em; text-transform: uppercase; font-size: .85rem; }
.gow-info h3 { font-size: 2rem; font-weight: 800; margin: 8px 0; }
.gow-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; }
.gow-stat b { font-size: 1.5rem; display: block; }
.gow-stat span { color: var(--muted); font-size: .82rem; }

/* horizontal scroll row */
.scroll-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.scroll-row .girl-card { flex: 0 0 160px; scroll-snap-align: start; }

/* card badge */
.card-badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--on-accent); font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .03em; }
.card-badge.star { background: #f5a524; }

/* rarity badge (§5.3) — visually distinct per tier; restrained for Faza 1 (no looping animation) */
.rarity-badge { display: inline-flex; align-items: center; vertical-align: middle; font-size: .68rem; font-weight: 800; line-height: 1; padding: 4px 9px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.rarity-common { background: var(--surface-2); color: #b9b9c7; border-color: var(--border); }
.rarity-uncommon { background: rgba(52,199,89,.14); color: #4fe27d; border-color: rgba(52,199,89,.35); }
.rarity-rare { background: rgba(56,132,255,.16); color: #6ea8ff; border-color: rgba(56,132,255,.42); }
.rarity-epic { background: rgba(175,82,222,.18); color: #cd93ff; border-color: rgba(175,82,222,.45); }
.rarity-mythic { background: linear-gradient(135deg, rgba(255,159,10,.22), rgba(163,230,53,.22)); color: #ffd98a; border-color: rgba(255,159,10,.5); }
.rarity-anomaly { background: linear-gradient(135deg, rgba(45,212,191,.26), rgba(163,230,53,.28)); color: #c7f57e; border-color: rgba(45,212,191,.55); box-shadow: 0 0 10px rgba(45,212,191,.22); }

/* profile live stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px; text-align: center; }
.stat b { font-size: 1.45rem; display: block; }
.stat span { color: var(--muted); font-size: .78rem; }
.social-line { color: var(--muted); font-size: .92rem; margin: 4px 0; }
.social-line b { color: var(--text); }

/* info blocks */
.info-block { margin-top: 26px; }
.info-block h2 { font-size: 1.2rem; font-weight: 800; margin: 0 0 12px; }
.info-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.info-row .k { color: var(--muted); font-weight: 600; }
.info-row .v { line-height: 1.5; }

/* chat teaser + waitlist */
.chat-teaser { margin-top: 30px; background: var(--surface); border: 1px dashed var(--border); border-radius: 16px; padding: 24px; text-align: center; }
.chat-teaser h3 { margin: 0 0 6px; font-size: 1.25rem; }
.chat-teaser .lock { color: var(--muted); margin: 0 0 16px; }
.waitlist-form { display: flex; gap: 8px; max-width: 380px; margin: 0 auto; }
.waitlist-form input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 11px 16px; font-size: .95rem; }
.waitlist-form button { background: var(--accent); color: var(--on-accent); border: none; border-radius: 999px; padding: 11px 18px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.waitlist-msg { margin-top: 10px; font-size: .9rem; min-height: 1.2em; }

/* rankings page */
.rank-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.rank-tab { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: .9rem; }
.rank-tab.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; }
.rank-row:hover { border-color: var(--accent); }
.rank-num { font-size: 1.2rem; font-weight: 800; width: 32px; text-align: center; color: var(--muted); flex: 0 0 auto; }
.rank-row.top .rank-num { color: var(--accent); }
.rank-photo { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-weight: 700; }
.rank-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.rank-chip { font-size: .72rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; margin-left: 8px; white-space: nowrap; }
.chip-up { background: rgba(54,211,153,.18); color: #36d399; }
.chip-down { background: rgba(255,91,110,.18); color: #ff5b6e; }
.chip-new { background: var(--accent); color: var(--on-accent); }
.chip-star { background: rgba(245,165,36,.2); color: #f5a524; }
.rank-loading { color: var(--muted); padding: 24px; text-align: center; }

@media (max-width: 640px) {
    .gow { grid-template-columns: 1fr; }
    .info-row { grid-template-columns: 96px 1fr; }
}

/* ===== legal / share ===== */

/* AI disclaimer */
.ai-disclaimer { color: var(--muted); font-size: .82rem; text-align: center; padding: 10px 0 0; }

/* share buttons */
.share-row { display: flex; gap: 8px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.share-row .share-label { color: var(--muted); font-size: .85rem; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; }
.share-btn:hover { border-color: var(--accent); }

/* legal pages */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h1 { font-size: 1.8rem; font-weight: 800; margin: 8px 0 6px; }
.legal h2 { font-size: 1.2rem; font-weight: 700; margin: 24px 0 8px; }
.legal .muted { color: var(--muted); }
.legal a { color: var(--accent); }

/* ===== explore page ===== */
.page-sub { color: var(--muted); max-width: 62ch; line-height: 1.55; margin: -16px 0 22px; }
a.rank-tab { display: inline-flex; align-items: center; }

.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.filter-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.filter-pill { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 13px; font-size: .85rem; font-weight: 700; }
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter-select { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 6px 13px; font-size: .85rem; font-weight: 600; cursor: pointer; max-width: 100%; }
.filter-select:hover, .filter-select:focus { border-color: var(--accent); outline: none; }

.pager { align-items: center; }
.pager .btn-ghost { padding: 9px 18px; font-size: .9rem; }
.pager-info { color: var(--muted); font-size: .9rem; }

.explore-empty { text-align: center; padding: 48px 16px; }
.explore-empty-title { font-weight: 700; margin: 0 0 8px; }
.explore-empty .btn-ghost { display: inline-block; margin-top: 18px; }

/* home: what-is / how-it-works section */
.section-sub { color: var(--muted); max-width: 62ch; line-height: 1.55; margin: -12px 0 24px; }
.section-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
