/* ==========================================================================
   万恶之源 | The Origin of the Meme
   Multi-Theme Design System & Complete Stylesheet
   ========================================================================== */

/* ── 1. Design Tokens ──────────────────────────────────────────────── */
:root {
    /* Easing */
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 64px;

    /* Typography */
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;

    /* ── Modern City Theme (default: index / memes / meme) ── */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-card: #ffffff;
    --border: #e8e8ec;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Bilibili brand accent */
    --accent: #00a1d6;
    --accent-hover: #0087b3;
    --accent-pink: #fb7299;

    /* Shadow hierarchy */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);

    /* ── Tier Badge Colors (muted traditional palette) ── */
    --tier-0: #9ca3af;                     /* 银灰 - 杂役弟子 */
    --tier-1: #6b9e7a;                     /* 青竹 - 练气期 */
    --tier-2: #5b8db8;                     /* 靛青 - 筑基期 */
    --tier-3: #8b6baa;                     /* 藤紫 - 金丹期 */
    --tier-4: #c4813d;                     /* 赭石 - 元婴期 */
    --tier-5: #b85450;                     /* 胭脂 - 化神期 */
    --tier-6: #a03030;                     /* 朱砂 - 练虚期 */
    --tier-7: #b8960b;                     /* 暗金 - 合体期 */
    --tier-8: linear-gradient(135deg, #b8960b, #daa520);       /* 暗金渐变 - 大乘期 */
    --tier-9: linear-gradient(135deg, #b8860b, #ffd700, #b8860b); /* 金色微光 - 渡劫飞升 */
}

/* ── 2. Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: auto;
}

/* Anime-style floating clouds — fixed position, visible while scrolling */
body::before,
body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: 30%;
    left: -5%;
    width: 500px;
    height: 120px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse 200px 80px at 30% 50%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
        radial-gradient(ellipse 180px 70px at 60% 40%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 150px 60px at 80% 55%, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    filter: blur(8px);
    animation: cloudDriftRight 40s ease-in-out infinite alternate;
}

body::after {
    top: 55%;
    right: -8%;
    width: 600px;
    height: 140px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse 250px 90px at 25% 45%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 200px 80px at 55% 50%, rgba(255, 255, 255, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 170px 65px at 75% 40%, rgba(255, 255, 255, 0.45) 0%, transparent 70%);
    filter: blur(10px);
    animation: cloudDriftLeft 50s ease-in-out infinite alternate;
}

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

img {
    max-width: 100%;
    display: block;
}

button {
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
.hof-card:focus-visible,
.ranking-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ── 3. Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    text-align: center;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: var(--space-3xl);
}

/* Gradient text utilities (reduced from neon to subtle accent gradient) */
.gradient-title,
.gradient-cyan-purple,
.gradient-cyan-green,
.gradient-purple,
.gradient-pink {
    background: linear-gradient(135deg, var(--accent), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-gold {
    background: linear-gradient(135deg, #b8860b, #daa520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── 4. Navigation ────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: transform 0.3s var(--ease-spring);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
    align-items: center;
}

.nav-links a {
    position: relative;
    font-size: 15px;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--ease-spring);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links .nav-github {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: border-color 0.3s, color 0.3s;
}

.nav-links .nav-github:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-links .nav-github::after {
    display: none;
}

/* Language Switcher */
.nav-lang-group {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: var(--space-md);
    padding-left: var(--space-md);
    border-left: 1px solid var(--border);
}

.nav-lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.nav-lang-btn:hover { color: var(--accent); }
.nav-lang-btn.active { color: var(--accent); border-color: rgba(0, 161, 214, 0.3); }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    background: none;
    border: none;
    z-index: 1001;
    cursor: pointer;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── 5. Buttons (Q-spring interaction) ────────────────────────────── */
.btn-neon,
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #ffffff;
    border: 2px solid var(--accent);
    cursor: pointer;
    transition: transform 0.2s var(--ease-bounce),
                box-shadow 0.2s var(--ease-spring),
                background 0.2s,
                border-color 0.2s;
}

.btn-neon:hover,
.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-neon:active,
.btn-primary:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-sm);
    transition-duration: 0.1s;
}

.btn-muted,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, transform 0.15s;
}

.btn-muted:hover,
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-muted:active,
.btn-secondary:active {
    transform: scale(0.95);
}

