:root {
    /* Base Layers */
    --bg-primary: #0b1020;
    --bg-secondary: #121a33;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Gem Accents */
    --gem-emerald: #10b981;
    --gem-sapphire: #3b82f6;
    --gem-amethyst: #8b5cf6;
    --gem-ruby: #ef4444;
    --gem-topaz: #f59e0b;
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5f5;
    --text-muted: #94a3b8;
    
    /* Fonts & Radii */
    --font-main: 'Inter', sans-serif;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background Effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
    z-index: -1;
    animation: ambientGlow 20s ease-in-out infinite alternate;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Layout System */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 16, 32, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(11, 16, 32, 0.95);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.15);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    fill: var(--gem-sapphire);
    filter: drop-shadow(0 0 8px var(--gem-sapphire));
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gem-sapphire), var(--gem-amethyst));
    transition: width 0.3s ease;
}

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

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

.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gem-sapphire), var(--gem-amethyst));
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: gemShine 3s infinite;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--gem-sapphire);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, var(--gem-sapphire) 50%, var(--gem-amethyst) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CSS Gem Construct for Hero */
.css-gem {
    width: 300px;
    height: 300px;
    position: relative;
    background: linear-gradient(135deg, var(--gem-sapphire), rgba(139, 92, 246, 0.6));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: inset 0 0 50px rgba(255,255,255,0.5);
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.6));
}
.css-gem::after {
    content: '';
    position: absolute;
    top: 5%; left: 5%; right: 5%; bottom: 5%;
    background: linear-gradient(to bottom right, rgba(255,255,255,0.8), transparent);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Game Section */
.game-section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-primary);
}

.section-title span {
    color: var(--gem-sapphire);
}

.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 700px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.2);
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Features Section */
.features-section {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gem-sapphire);
    font-size: 32px;
}

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

.feature-card p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-muted);
}

.footer-column ul li a:hover {
    color: var(--gem-sapphire);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Headers (for inner pages) */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(18, 26, 51, 0.8), var(--bg-primary));
}

.page-header h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.page-content {
    padding: 0 0 100px;
}

.content-box {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.content-box h2 {
    color: var(--gem-sapphire);
    margin: 32px 0 16px;
}

.content-box p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-box ul {
    list-style: disc inside;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gem-sapphire);
    background: rgba(255, 255, 255, 0.08);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Disclaimer */
.disclaimer {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.disclaimer strong {
    color: var(--gem-ruby);
}