/* ══════════════════════════════════════════════════════════════
   THE PIRAMID — Egyptian Dark Gold Theme
   Fonts: Cinzel Decorative (headings), Cinzel (nav/tier), Inter (body)
   ══════════════════════════════════════════════════════════════ */

:root {
    --bg: #0a0a0a;
    --bg-alt: #0f0e0b;
    --gold: #d4af37;
    --gold-dark: #b8960c;
    --gold-dim: #8a6f1b;
    --gold-glow: rgba(212, 175, 55, 0.15);
    --gold-glow-strong: rgba(212, 175, 55, 0.35);
    --sand: #c2a04e;
    --sand-dim: #3d3422;
    --text: #e8e0d0;
    --text-dim: #9a8e78;
    --text-muted: #5c5347;
    --border: rgba(212, 175, 55, 0.12);
    --border-bright: rgba(212, 175, 55, 0.3);
    --nav-h: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

::selection {
    background: var(--gold-dark);
    color: #000;
}

/* ── Particles canvas ─────────────────────────────────────── */

#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ── Sand curtain (entrance animation) ────────────────────── */

.sand-curtain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(180deg, #1a1508 0%, #2c2010 40%, #c2a04e 100%);
    transition: opacity 1s ease, transform 1.2s ease;
}

.sand-curtain.lifted {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

/* ── Navbar ────────────────────────────────────────────────── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: var(--border-bright);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-mc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--gold);
    background: var(--gold-glow);
}

.connect-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-left: 12px;
    flex-shrink: 0;
}

.connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--gold-glow-strong);
}

/* Burger (mobile) */

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.2s;
}

.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse 120% 60% at 50% 100%, rgba(194, 160, 78, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(184, 150, 12, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 80% 50% at 80% 80%, rgba(184, 150, 12, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a0a 0%, #12100a 40%, #1a150c 70%, #0a0a0a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(212, 175, 55, 0.015) 2px,
            rgba(212, 175, 55, 0.015) 4px
        );
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(194, 160, 78, 0.04) 40%,
            rgba(194, 160, 78, 0.08) 70%,
            rgba(10, 10, 10, 1) 100%
        );
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 800px;
}

.hero-heading {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 60px rgba(212, 175, 55, 0.4), 0 4px 24px rgba(0, 0, 0, 0.6);
    margin-bottom: 16px;
    letter-spacing: 3px;
}

.hero-tagline {
    font-family: 'Cinzel', serif;
    font-size: clamp(16px, 2.5vw, 22px);
    color: var(--sand);
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 15px;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ── Hero CA ── */

.hero-ca {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.hero-ca:hover {
    border-color: var(--gold-dark);
    background: rgba(212, 175, 55, 0.06);
}

.ca-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ca-addr {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.ca-copied {
    font-size: 11px;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: 4px;
}

.ca-copied.show {
    opacity: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
}

.stat-value {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}


/* ── Sections ─────────────────────────────────────────────── */

.section {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.section-alt {
    background: var(--bg-alt);
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.section-heading {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.section-sub {
    font-size: 15px;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.placeholder-box {
    border: 1px dashed var(--border-bright);
    border-radius: 12px;
    padding: 80px 24px;
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    background: var(--gold-glow);
}

/* ── Pyramid visualisation ─────────────────────────────────── */

.pyramid-wrap {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Central spine line */
.pyr-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 48px;
    width: 2px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 60%, transparent 100%);
    transform: translateX(-50%);
    opacity: 0.3;
    z-index: 0;
}

/* Each tier row */
.pyr-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 18px 0;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pyr-row.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger delays applied via JS, but provide CSS fallback */
.pyr-row:nth-child(1) { transition-delay: 0s; }
.pyr-row:nth-child(2) { transition-delay: 0.15s; }
.pyr-row:nth-child(3) { transition-delay: 0.3s; }
.pyr-row:nth-child(4) { transition-delay: 0.45s; }

/* The block (trapezoid visual) */
.pyr-block {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.pyr-row:hover .pyr-block {
    transform: scale(1.08);
}

.pyr-icon {
    font-size: 28px;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.pyr-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.pyr-row:hover .pyr-icon-img {
    transform: scale(1.1);
}

/* Pharaoh block — widest at top of visual but smallest tier */
.pyr-pharaoh .pyr-icon-img {
    width: 80px;
    height: 80px;
}

.pyr-pharaoh .pyr-block {
    width: 80px;
    height: 72px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.06) 100%);
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    border-bottom: 2px solid var(--gold);
}

.pyr-priests .pyr-block {
    width: 140px;
    height: 64px;
    background: linear-gradient(180deg, rgba(160, 100, 220, 0.18) 0%, rgba(160, 100, 220, 0.05) 100%);
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    border-bottom: 2px solid #a064dc;
}

.pyr-scribes .pyr-block {
    width: 210px;
    height: 60px;
    background: linear-gradient(180deg, rgba(80, 140, 220, 0.16) 0%, rgba(80, 140, 220, 0.04) 100%);
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    border-bottom: 2px solid #508cdc;
}

.pyr-workers .pyr-block {
    width: 300px;
    height: 56px;
    background: linear-gradient(180deg, rgba(194, 160, 78, 0.12) 0%, rgba(194, 160, 78, 0.03) 100%);
    clip-path: polygon(6% 0%, 94% 0%, 100% 100%, 0% 100%);
    border-bottom: 2px solid var(--sand-dim);
}

/* Pharaoh glow */
.pyr-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
    animation: pharaohGlow 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes pharaohGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Info panel */
.pyr-info {
    max-width: 240px;
    text-align: left;
}

.pyr-info-left {
    text-align: right;
}

.pyr-tier-name {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.tier-gold { color: var(--gold); text-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }
.tier-purple { color: #b880ee; text-shadow: 0 0 20px rgba(160, 100, 220, 0.3); }
.tier-blue { color: #6ea8f0; text-shadow: 0 0 20px rgba(80, 140, 220, 0.3); }
.tier-sand { color: var(--sand); }

.pyr-rank {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.pyr-pool {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.pyr-pool span {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.pyr-mult {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-dim);
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pyr-bottom-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Hover connector highlight */
.pyr-row:hover ~ .pyr-line {
    opacity: 0.5;
}

/* ── Leaderboard ───────────────────────────────────────────── */

.lb-wrap {
    max-width: 860px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(6px);
}

.lb-header {
    display: grid;
    grid-template-columns: 50px 1fr 120px 90px 100px 90px;
    padding: 10px 16px;
    background: rgba(212, 175, 55, 0.06);
    border-bottom: 1px solid var(--border);
    gap: 8px;
}

.lb-h {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.lb-h-rank { text-align: center; }
.lb-h-holdings, .lb-h-usd, .lb-h-reward, .lb-h-change { text-align: right; }

.lb-h-reward {
    cursor: pointer;
    transition: color 0.15s;
}

.lb-h-reward:hover {
    color: var(--gold);
}

.lb-body {
    min-height: 200px;
}

.lb-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 13px;
}

/* Row */
.lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 120px 90px 100px 90px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    gap: 8px;
    align-items: center;
}

.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(212, 175, 55, 0.04); }

/* Tier row accents */
.lb-row[data-tier="pharaoh"] {
    background: rgba(212, 175, 55, 0.06);
    border-left: 3px solid var(--gold);
}
.lb-row[data-tier="priests"] {
    border-left: 3px solid #a064dc;
}
.lb-row[data-tier="scribes"] {
    border-left: 3px solid #508cdc;
}
.lb-row[data-tier="workers"] {
    border-left: 3px solid var(--sand-dim);
}

.lb-rank {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    position: relative;
}

.lb-rank-change {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    margin-top: 1px;
}

.lb-rank-up { color: #4caf50; }
.lb-rank-down { color: #ef5350; }
.lb-rank-new { color: var(--gold); font-style: italic; }

.lb-wallet {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s;
}

.lb-wallet:hover { color: var(--gold); }

.lb-holdings, .lb-usd, .lb-reward {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-align: right;
    white-space: nowrap;
}

.lb-usd { color: var(--text-dim); }

.lb-reward {
    color: var(--gold);
    font-weight: 600;
}

.lb-change {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.lb-change-up { color: #4caf50; }
.lb-change-down { color: #ef5350; }
.lb-change-flat { color: var(--text-muted); }

/* Pagination */
.lb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.lb-page-btn {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.lb-page-btn:hover {
    color: var(--gold);
    border-color: var(--gold-dark);
}

.lb-page-btn.active {
    color: #0a0a0a;
    background: var(--gold);
    border-color: var(--gold);
}

.lb-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lb-page-info {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 8px;
}

/* ── Small Holder Note ─────────────────────────────────────── */

.small-holder-note {
    margin-top: 48px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
}

.shn-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.shn-title {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.shn-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
}

.shn-desc strong {
    color: var(--text);
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    background: #080806;
    padding: 60px 24px 0;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 320px;
}

.footer-heading {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-link {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--gold);
}

.contract-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contract-row code {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    background: rgba(212, 175, 55, 0.06);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    word-break: break-all;
}

.copy-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--gold-dim);
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover {
    color: var(--gold);
    border-color: var(--gold-dark);
}

.footer-bottom {
    max-width: 1000px;
    margin: 48px auto 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.7;
    padding-bottom: 24px;
}

/* ── Redeem page ──────────────────────────────────────────── */

.redeem-card {
    background: rgba(15, 14, 11, 0.85);
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 80px rgba(212, 175, 55, 0.06);
}

.redeem-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.redeem-heading {
    font-family: 'Cinzel Decorative', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.redeem-sub {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 32px;
    line-height: 1.7;
}

.redeem-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.redeem-label {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.redeem-input {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text);
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.redeem-input::placeholder {
    color: var(--text-muted);
}

.redeem-input:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.1);
}

.wallet-info {
    font-size: 13px;
    color: var(--text-dim);
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
}

.info-loading {
    color: var(--sand);
    font-style: italic;
}

.claim-btn {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    margin-top: 8px;
}

.claim-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--gold-glow-strong);
}

.claim-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.claim-result {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-dim);
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    line-height: 1.7;
}

.claim-result strong {
    color: var(--gold);
}

.connect-btn.active {
    box-shadow: 0 0 12px var(--gold-glow-strong);
}

.redeem-input-short {
    font-family: 'Inter', sans-serif;
}

/* ── Profile card ────────────────────────────────────────────── */

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: contain;
    border: 2px solid var(--border-bright);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.profile-name {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2px;
}

.profile-tier {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    margin-right: 8px;
}

.profile-rank {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-dim);
}

.profile-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.ps-item {
    flex: 1;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
}

.ps-val {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2px;
}

.ps-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Captcha row ─────────────────────────────────────────────── */

.captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.captcha-q {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.captcha-input {
    width: 70px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-bright);
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    outline: none;
}

.captcha-input:focus {
    border-color: var(--gold-dark);
}

.captcha-refresh {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 18px;
    padding: 6px 10px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.captcha-refresh:hover {
    color: var(--gold);
    border-color: var(--gold-dark);
}

/* ── Cooldown bar ────────────────────────────────────────────── */

.cooldown-bar {
    position: relative;
    height: 32px;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
}

.cooldown-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    width: 0%;
    transition: width 1s linear;
}

.cooldown-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* ── Flex / receipt buttons ──────────────────────────────────── */

.flex-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.flex-btn {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.flex-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

.logout-btn {
    margin-top: 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 0.15s;
}

.logout-btn:hover {
    color: var(--text-dim);
}

/* ── Toast notifications ─────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(15, 14, 11, 0.95);
    border: 1px solid var(--border-bright);
    border-radius: 10px;
    padding: 12px 20px;
    backdrop-filter: blur(12px);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    max-width: 320px;
}

.toast-up { border-left: 3px solid #4caf50; }
.toast-down { border-left: 3px solid #ef5350; }
.toast-gold { border-left: 3px solid var(--gold); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ── Leaderboard user highlight ──────────────────────────────── */

.lb-row-you {
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid var(--gold-dark) !important;
    border-radius: 4px;
}

.lb-you-badge {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: #0a0a0a;
    background: var(--gold);
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
}

.lb-username {
    font-size: 11px;
    color: var(--gold-dim);
    display: block;
    margin-top: 1px;
}

/* ── MC up animation ─────────────────────────────────────────── */

@keyframes mcPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 16px 4px rgba(212, 175, 55, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.nav-mc.mc-up {
    animation: mcPulse 0.8s ease-out;
    color: #4caf50;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: 14px 0;
        font-size: 15px;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        width: 100%;
    }

    .nav-burger {
        display: flex;
    }

    .connect-btn {
        display: none;
    }

    .hero-heading {
        letter-spacing: 1px;
    }

    .hero-stats {
        gap: 12px;
    }

    .stat-card {
        padding: 12px 18px;
        min-width: 100px;
    }

    .stat-value {
        font-size: 18px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section {
        padding: 64px 20px;
    }

    /* Pyramid mobile */
    .pyr-row {
        flex-direction: column;
        gap: 10px;
        padding: 14px 0;
    }

    .pyr-info, .pyr-info-left, .pyr-info-right {
        text-align: center;
    }

    .pyr-priests .pyr-info { order: 2; }
    .pyr-workers .pyr-info { order: 2; }

    .pyr-pharaoh .pyr-block { width: 60px; height: 56px; }
    .pyr-priests .pyr-block { width: 100px; height: 50px; }
    .pyr-scribes .pyr-block { width: 150px; height: 46px; }
    .pyr-workers .pyr-block { width: 210px; height: 42px; }

    .pyr-tier-name { font-size: 17px; }

    /* Leaderboard mobile */
    .lb-header, .lb-row {
        grid-template-columns: 36px 1fr 80px 70px;
    }
    .lb-h-reward, .lb-h-change, .lb-reward, .lb-change {
        display: none;
    }
    .lb-h, .lb-holdings, .lb-usd { font-size: 11px; }
    .pyr-pool { font-size: 18px; }
    .pyr-line { display: none; }

    .profile-stats { flex-direction: column; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-info { text-align: center; }
    .flex-actions { flex-direction: column; }
    .captcha-row { flex-wrap: wrap; }
    .captcha-q { flex-basis: 100%; margin-bottom: 4px; }
    .toast-container { right: 10px; left: 10px; }
    .toast { max-width: 100%; }

    .hiw-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* ── How It Works ─────────────────────────────────────────── */

.hiw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 8px;
    text-align: left;
}

.hiw-step {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 22px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

.hiw-step:hover {
    border-color: var(--border-bright);
    background: rgba(212, 175, 55, 0.04);
}

.hiw-num {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-dim);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hiw-icon {
    font-size: 30px;
    line-height: 1;
    margin-bottom: 14px;
    display: block;
}

.hiw-title {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.hiw-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.75;
}

/* ── Hero stat CTA card ────────────────────────────────────── */

.stat-cta {
    cursor: pointer;
    border-color: var(--gold-dark) !important;
    background: rgba(212, 175, 55, 0.06) !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
}

.stat-cta:hover {
    background: rgba(212, 175, 55, 0.14) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.stat-cta-text {
    font-size: 18px !important;
}

/* ── Footer address labels ─────────────────────────────────── */

.footer-addr-label {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* ── Subtle glow animation for gold elements ──────────────── */

@keyframes goldPulse {
    0%, 100% { text-shadow: 0 0 40px rgba(212, 175, 55, 0.3); }
    50% { text-shadow: 0 0 60px rgba(212, 175, 55, 0.5), 0 0 100px rgba(212, 175, 55, 0.15); }
}

.hero-heading {
    animation: goldPulse 4s ease-in-out infinite;
}

/* ── Fade-in on scroll ────────────────────────────────────── */

.section-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-inner.visible {
    opacity: 1;
    transform: translateY(0);
}