/* ── 6. Section Commons ───────────────────────────────────────────── */
section {
    padding: var(--space-4xl) var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.section-divider {
    height: 80px;
    position: relative;
    max-width: none;
    margin: 0;
}

/* Hero-to-content transition gradient */
.hero + .section-divider {
    height: 200px;
    background: linear-gradient(180deg, rgba(30, 50, 80, 0.55) 0%, rgba(40, 60, 90, 0.3) 30%, rgba(60, 80, 110, 0.1) 60%, transparent 100%);
    max-width: none;
    opacity: 1;
}

.hero + .section-divider::before {
    display: none;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 1px;
    background: var(--border);
}

/* ── 7. Hero ──────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: var(--space-4xl) var(--space-lg);
    max-width: none;
    background: linear-gradient(180deg, #f0f4f8 0%, var(--bg-primary) 40%, var(--bg-primary) 65%, var(--bg-secondary) 100%);
    overflow: hidden;
}

/* City skyline silhouette — foreground tall buildings */
.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, rgba(60, 80, 110, 0.15) 0%, rgba(40, 60, 90, 0.4) 50%, rgba(30, 50, 80, 0.55) 100%);
    clip-path: polygon(
        0% 100%,
        0% 65%, 1% 65%, 1% 30%, 2.5% 30%, 2.5% 28%, 3.5% 28%, 3.5% 55%, 4.5% 55%, 4.5% 40%, 5.5% 40%, 5.5% 20%, 7% 20%, 7% 18%, 8% 18%, 8% 45%, 9% 45%, 9% 60%,
        10% 60%, 10% 35%, 11% 35%, 11% 15%, 12.5% 15%, 12.5% 12%, 13.5% 12%, 13.5% 35%, 14.5% 35%, 14.5% 50%, 15.5% 50%, 15.5% 25%, 17% 25%, 17% 55%,
        18% 55%, 18% 38%, 19% 38%, 19% 8%, 20.5% 8%, 20.5% 6%, 21.5% 6%, 21.5% 30%, 22.5% 30%, 22.5% 45%, 23.5% 45%, 23.5% 22%, 25% 22%, 25% 50%,
        26% 50%, 26% 32%, 27% 32%, 27% 10%, 28.5% 10%, 28.5% 32%, 29.5% 32%, 29.5% 48%, 30.5% 48%, 30.5% 28%, 32% 28%, 32% 55%,
        33% 55%, 33% 40%, 34% 40%, 34% 14%, 35.5% 14%, 35.5% 40%, 36.5% 40%, 36.5% 55%, 37.5% 55%, 37.5% 30%, 39% 30%, 39% 18%, 40% 18%, 40% 45%,
        41% 45%, 41% 25%, 42% 25%, 42% 5%, 43.5% 5%, 43.5% 3%, 44.5% 3%, 44.5% 25%, 45.5% 25%, 45.5% 42%, 46.5% 42%, 46.5% 20%, 48% 20%, 48% 50%,
        49% 50%, 49% 35%, 50% 35%, 50% 8%, 51.5% 8%, 51.5% 35%, 52.5% 35%, 52.5% 50%, 53.5% 50%, 53.5% 22%, 55% 22%, 55% 12%, 56% 12%, 56% 40%,
        57% 40%, 57% 28%, 58% 28%, 58% 6%, 59.5% 6%, 59.5% 28%, 60.5% 28%, 60.5% 48%, 61.5% 48%, 61.5% 18%, 63% 18%, 63% 45%,
        64% 45%, 64% 30%, 65% 30%, 65% 10%, 66.5% 10%, 66.5% 30%, 67.5% 30%, 67.5% 50%, 68.5% 50%, 68.5% 25%, 70% 25%, 70% 15%, 71% 15%, 71% 42%,
        72% 42%, 72% 32%, 73% 32%, 73% 8%, 74.5% 8%, 74.5% 32%, 75.5% 32%, 75.5% 55%, 76.5% 55%, 76.5% 20%, 78% 20%, 78% 48%,
        79% 48%, 79% 35%, 80% 35%, 80% 12%, 81.5% 12%, 81.5% 35%, 82.5% 35%, 82.5% 52%, 83.5% 52%, 83.5% 28%, 85% 28%, 85% 18%, 86% 18%, 86% 45%,
        87% 45%, 87% 30%, 88% 30%, 88% 14%, 89.5% 14%, 89.5% 38%, 90.5% 38%, 90.5% 55%, 91.5% 55%, 91.5% 25%, 93% 25%, 93% 50%,
        94% 50%, 94% 35%, 95% 35%, 95% 20%, 96.5% 20%, 96.5% 40%, 97.5% 40%, 97.5% 55%, 98.5% 55%, 98.5% 65%, 100% 65%, 100% 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Distant buildings layer — mid-height, softer */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(80, 100, 130, 0.08) 0%, rgba(50, 70, 100, 0.25) 100%);
    clip-path: polygon(
        0% 100%,
        0% 50%, 3% 50%, 3% 35%, 6% 35%, 6% 25%, 8% 25%, 8% 40%, 11% 40%, 11% 30%, 14% 30%, 14% 20%, 16% 20%, 16% 38%,
        19% 38%, 19% 28%, 22% 28%, 22% 15%, 24% 15%, 24% 32%, 27% 32%, 27% 45%, 30% 45%, 30% 25%, 33% 25%, 33% 18%, 35% 18%, 35% 35%,
        38% 35%, 38% 22%, 41% 22%, 41% 12%, 43% 12%, 43% 28%, 46% 28%, 46% 40%, 49% 40%, 49% 20%, 52% 20%, 52% 30%,
        55% 30%, 55% 18%, 58% 18%, 58% 10%, 60% 10%, 60% 25%, 63% 25%, 63% 38%, 66% 38%, 66% 22%, 69% 22%, 69% 15%, 71% 15%, 71% 32%,
        74% 32%, 74% 20%, 77% 20%, 77% 30%, 80% 30%, 80% 42%, 83% 42%, 83% 28%, 86% 28%, 86% 18%, 88% 18%, 88% 35%,
        91% 35%, 91% 25%, 94% 25%, 94% 38%, 97% 38%, 97% 50%, 100% 50%, 100% 100%
    );
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.6s var(--ease-spring);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(56px, 10vw, 120px);
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: clamp(16px, 2.5vw, 22px);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 13px;
    animation: bounceDown 2s ease-in-out infinite;
}

