:root {
    --primary:       #3b82f6;
    --primary-dark:  #1d4ed8;
    --primary-light: #60a5fa;
    --primary-glow:  rgba(59, 130, 246, 0.35);
    --bg-dark:       #020b18;
    --bg-card:       #0a1628;
    --bg-card2:      #0f1f38;
    --border:        rgba(59, 130, 246, 0.18);
    --border-hover:  rgba(59, 130, 246, 0.5);
    --text:          #dde8f8;
    --text-muted:    #6b8db5;
    --success:       #34d399;
    --danger:        #f87171;
    --warn:          #fbbf24;
    /* nav tokens */
    --accent-cyan:   #60a5fa;
    --white:         #dde8f8;
    --white-70:      rgba(221, 232, 248, 0.65);
    --white-10:      rgba(221, 232, 248, 0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ── Page-load fade ── */
body { animation: pageFade 0.5s ease both; }
@keyframes pageFade { from { opacity: 0 } to { opacity: 1 } }

/* ── Scroll-reveal base ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1),
                transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Navigation ── */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    pointer-events: none;
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(6, 15, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 8px;
    backdrop-filter: blur(24px);
    box-shadow:
        0 0 0 1px rgba(65, 105, 255, 0.1),
        0 20px 60px rgba(2, 8, 24, 0.6);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: all;
    position: relative;
}

.nav-bar:hover {
    border-color: rgba(96, 165, 250, 0.25);
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.1),
        0 20px 60px rgba(2, 8, 24, 0.8),
        0 0 40px rgba(96, 165, 250, 0.06);
}

.nav-logo {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    padding: 8px 16px;
    margin-right: 4px;
    white-space: nowrap;
    text-decoration: none;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin-right: 4px;
    flex-shrink: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--white-70);
    font-size: 14px;
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 100px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.nav-link:hover { color: var(--white); }

.nav-link.active {
    color: var(--white);
    background: transparent !important;
}

.nav-link.highlight {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.nav-link.highlight:hover {
    background: rgba(59, 130, 246, 0.22);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.18);
}

/* Sliding indicator */
.nav-indicator {
    position: absolute;
    top: 6px;
    left: 0;
    height: calc(100% - 12px);
    border-radius: 100px;
    background: var(--white-10);
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
    z-index: 0;
    opacity: 0;
}
.nav-indicator.ready { opacity: 1; }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}

/* animated gradient orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.hero-orb-1 {
    width: 600px; height: 600px;
    top: -180px; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
    animation: orbFloat1 8s ease-in-out infinite;
}
.hero-orb-2 {
    width: 400px; height: 400px;
    bottom: 0; right: -100px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
    animation: orbFloat2 11s ease-in-out infinite;
}
.hero-orb-3 {
    width: 300px; height: 300px;
    bottom: 80px; left: -80px;
    background: radial-gradient(circle, rgba(29,78,216,0.15) 0%, transparent 70%);
    animation: orbFloat2 9s ease-in-out infinite reverse;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-30px); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-20px) scale(1.05); }
}

/* grid overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}

.hero-content { position: relative; max-width: 860px; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.07);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    margin-bottom: 1.75rem;
    animation: fadeDown 0.7s 0.1s both;
}
.status-divider {
    width: 1px;
    height: 14px;
    background: rgba(59,130,246,0.35);
    border-radius: 1px;
    margin: 0 0.1rem;
}
#status-players {
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.04em;
}
.hero-eyebrow .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulseDot 2.2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--success); }
    50%       { opacity: 0.5; box-shadow: 0 0 3px var(--success); }
}

.hero h1 {
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    animation: fadeUp 0.8s 0.2s both;
}
.hero h1 .blue {
    background: linear-gradient(135deg, var(--primary-light) 0%, #93c5fd 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradShift 5s ease infinite;
}
@keyframes gradShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    animation: fadeUp 0.8s 0.32s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s 0.44s both;
}

@keyframes fadeUp   { from { opacity:0; transform: translateY(22px) } to { opacity:1; transform:none } }
@keyframes fadeDown { from { opacity:0; transform: translateY(-16px) } to { opacity:1; transform:none } }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    margin-top: 4.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    animation: fadeUp 0.8s 0.56s both;
}
.stat-item { text-align: center; }
.stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-light);
    line-height: 1;
    text-shadow: 0 0 20px var(--primary-glow);
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.35rem;
}

/* ── Buttons ── */
.btn {
    padding: 0.85rem 1.9rem;
    border-radius: 9px;
    font-size: 0.93rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22,1,0.36,1);
}
.btn svg { flex-shrink: 0; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 22px var(--primary-glow), 0 4px 14px rgba(0,0,0,0.4);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 36px var(--primary-glow), 0 8px 24px rgba(0,0,0,0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(59,130,246,0.07);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(59,130,246,0.12);
    transform: translateY(-2px);
}

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

.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.section-label::before, .section-label::after {
    content: '';
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary));
}
.section-label::after { background: linear-gradient(90deg, var(--primary), transparent); }

.section-header h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}
.section-header p { color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* ── Cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 1.4rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.85rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.35s, transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(59,130,246,0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.12); }
.card:hover::before { opacity: 1; }

