*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border-color: #2a2a2a;
    --border-light: #333333;
    --text-primary: #e8e8e8;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #4ade80;
    --accent-dim: #22c55e;
    --accent-bg: rgba(74, 222, 128, 0.08);
    --red: #ef4444;
    --yellow: #eab308;
    --blue: #3b82f6;
    --purple: #a78bfa;
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 70px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== HERO WRAPPER ===== */
.hero-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, rgba(74, 222, 128, 0.08) 0%, transparent 60%);
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 1;
}

.hero-wrapper .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.top-nav {
    padding: 24px 0;
    position: static;
    background: transparent;
    border: none;
    backdrop-filter: none;
    height: auto;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
}

.back-link:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-bg);
    transform: translateX(-4px);
}

.hero-wrapper header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 0 100px;
    position: relative;
}

.hero-wrapper header h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
    background: linear-gradient(to bottom, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-wrapper header p {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-bg);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    margin-top: 8px;
}

.hero-actions-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rules-nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    transition: all 0.2s;
}

.rules-nav-link:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-bg);
    transform: translateY(-2px);
}

/* ===== RULES SECTION ===== */
.rules-section {
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.rules-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.rules-block:nth-child(1) { animation-delay: 0.1s; }
.rules-block:nth-child(2) { animation-delay: 0.2s; }
.rules-block:nth-child(3) { animation-delay: 0.3s; }

.rules-block:hover {
    border-color: rgba(74, 222, 128, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.rules-block.highlight-flash {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
    background: rgba(74, 222, 128, 0.05);
}

.rules-block h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.rules-block h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-block h4:first-of-type {
    margin-top: 0;
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.rules-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    line-height: 1.6;
    transition: all 0.2s;
}

.rules-list li:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.rules-list li strong {
    color: var(--accent);
    font-weight: 600;
}

/* Rules Callout */
.rules-callout {
    padding: 20px 24px;
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: var(--radius);
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rules-callout strong {
    color: var(--yellow);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.rules-list li a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}

.rules-list li a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.rules-callout p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== CONSEQUENCES TABLES ===== */
.block-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    margin-top: -20px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.consequences-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.consequences-table th,
.consequences-table td {
    width: 25%;
}

.consequences-table th {
    text-align: left;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.consequences-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: top;
}

.consequences-table tr:last-child td {
    border-bottom: none;
}

.consequences-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.consequences-table td strong {
    color: var(--text-primary);
}

.consequences-table td small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.consequences-table .severe td:first-child strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .consequences-table {
        font-size: 13px;
    }
    .consequences-table th,
    .consequences-table td {
        padding: 12px;
    }
}

/* ===== FOOTER ===== */
footer {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.copyright {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-legal {
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.6;
}

@media (max-width: 768px) {
    footer {
        padding: 40px 0;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-wrapper header h1 {
        font-size: 40px;
    }
    
    .hero-actions {
        gap: 12px;
    }

    .hero-actions-row {
        gap: 8px;
    }

    .rules-nav-link {
        font-size: 12px;
        padding: 8px 16px;
    }

    .rules-block {
        padding: 24px;
    }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}