.hero-scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    opacity: 0.5;
}

/* ── 8. Stats Section ─────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: transform 0.3s var(--ease-spring),
                box-shadow 0.3s var(--ease-spring),
                border-color 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 161, 214, 0.15);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: var(--space-md);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── 9. Rankings Section ──────────────────────────────────────────── */
.rankings-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ranking-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-spring),
                box-shadow 0.3s var(--ease-spring),
                border-color 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.ranking-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 161, 214, 0.2);
}

.rank-number {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    min-width: 48px;
    text-align: center;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.ranking-card:hover .rank-number {
    transform: scale(1.1);
}

.rank-1 .rank-number { color: #b8860b; }
.rank-2 .rank-number { color: #8a8a8a; }
.rank-3 .rank-number { color: #a0704e; }

.ranking-card-main {
    flex: 1;
    min-width: 0;
}

.ranking-card-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.ranking-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-sm);
}

.ranking-card-tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.ranking-card-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.ranking-card-right {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-sm);
}

.ranking-card-count {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--text-muted);
}

/* ── 10. Tier Badges ──────────────────────────────────────────────── */
.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tier-badge.tier-0 { background: var(--tier-0); color: #fff; }
.tier-badge.tier-1 { background: var(--tier-1); color: #fff; }
.tier-badge.tier-2 { background: var(--tier-2); color: #fff; }
.tier-badge.tier-3 { background: var(--tier-3); color: #fff; }
.tier-badge.tier-4 { background: var(--tier-4); color: #fff; }
.tier-badge.tier-5 { background: var(--tier-5); color: #fff; }
.tier-badge.tier-6 { background: var(--tier-6); color: #fff; }
.tier-badge.tier-7 { background: var(--tier-7); color: #1a1a1a; }
.tier-badge.tier-8 { background: var(--tier-8); color: #1a1a1a; }

.tier-badge.legendary,
.tier-badge.tier-9 {
    background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
    background-size: 200% 100%;
    animation: shimmerSlow 4s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(184, 134, 11, 0.3);
    color: #1a1a1a;
}

.tier-badge-lg {
    padding: 6px 18px;
    font-size: 15px;
    border-radius: 24px;
}

/* ── 11. Tier System (Mist / Immortal theme) ──────────────────────── */
#tier-system {
    --tier-bg: #f5f0e8;
    --tier-bg-gradient: linear-gradient(180deg, #f8f4ec 0%, #ede6da 100%);
    --tier-text: #3a3028;
    --tier-text-muted: #8a7e6e;
    --tier-border: #d4c9b8;
    --tier-mist: rgba(180, 170, 155, 0.2);

    background: var(--tier-bg-gradient);
    border-radius: var(--radius-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
    overflow: hidden;
}

/* Mountain silhouettes */
#tier-system::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(120, 110, 95, 0.15) 0%, rgba(90, 80, 65, 0.4) 100%);
    clip-path: polygon(
        0% 100%,
        0% 60%, 5% 45%, 10% 55%, 15% 30%, 20% 50%, 22% 48%, 25% 20%, 30% 45%, 35% 55%,
        38% 40%, 42% 25%, 45% 35%, 48% 15%, 52% 30%, 55% 45%, 58% 35%, 62% 50%,
        65% 38%, 68% 28%, 72% 42%, 75% 22%, 78% 40%, 80% 50%, 85% 35%, 88% 45%,
        92% 55%, 95% 40%, 98% 50%, 100% 65%, 100% 100%
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

/* Drifting mist layers — full area */
#tier-system::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 400px 60px at 8% 20%, rgba(200, 195, 180, 0.55) 0%, transparent 70%),
        radial-gradient(ellipse 350px 50px at 85% 15%, rgba(195, 190, 175, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 500px 70px at 40% 45%, rgba(190, 185, 170, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 300px 45px at 70% 55%, rgba(198, 192, 178, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 450px 55px at 20% 70%, rgba(192, 188, 172, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 380px 50px at 60% 80%, rgba(185, 180, 165, 0.38) 0%, transparent 70%),
        radial-gradient(ellipse 280px 40px at 92% 65%, rgba(200, 195, 180, 0.42) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: mistDrift 25s ease-in-out infinite alternate;
}

#tier-system .section-title {
    color: var(--tier-text);
    position: relative;
    z-index: 1;
}

#tier-system .section-subtitle {
    color: var(--tier-text-muted);
    position: relative;
    z-index: 1;
}

.tier-system {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
}

.tier-entry {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--tier-border);
    position: relative;
    transition: background 0.3s, transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring);
}

.tier-entry:last-child {
    border-bottom: none;
}

.tier-entry:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--tier-mist);
}

/* High tiers (7+) have mist texture */
.tier-entry[class*="pulse"],
.tier-entry:nth-last-child(-n+3) {
    background: radial-gradient(ellipse at 50% 0%, var(--tier-mist) 0%, transparent 70%);
}

.tier-indicator {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    border: 2px solid var(--tier-border);
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-bounce), background 0.5s, border-color 0.5s;
}

.tier-entry:hover .tier-indicator {
    transform: scale(1.15);
}

.tier-indicator.lit.tier-0 { background: var(--tier-0); border-color: var(--tier-0); }
.tier-indicator.lit.tier-1 { background: var(--tier-1); border-color: var(--tier-1); }
.tier-indicator.lit.tier-2 { background: var(--tier-2); border-color: var(--tier-2); }
.tier-indicator.lit.tier-3 { background: var(--tier-3); border-color: var(--tier-3); }
.tier-indicator.lit.tier-4 { background: var(--tier-4); border-color: var(--tier-4); }
.tier-indicator.lit.tier-5 { background: var(--tier-5); border-color: var(--tier-5); }
.tier-indicator.lit.tier-6 { background: var(--tier-6); border-color: var(--tier-6); }
.tier-indicator.lit.tier-7 { background: var(--tier-7); border-color: var(--tier-7); }
.tier-indicator.lit.tier-8 { background: linear-gradient(135deg, #b8960b, #daa520); border-color: #b8960b; }
.tier-indicator.lit.tier-9 {
    background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
    border-color: #b8860b;
    background-size: 200% 100%;
    animation: shimmerSlow 4s ease-in-out infinite;
}

.tier-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.tier-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--tier-text);
}

.tier-range {
    font-size: 13px;
    color: var(--tier-text-muted);
    font-family: var(--font-heading);
}

.tier-label {
    font-size: 13px;
    color: var(--tier-text-muted);
    font-style: italic;
}

.tier-energy-bar-wrap {
    width: 100%;
    height: 4px;
    background: var(--tier-border);
    border-radius: 2px;
    margin-top: var(--space-xs);
    overflow: hidden;
}

.tier-energy-bar {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s var(--ease-spring);
}

/* ── 12. Contributor Cards (on index) ─────────────────────────────── */
.contributor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.contributor-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s var(--ease-spring),
                box-shadow 0.3s var(--ease-spring),
                border-color 0.3s;
}

.contributor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 161, 214, 0.2);
}

.contributor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    border: 2px solid var(--border);
    object-fit: cover;
    background: var(--bg-secondary);
    transition: border-color 0.3s, transform 0.1s linear;
}

.contributor-card:hover .contributor-avatar {
    border-color: var(--accent);
}

/* Magnetic avatar effect */
.contributor-avatar.magnetic {
    transition: transform 0.1s linear;
}

.contributor-avatar.spring-back {
    transition: transform 0.5s var(--ease-bounce);
}

.contributor-username {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.contributor-title-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    transition: transform 0.4s var(--ease-bounce);
}

.contributor-card:hover .contributor-title-badge {
    transform: scale(1.08);
}

.contributor-title-badge.tier-0 { background: var(--tier-0); color: #fff; }
.contributor-title-badge.tier-1 { background: var(--tier-1); color: #fff; }
.contributor-title-badge.tier-2 { background: var(--tier-2); color: #fff; }
.contributor-title-badge.tier-3 { background: var(--tier-3); color: #fff; }
.contributor-title-badge.tier-4 { background: var(--tier-4); color: #fff; }
.contributor-title-badge.tier-5 { background: var(--tier-5); color: #fff; }

.contributor-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── 13. Memes Page ───────────────────────────────────────────────── */
.page-header {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.search-bar {
    display: flex;
    gap: var(--space-md);
    max-width: 600px;
    margin: var(--space-xl) auto;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 161, 214, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.tag-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.tag-filter {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.tag-filter:hover,
.tag-filter.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 161, 214, 0.05);
}

.memes-tier-group {
    margin-bottom: var(--space-2xl);
}

.memes-tier-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.memes-tier-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.memes-tier-dot.tier-0 { background: var(--tier-0); }
.memes-tier-dot.tier-1 { background: var(--tier-1); }
.memes-tier-dot.tier-2 { background: var(--tier-2); }
.memes-tier-dot.tier-3 { background: var(--tier-3); }
.memes-tier-dot.tier-4 { background: var(--tier-4); }
.memes-tier-dot.tier-5 { background: var(--tier-5); }
.memes-tier-dot.tier-6 { background: var(--tier-6); }
.memes-tier-dot.tier-7 { background: var(--tier-7); }
.memes-tier-dot.tier-8 { background: linear-gradient(135deg, #b8960b, #daa520); }
.memes-tier-dot.tier-9 {
    background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
    background-size: 200% 100%;
    animation: shimmerSlow 4s ease-in-out infinite;
}

.memes-tier-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.memes-tier-count {
    font-size: 14px;
    color: var(--text-muted);
}

.memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
}

.meme-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: transform 0.3s var(--ease-spring),
                box-shadow 0.3s var(--ease-spring),
                border-color 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.meme-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 161, 214, 0.3);
    box-shadow: var(--shadow-hover);
}

.meme-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.meme-card-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.meme-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meme-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.meme-card-tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.meme-card-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.meme-card-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── 14. Meme Detail Page ─────────────────────────────────────────── */
.meme-detail {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    max-width: 800px;
    margin: 0 auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.meme-detail-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.meme-detail-tier {
    margin-bottom: var(--space-md);
}

.meme-detail-name {
    font-family: var(--font-heading);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.meme-detail-aliases {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.meme-detail-aliases span {
    display: inline-block;
    margin: 0 4px;
}

.meme-detail-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.meme-detail-tags {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.meme-detail-tag {
    padding: 4px 14px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
}

.meme-detail-origin {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.meme-detail-origin a {
    color: var(--accent);
    font-weight: 600;
    word-break: break-all;
}

.meme-detail-videos {
    margin-bottom: var(--space-2xl);
}

.meme-detail-videos h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: border-color 0.3s;
}

.video-card:hover {
    border-color: var(--accent);
}

.video-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.video-card-title a {
    color: var(--accent);
    transition: opacity 0.2s;
}

.video-card-title a:hover {
    opacity: 0.7;
}

.video-card-author {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.video-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.video-card-contributor {
    font-size: 13px;
    color: var(--text-muted);
}

.video-card-contributor a {
    color: var(--accent);
}

.video-card-contributor a:hover {
    text-decoration: underline;
}

.meme-detail-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: var(--space-xl);
    transition: color 0.3s;
}

.meme-detail-back:hover {
    color: var(--accent);
}

.meme-detail-cta {
    text-align: center;
    padding: var(--space-2xl) 0;
}

/* ── 15. Hall of Fame (Starry / Constellation theme) ─────────────── */
.hof-theme {
    --hof-bg: #0a0e1a;
    --hof-bg-surface: #111827;
    --hof-text: #e2dfd8;
    --hof-text-muted: #8b8578;
    --hof-star: #ffd700;
    --hof-star-dim: rgba(255, 215, 0, 0.4);
    --hof-accent: #4a6fa5;
    --hof-border: rgba(255, 215, 0, 0.15);
    --hof-glow: 0 0 20px rgba(255, 215, 0, 0.1);

    background: var(--hof-bg);
    color: var(--hof-text);
}

.hof-theme .nav {
    background: rgba(10, 14, 26, 0.85);
    border-bottom: 1px solid var(--hof-border);
}

.hof-theme .nav-logo { color: var(--hof-star); }
.hof-theme .nav-links a { color: var(--hof-text-muted); }
.hof-theme .nav-links a:hover,
.hof-theme .nav-links a.active { color: var(--hof-star); }
.hof-theme .nav-links a::after { background: var(--hof-star); }
.hof-theme .nav-links .nav-github { border-color: var(--hof-border); }
.hof-theme .nav-links .nav-github:hover { border-color: var(--hof-star); color: var(--hof-star); }
.hof-theme .nav-hamburger span { background: var(--hof-text); }
.hof-theme .nav-lang-btn { color: var(--hof-text-muted); }
.hof-theme .nav-lang-btn:hover,
.hof-theme .nav-lang-btn.active { color: var(--hof-star); border-color: var(--hof-star-dim); }

/* Star particles (CSS-only) */
.hof-theme .hof-bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hof-theme .hof-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    animation: starFlicker var(--drift-dur, 5s) var(--drift-delay, 0s) ease-in-out infinite;
}

.hof-theme .hof-particle:nth-child(1)  { left: 5%; top: 10%; --drift-dur: 4s; --drift-delay: 0s; }
.hof-theme .hof-particle:nth-child(2)  { left: 10%; top: 25%; --drift-dur: 6s; --drift-delay: 1s; }
.hof-theme .hof-particle:nth-child(3)  { left: 18%; top: 8%; --drift-dur: 3s; --drift-delay: 2s; }
.hof-theme .hof-particle:nth-child(4)  { left: 25%; top: 35%; --drift-dur: 7s; --drift-delay: 0.5s; width: 3px; height: 3px; }
.hof-theme .hof-particle:nth-child(5)  { left: 33%; top: 15%; --drift-dur: 5s; --drift-delay: 1.5s; }
.hof-theme .hof-particle:nth-child(6)  { left: 42%; top: 40%; --drift-dur: 8s; --drift-delay: 3s; }
.hof-theme .hof-particle:nth-child(7)  { left: 50%; top: 5%; --drift-dur: 4s; --drift-delay: 0.8s; }
.hof-theme .hof-particle:nth-child(8)  { left: 58%; top: 30%; --drift-dur: 6s; --drift-delay: 2.5s; width: 3px; height: 3px; }
.hof-theme .hof-particle:nth-child(9)  { left: 67%; top: 12%; --drift-dur: 5s; --drift-delay: 1.2s; }
.hof-theme .hof-particle:nth-child(10) { left: 75%; top: 45%; --drift-dur: 7s; --drift-delay: 4s; }
.hof-theme .hof-particle:nth-child(11) { left: 82%; top: 18%; --drift-dur: 3.5s; --drift-delay: 0.3s; }
.hof-theme .hof-particle:nth-child(12) { left: 88%; top: 38%; --drift-dur: 6.5s; --drift-delay: 3.5s; width: 3px; height: 3px; }
.hof-theme .hof-particle:nth-child(13) { left: 93%; top: 8%; --drift-dur: 4.5s; --drift-delay: 5s; }
.hof-theme .hof-particle:nth-child(14) { left: 97%; top: 28%; --drift-dur: 5.5s; --drift-delay: 6s; }
.hof-theme .hof-particle:nth-child(15) { left: 15%; top: 50%; --drift-dur: 8s; --drift-delay: 7s; }

/* Hero */
.hof-theme .hall-of-fame-hero {
    text-align: center;
    padding-top: calc(var(--nav-height) + var(--space-4xl));
    margin-bottom: var(--space-2xl);
    position: relative;
    z-index: 1;
}

.hof-theme .hof-hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(500px, 70vw);
    height: min(500px, 70vw);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.06) 0%, rgba(180, 134, 11, 0.02) 30%, transparent 60%);
    pointer-events: none;
    border-radius: 50%;
}

.hof-theme .hall-of-fame-title {
    font-family: var(--font-heading);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    background: linear-gradient(135deg, #daa520, #ffd700, #daa520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: goldShimmer 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.2));
    position: relative;
    z-index: 2;
}

.hof-theme .hall-of-fame-subheading {
    font-family: var(--font-heading);
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 500;
    letter-spacing: 0.35em;
    color: var(--hof-star-dim);
    margin-top: var(--space-sm);
    position: relative;
    z-index: 2;
}

.hof-theme .hall-of-fame-subtitle {
    font-size: 18px;
    color: var(--hof-text-muted);
    margin-top: var(--space-md);
    position: relative;
    z-index: 2;
}

/* Grid */
.hof-theme .hall-of-fame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-4xl);
    position: relative;
    z-index: 1;
}

/* Card */
.hof-theme .hof-card {
    background: var(--hof-bg-surface);
    border: 1px solid var(--hof-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-spring),
                border-color 0.4s,
                box-shadow 0.4s;
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-spring) forwards;
    animation-delay: calc(var(--card-index, 0) * 0.1s);
}

.hof-theme .hof-card:hover {
    transform: translateY(-4px);
    border-color: var(--hof-star-dim);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.06),
                0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Crown */
.hof-theme .hof-card-crown {
    display: inline-block;
    font-size: 48px;
    margin-bottom: var(--space-md);
    background: linear-gradient(180deg, #ffe680 0%, #ffd700 40%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
    animation: crownFloat 3s ease-in-out infinite;
}

.hof-theme .hof-card-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--hof-star);
    margin-bottom: var(--space-sm);
}

.hof-theme .hof-card-desc {
    font-size: 14px;
    color: var(--hof-text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

/* Stats */
.hof-theme .hof-card-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.hof-theme .hof-stat {
    text-align: center;
}

.hof-theme .hof-stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--hof-star);
}

.hof-theme .hof-stat-label {
    font-size: 12px;
    color: var(--hof-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Empty state */
.hof-theme .empty-state-icon {
    display: inline-block;
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.4;
    background: linear-gradient(180deg, #ffe680, #ffd700, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.2));
}

.hof-theme .empty-state-text { color: var(--hof-text-muted); }
.hof-theme .empty-state-action {
    border-color: var(--hof-star-dim);
    color: var(--hof-star);
}
.hof-theme .empty-state-action:hover {
    background: var(--hof-star-dim);
    color: var(--hof-bg);
}

/* Footer */
.hof-theme .footer {
    background: var(--hof-bg-surface);
    border-top: 1px solid var(--hof-border);
}
.hof-theme .footer-waves { display: none; }
.hof-theme .footer-col h3 { color: var(--hof-star); }
.hof-theme .footer-col a { color: var(--hof-text-muted); }
.hof-theme .footer-col a:hover { color: var(--hof-star); }
.hof-theme .footer-disclaimer {
    color: var(--hof-text-muted);
    border-top: 1px solid var(--hof-border);
}

/* ── 16. Contributors Page (Dark / Subdued theme) ─────────────────── */
.contrib-theme {
    --contrib-bg: #141418;
    --contrib-bg-surface: #1c1c22;
    --contrib-card: #222228;
    --contrib-text: #d4d0c8;
    --contrib-text-muted: #8a8680;
    --contrib-border: #2e2e36;
    --contrib-accent: #00a1d6;

    background: var(--contrib-bg);
    color: var(--contrib-text);
}

.contrib-theme .nav {
    background: rgba(20, 20, 24, 0.85);
    border-bottom: 1px solid var(--contrib-border);
}

.contrib-theme .nav-logo { color: var(--contrib-accent); }
.contrib-theme .nav-links a { color: var(--contrib-text-muted); }
.contrib-theme .nav-links a:hover,
.contrib-theme .nav-links a.active { color: var(--contrib-accent); }
.contrib-theme .nav-links a::after { background: var(--contrib-accent); }
.contrib-theme .nav-links .nav-github { border-color: var(--contrib-border); }
.contrib-theme .nav-links .nav-github:hover { border-color: var(--contrib-accent); color: var(--contrib-accent); }
.contrib-theme .nav-hamburger span { background: var(--contrib-text); }
.contrib-theme .nav-lang-btn { color: var(--contrib-text-muted); }
.contrib-theme .nav-lang-btn:hover,
.contrib-theme .nav-lang-btn.active { color: var(--contrib-accent); border-color: rgba(0, 161, 214, 0.3); }

.contrib-theme .contributors-page-header {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.contrib-theme .section-title { color: var(--contrib-text); }
.contrib-theme .section-subtitle { color: var(--contrib-text-muted); }

.contrib-theme .contributors-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-4xl);
}

.contrib-theme .contributor-card {
    background: var(--contrib-card);
    border: 1px solid var(--contrib-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s var(--ease-spring),
                border-color 0.3s,
                box-shadow 0.3s var(--ease-spring);
}

.contrib-theme .contributor-card:hover {
    transform: translateY(-2px);
    border-color: var(--contrib-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.contrib-theme .contributor-avatar {
    border: 2px solid var(--contrib-border);
    background: var(--contrib-bg-surface);
    transition: border-color 0.3s, transform 0.1s linear;
}

.contrib-theme .contributor-card:hover .contributor-avatar {
    border-color: var(--contrib-accent);
}

.contrib-theme .contributor-username { color: var(--contrib-text); }
.contrib-theme .contributor-count { color: var(--contrib-text-muted); }

/* Footer */
.contrib-theme .footer {
    background: var(--contrib-bg-surface);
    border-top: 1px solid var(--contrib-border);
}
.contrib-theme .footer-waves { display: none; }
.contrib-theme .footer-col h3 { color: var(--contrib-accent); }
.contrib-theme .footer-col a { color: var(--contrib-text-muted); }
.contrib-theme .footer-col a:hover { color: var(--contrib-accent); }
.contrib-theme .footer-disclaimer {
    color: var(--contrib-text-muted);
    border-top: 1px solid var(--contrib-border);
}

/* ── 17. Back Link ────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    padding: var(--space-sm) 0;
    font-size: 15px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

/* ── 18. Empty State ──────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.4;
}

.empty-state-text {
    font-size: 18px;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: color 0.3s, background 0.3s;
}

.empty-state-action:hover {
    background: var(--accent);
    color: #ffffff;
}

/* ── 19. Error State ──────────────────────────────────────────────── */
.error-state {
    text-align: center;
    padding: var(--space-4xl);
    color: var(--tier-5);
}

.error-state-text {
    font-size: 16px;
    margin-bottom: var(--space-md);
}

/* ── 20. Skeleton Loading ─────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, #e8e8ec 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ── 21. Footer ───────────────────────────────────────────────────── */
.footer {
    position: relative;
    padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
    max-width: none;
    overflow: hidden;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-waves {
    position: absolute;
    top: -50px;
    left: 0;
    width: 200%;
    height: 120px;
    overflow: hidden;
    pointer-events: none;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
}

.wave-1 {
    top: 0;
    animation: waveMove 8s linear infinite;
    opacity: 0.4;
}

.wave-2 {
    top: 15px;
    animation: waveMove 12s linear infinite reverse;
    opacity: 0.25;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
    position: relative;
    z-index: 2;
}

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding-top: var(--space-2xl);
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border);
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

/* ── 22. Animations ───────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes shimmerSlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes starFlicker {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.6; }
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

@keyframes mistDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(3%); }
}

@keyframes cloudDriftRight {
    0% { transform: translateX(0); opacity: 0.5; }
    50% { opacity: 0.7; }
    100% { transform: translateX(80px); opacity: 0.4; }
}

@keyframes cloudDriftLeft {
    0% { transform: translateX(0); opacity: 0.4; }
    50% { opacity: 0.6; }
    100% { transform: translateX(-60px); opacity: 0.35; }
}

/* ── 23. Responsive ───────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contributor-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

@media (max-width: 640px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
        gap: var(--space-md);
        transition: right 0.3s var(--ease-spring);
        box-shadow: var(--shadow-lg);
    }

    .hof-theme .nav-links { background: var(--hof-bg-surface); }
    .contrib-theme .nav-links { background: var(--contrib-bg-surface); }

    .nav-links.open {
        right: 0;
    }

    .nav-lang-group {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: var(--space-sm);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .contributor-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 64px);
    }

    .ranking-card {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .memes-grid {
        grid-template-columns: 1fr;
    }

    .hall-of-fame-grid,
    .hof-theme .hall-of-fame-grid {
        grid-template-columns: 1fr;
    }

    .contributors-page-grid,
    .contrib-theme .contributors-page-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: var(--space-2xl) var(--space-md);
    }
}

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

    html {
        scroll-behavior: auto;
    }

    .hero-scroll {
        animation: none;
    }
}