.card-icon {
    width: 48px; height: 48px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-light);
    margin-bottom: 1.25rem;
    transition: background 0.3s, box-shadow 0.3s;
}
.card:hover .card-icon {
    background: rgba(59,130,246,0.2);
    box-shadow: 0 0 18px rgba(59,130,246,0.2);
}

.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.55rem; }
.card p  { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; }

/* colored card variants */
.card-blue   { border-color: rgba(59,130,246,0.25); }
.card-red    { border-color: rgba(248,113,113,0.2);  }
.card-green  { border-color: rgba(52,211,153,0.2);  }
.card-orange { border-color: rgba(251,191,36,0.2);  }

.card-blue   .card-icon { background: rgba(59,130,246,0.12);  border-color: rgba(59,130,246,0.25);  color: #93c5fd; }
.card-red    .card-icon { background: rgba(248,113,113,0.1);  border-color: rgba(248,113,113,0.2);  color: #fca5a5; }
.card-green  .card-icon { background: rgba(52,211,153,0.1);   border-color: rgba(52,211,153,0.2);   color: #6ee7b7; }
.card-orange .card-icon { background: rgba(251,191,36,0.1);   border-color: rgba(251,191,36,0.2);   color: #fcd34d; }

/* ── Feature strip ── */
.feature-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
}
.feature-track {
    display: flex;
    gap: 3rem;
    padding: 1.6rem 0;
    animation: scrollTrack 28s linear infinite;
    width: max-content;
}
@keyframes scrollTrack {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}
.feature-item svg { color: var(--primary-light); flex-shrink: 0; }

/* ── Connect block ── */
.connect-block {
    background: linear-gradient(135deg, rgba(29,78,216,0.12) 0%, rgba(37,99,235,0.06) 100%);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 18px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.connect-block::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.connect-block h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; }
.connect-block p  { color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem; }

.server-ip-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1.5rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1rem;
    color: var(--primary-light);
    margin-bottom: 2.25rem;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    position: relative;
}
.server-ip-box:hover { border-color: var(--primary); background: rgba(59,130,246,0.06); }
.server-ip-box svg  { color: var(--text-muted); }
.copy-hint {
    position: absolute;
    top: -2rem; left: 50%; transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    white-space: nowrap;
}
.server-ip-box.copied .copy-hint { opacity: 1; }

/* ── Footer ── */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.83rem;
}
footer a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #fff; }
.footer-sep { margin: 0 0.6rem; opacity: 0.35; }

/* ── Regelwerk page ── */
.page-hero {
    padding: 9.5rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(37,99,235,0.18) 0%, transparent 65%),
        linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
    background-size: auto, 60px 60px, 60px 60px;
}
.page-hero-content { position: relative; }
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    animation: fadeUp 0.7s both;
}
.page-hero p { color: var(--text-muted); max-width: 500px; margin: 0 auto; animation: fadeUp 0.7s 0.1s both; }

/* ── Rules layout ── */
.rules-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.rules-nav {
    position: sticky;
    top: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 1.35rem;
    animation: fadeUp 0.6s 0.2s both;
}
.rules-nav h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
}
.rules-nav ul { list-style: none; }
.rules-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.86rem;
    transition: all 0.2s;
}
.rules-nav ul li a svg { flex-shrink: 0; }
.rules-nav ul li a:hover { color: var(--primary-light); background: rgba(59,130,246,0.1); }
.rules-nav ul li a.active { color: var(--primary-light); background: rgba(59,130,246,0.1); }

.rules-content { min-width: 0; }

.rules-chapter { margin-bottom: 3.25rem; }

.chapter-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.chapter-num {
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.06em;
    box-shadow: 0 0 14px var(--primary-glow);
}
.chapter-header h2 { font-size: 1.45rem; font-weight: 800; }
.chapter-header svg { color: var(--primary-light); margin-left: auto; }

.rule-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 11px;
    margin-bottom: 0.8rem;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.rule-item:hover {
    border-color: rgba(59,130,246,0.35);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    transform: translateX(3px);
}

.rule-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
}
.rule-num {
    font-family: 'Consolas', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-light);
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    padding: 2px 8px;
    border-radius: 5px;
    white-space: nowrap;
    margin-top: 2px;
    flex-shrink: 0;
}
.rule-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.4;
}

.rule-body {
    padding: 0 1.3rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.89rem;
    line-height: 1.7;
}
.rule-body ul { margin-top: 0.5rem; padding-left: 1.2rem; }
.rule-body ul li { margin-bottom: 0.3rem; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 1px 8px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.45rem;
    vertical-align: middle;
}
.tag-ban  { background: rgba(248,113,113,0.15); color: #fca5a5; border: 1px solid rgba(248,113,113,0.25); }
.tag-warn { background: rgba(251,191,36,0.12);  color: #fcd34d; border: 1px solid rgba(251,191,36,0.22); }
.tag-info { background: rgba(59,130,246,0.12);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.22); }

/* dot override for offline */
#status-dot.offline {
    background: #f87171;
    box-shadow: 0 0 8px #f87171;
    animation: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-stats { gap: 2rem; }
    .rules-layout { grid-template-columns: 1fr; }
    .rules-nav { position: static; }
    .connect-block { padding: 2.5rem 1.5rem; }
}
