/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #fdf2f8;
    --surface: #ffffff;

    /* Accents */
    --accent-primary: #ec4899;
    --accent-soft: #f472b6;
    --accent-light: #fbcfe8;
    --accent-glow: #f9a8d4;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #ec4899, #f472b6);
    --grad-soft: linear-gradient(135deg, #fbcfe8, #ffffff);

    /* Typography */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-light: #9ca3af;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px rgba(236, 72, 153, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(236, 72, 153, 0.1), 0 4px 6px -2px rgba(236, 72, 153, 0.05);
    --shadow-glow: 0 10px 25px -5px rgba(236, 72, 153, 0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    
    /* Layout */
    --max-width: 1400px;
    --spacing-container: 24px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }

.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }
.mt-xl { margin-top: 2rem; }

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-container);
}

.container-sm {
    max-width: 800px;
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

/* ==========================================================================
   Header & Navbar (SaaS Style)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: var(--max-width);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--accent-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, transparent 70%);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 20%; left: -10%; width: 50%; height: 50%;
    background: var(--accent-light);
    filter: blur(100px);
    opacity: 0.4;
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-primary);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid var(--accent-light);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 32px;
}

.hero-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    background: var(--surface);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ==========================================================================
   Game Section
   ========================================================================== */
.game-section {
    padding: 80px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.5rem;
}

.game-wrapper {
    display: flex;
    justify-content: center;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px solid var(--accent-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    padding: 10px;
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: calc(var(--radius-lg) - 8px);
    background: #f9fafb;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.feature-card {
    background: var(--surface);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* ==========================================================================
   Generic Pages (About, Contact, Terms, etc.)
   ========================================================================== */
.page-hero {
    padding: 160px 24px 80px;
    border-bottom: 1px solid var(--accent-light);
}

.content-section {
    padding: 80px 24px;
}

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

.rounded-image {
    border-radius: var(--radius-md);
    width: 100%;
    object-fit: cover;
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.feature-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* Document / Text Pages */
.text-page .document-box {
    background: var(--surface);
    padding: 60px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--accent-light);
}

.document-box h3 {
    margin-top: 32px;
    color: var(--text-primary);
}

.document-box ul {
    margin-left: 20px;
    margin-bottom: 20px;
    list-style: disc;
    color: var(--text-secondary);
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--accent-light);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

/* Contact Page Specifics */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.highlight-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-primary);
}

.rounded-box {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--accent-light);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #f9fafb;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--surface);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--accent-light);
    padding: 80px 24px 24px;
    margin-top: 40px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.footer-brand p {
    margin-top: 16px;
    font-size: 0.95rem;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

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

.footer-legal {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 40px;
}

.legal-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.badge {
    background: var(--surface);
    border: 1px solid var(--accent-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-legal p {
    font-size: 0.85rem;
    margin: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ==========================================================================
   Responsive Design (Mobile First principles adjusted for desktop down)
   ========================================================================== */
@media (max-width: 1200px) {
    .game-container {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 992px) {
    .layout-split, .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface);
        padding: 24px;
        flex-direction: column;
        gap: 20px;
        text-align: center;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        border: 1px solid var(--accent-light);
        margin-top: 10px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }

    .nav-actions .btn {
        display: none;
    }
    
    .hero {
        padding-top: 140px;
    }
    
    .hero-ctas {
        flex-direction: column;
    }
    
    .hero-disclaimer {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .text-page .document-box {
        padding: 30px 20px;
    }
    
    .game-container {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    .game-container {
        aspect-ratio: 1 / 1;
        padding: 5px;
    }
    .section-header h2 {
        font-size: 2rem;
    }
}