/* ============================================================
   SHADOW RPG — Website Design System
   Dark Fantasy · Glassmorphism · Gold & Blood
   ============================================================ */

/* ── RESET & BASE ──────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core palette */
    --bg-void: #06060b;
    --bg-deep: #0a0a12;
    --bg-surface: #10101a;
    --bg-card: #14142266;
    --bg-card-hover: #1a1a2a88;

    /* Accent colors */
    --gold: #d4a843;
    --gold-bright: #f0c850;
    --gold-dim: #8a6d2b;
    --crimson: #c0392b;
    --crimson-bright: #e74c3c;
    --blood: #8b1a1a;
    --violet: #a855f7;
    --teal: #2dd4bf;

    /* Text */
    --text-primary: #e8e4dc;
    --text-secondary: #9a9590;
    --text-dim: #5a5550;
    --text-gold: #d4a843;

    /* Rarity colors */
    --rarity-common: #9ca3af;
    --rarity-uncommon: #22c55e;
    --rarity-rare: #3b82f6;
    --rarity-epic: #a855f7;
    --rarity-legendary: #fbbf24;

    /* Glass */
    --glass-bg: rgba(16, 16, 26, 0.6);
    --glass-border: rgba(212, 168, 67, 0.15);
    --glass-glow: rgba(212, 168, 67, 0.05);

    /* Spacing & radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Typography */
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--gold-bright);
}

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

h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
}

/* ── LAYOUT UTILITIES ──────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--crimson));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ── GLASS PANELS ──────────────────────────────────────────── */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.glass-glow {
    box-shadow: 0 0 30px var(--glass-glow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── NAVIGATION ────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    background: rgba(6, 6, 11, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-logo .eye {
    opacity: 0.6;
    margin-left: 0.3em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.nav-burger span {
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    transition: all 0.3s;
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(139, 26, 26, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 168, 67, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold-dim);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s 0.2s forwards;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s 0.4s forwards;
}

.hero-tagline {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s 0.6s forwards;
}

.hero-cta-group {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s 0.8s forwards;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: var(--bg-void);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 67, 0.3);
    color: var(--bg-void);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

/* ── FEATURE GRID ──────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── ZONE CARDS ────────────────────────────────────────────── */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.zone-card {
    position: relative;
    padding: 2rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.zone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--crimson));
    opacity: 0;
    transition: opacity 0.3s;
}

.zone-card:hover::before {
    opacity: 1;
}

.zone-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.zone-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.zone-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.zone-tier {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gold-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.zone-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ── CHARACTER CARDS ───────────────────────────────────────── */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.character-card {
    display: flex;
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.character-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
    transform: translateY(-3px);
}

.character-portrait {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--glass-border);
    flex-shrink: 0;
}

.character-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.character-info .char-title {
    font-size: 0.85rem;
    color: var(--gold-dim);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.character-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── SCREENSHOT GALLERY ────────────────────────────────────── */
.screenshots-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 3px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 3px;
}

.screenshot-item {
    flex: 0 0 auto;
    width: min(600px, 85vw);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    scroll-snap-align: center;
    transition: transform 0.3s;
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    height: auto;
}

/* ── CTA SECTION ───────────────────────────────────────────── */
.cta-section {
    text-align: center;
    padding: 5rem 0;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--gold-dim);
    letter-spacing: 0.2em;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.footer .eye-watch {
    font-size: 1.5rem;
    opacity: 0.3;
    margin-top: 0.5rem;
    animation: pulse 3s infinite;
}

/* ── WIKI LAYOUT ───────────────────────────────────────────── */
.wiki-hero {
    padding: 8rem 0 3rem;
    text-align: center;
    position: relative;
}

.wiki-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(139, 26, 26, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.wiki-card {
    padding: 2rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.wiki-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border);
    transform: translateY(-4px);
}

.wiki-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.wiki-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.wiki-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── WIKI CONTENT PAGES ────────────────────────────────────── */
.wiki-page {
    padding-top: 6rem;
    min-height: 100vh;
}

.wiki-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.wiki-breadcrumb a {
    color: var(--gold-dim);
}

/* Item tables */
.item-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.item-table th {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 2px solid var(--glass-border);
    color: var(--gold-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.item-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.item-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rarity-common {
    color: var(--rarity-common);
}

.rarity-uncommon {
    color: var(--rarity-uncommon);
}

.rarity-rare {
    color: var(--rarity-rare);
}

.rarity-epic {
    color: var(--rarity-epic);
}

.rarity-legendary {
    color: var(--rarity-legendary);
}

/* Stat badges */
.stat-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.1rem;
}

.stat-positive {
    color: var(--rarity-uncommon);
}

.stat-negative {
    color: var(--crimson-bright);
}

/* Spoiler blocks */
.spoiler {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    cursor: pointer;
}

.spoiler::before {
    content: '⚠️ Spoiler — Click to reveal';
    display: block;
    font-size: 0.85rem;
    color: var(--gold-dim);
    margin-bottom: 0.5rem;
}

.spoiler-content {
    filter: blur(5px);
    transition: filter 0.3s;
    user-select: none;
}

.spoiler.revealed .spoiler-content {
    filter: none;
    user-select: auto;
}

.spoiler.revealed::before {
    content: '⚠️ Spoiler';
}

/* Skill tree visual */
.skill-tree-section {
    margin: 2rem 0;
}

.skill-node {
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
    transition: all 0.2s;
}

.skill-node:hover {
    border-color: var(--glass-border);
}

.skill-node.keystone {
    border-color: var(--gold-dim);
    background: rgba(212, 168, 67, 0.05);
}

.skill-node h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.skill-node .tier-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.skill-node p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.3rem;
}

/* Enemy card */
.enemy-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.enemy-card:hover {
    border-color: var(--glass-border);
}

.enemy-card.boss-card {
    border-color: var(--gold-dim);
    background: rgba(212, 168, 67, 0.03);
}

.enemy-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.enemy-card .enemy-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--crimson);
}

.enemy-card .enemy-desc {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Race cards */
.race-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.8rem;
    transition: all 0.2s;
}

.race-card:hover {
    border-color: var(--glass-border);
}

.race-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}

.race-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.race-card .race-flavor {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.race-card .race-passive {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--rarity-uncommon);
    margin-top: 0.3rem;
}

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Scroll-triggered fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Particle canvas */
#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(6, 6, 11, 0.95);
        backdrop-filter: blur(20px);
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .character-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}