:root {
    --bg-dark: #0a0a0d;
    --bg-secondary: #141417;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --accent-purple: #bf7af0;
    --accent-purple-glow: rgba(191, 122, 240, 0.3);
    --accent-soft: #dab6ff;
    --text-primary: #f5f5f5;
    --text-secondary: #9ca3af;
    --neon-blue: #00f3ff;
    
    --spacing-desktop: 100px;
    --spacing-tablet: 70px;
    --spacing-mobile: 50px;
    
    --max-width: 1400px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.125rem; /* Strict rule: MEDIUM size by default */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Scale */
h1, h2, h3, h4 {
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

a {
    color: var(--accent-soft);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Layout System */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--spacing-desktop) 0;
    position: relative;
}

@media (max-width: 1024px) {
    section { padding: var(--spacing-tablet) 0; }
}

@media (max-width: 768px) {
    section { padding: var(--spacing-mobile) 0; }
    .container { padding: 0 1.25rem; }
}

/* Visual Rules: Priority Layering for UI Elements */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1; /* Layering Priority: Strict lower bound beneath images */
}

/* Announcement Bar */
.announcement-bar {
    background: linear-gradient(90deg, rgba(10,10,13,1) 0%, rgba(20,20,23,1) 50%, rgba(10,10,13,1) 100%);
    text-align: center;
    padding: 0.75rem;
    font-size: 1.125rem;
    color: var(--accent-soft);
    position: relative;
    z-index: 1001;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 13, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(191, 122, 240, 0.05);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple-glow), transparent);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-links a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

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

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #a35de0 0%, var(--accent-purple) 100%);
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px var(--accent-purple-glow);
    text-align: center;
    position: relative;
    z-index: 10;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(191, 122, 240, 0.5);
    color: #ffffff;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--spacing-desktop) 0;
}

.hero-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(191, 122, 240, 0.2) 0%, rgba(10, 10, 13, 0) 70%);
    top: 50%;
    left: -10%; /* Ensure glow remains behind everything */
    transform: translateY(-50%);
    z-index: 0; /* Layering Priority: Background layer lowest */
    pointer-events: none;
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 2; /* Text layout priority */
}

.hero-text {
    max-width: 600px;
}

.disclaimer-badge {
    display: inline-block;
    background: var(--glass-bg);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 1.125rem;
    color: var(--accent-soft);
    margin-bottom: 2rem;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
    position: relative;
    z-index: 5;
}

/* Game Embed Section */
.game-section {
    position: relative;
    z-index: 5;
    background: radial-gradient(circle at center, var(--bg-secondary) 0%, var(--bg-dark) 100%);
}

.game-wrapper {
    width: 85%;
    margin: 0 auto;
    position: relative;
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0) 100%);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 80px rgba(191, 122, 240, 0.1);
}

.game-wrapper iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 16px;
    display: block;
    background: #000;
}

@media (max-width: 1024px) {
    .game-wrapper { width: 95%; }
}

@media (max-width: 768px) {
    .game-wrapper { width: 100%; padding: 0; background: transparent; box-shadow: none; }
    .game-wrapper iframe { border-radius: 12px; }
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 3rem; }
}

/* Feature Cards */
.feature-card {
    background: var(--glass-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.4s ease, background 0.4s ease;
    position: relative;
    z-index: 2;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Image System - VISIBILITY GUARANTEE RULE */
.cinematic-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(191, 122, 240, 0.1);
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 10; /* Image Priority Rule: HIGH priority always above backgrounds/overlays */
    background-color: var(--bg-secondary); /* Anti-invisibility guarantee */
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-primary); }
.form-control {
    width: 100%;
    padding: 1.25rem;
    background: rgba(0,0,0,0.3);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-family: inherit;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 5;
}
.form-control:focus {
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 2px var(--accent-purple);
}

/* Footer System */
footer {
    background: var(--bg-secondary);
    padding: var(--spacing-desktop) 0 3rem;
    position: relative;
    z-index: 5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.footer-title {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Footer Hover System (CRITICAL) */
.footer-link-item {
    display: block;
    margin-bottom: 1rem;
}

.footer-link {
    display: inline-flex;
    position: relative;
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
    transition: width 0.3s ease-in-out;
}

.footer-link:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 100%);
}

/* Legal Pages Standard Layout */
.legal-header {
    text-align: center;
    padding: 8rem 0 4rem;
    background: radial-gradient(circle at top, var(--bg-secondary) 0%, var(--bg-dark) 100%);
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: var(--spacing-desktop);
}

.legal-content h2 { margin-top: 3rem; font-size: 2rem; color: #ffffff; }
.legal-content p { margin-bottom: 1.5rem; color: var(--text-secondary); }
.legal-content ul { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.legal-content li { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 0.75rem; }