@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 1. Variables */
:root {
    /* Base Colors */
    --bg-primary: #020617;
    --bg-secondary: #0a0f1c;
    
    /* Surfaces */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    
    /* Gradients */
    --gradient-aqua: linear-gradient(135deg, #06b6d4, #22d3ee);
    --gradient-coral: linear-gradient(135deg, #fb7185, #f43f5e);
    --gradient-deep: linear-gradient(135deg, #06b6d4, #6366f1);
    --gradient-border-anim: linear-gradient(45deg, #06b6d4, #f43f5e, #6366f1, #06b6d4);
    
    /* Glows */
    --glow-aqua: rgba(34, 211, 238, 0.45);
    --glow-coral: rgba(244, 63, 94, 0.45);
    --glow-deep: rgba(99, 102, 241, 0.45);
    
    /* Typography */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Layout */
    --max-width: 1280px;
    --nav-width: 80px;
    --header-height: 80px;
    
    /* Spacing */
    --space-desktop: 120px;
    --space-tablet: 80px;
    --space-mobile: 60px;
}

/* 2. Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

/* 3. Layout & Global Background */
.ocean-environment {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 80%);
    overflow: hidden;
}

.light-rays {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(from 0deg at 50% -10%, rgba(34, 211, 238, 0.03) 0deg 10deg, transparent 10deg 20deg);
    animation: rotateRays 60s linear infinite;
    pointer-events: none;
}

.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
    animation: floatUp linear infinite;
}

.page-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-left: var(--nav-width);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section {
    padding: var(--space-desktop) 0;
}

/* 4. Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: var(--nav-width);
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--glass-border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px var(--glow-aqua);
}

.brand svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--glow-aqua));
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--gradient-aqua);
    color: #000;
    box-shadow: 0 4px 20px var(--glow-aqua);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow-aqua);
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 5. Floating Side Nav */
.side-nav {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: var(--nav-width);
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    z-index: 110;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.1);
    transition: all 0.3s ease;
}

.side-nav:hover {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.2);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    transform: scale(1.1);
}

.nav-link:hover svg {
    filter: drop-shadow(0 0 8px var(--glow-aqua));
}

.nav-link.active {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    box-shadow: inset 0 0 10px rgba(34, 211, 238, 0.2);
}

.nav-tooltip {
    position: absolute;
    left: 100%;
    margin-left: 16px;
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.nav-link:hover .nav-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 6. Hero Section */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
    position: relative;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: var(--gradient-aqua);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.3));
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

/* 7. Game Section */
.game-section {
    position: relative;
    z-index: 5;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    border-radius: 24px;
    padding: 4px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease;
}

.game-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: var(--gradient-border-anim);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: animatedBorder 4s linear infinite;
    z-index: -1;
}

.game-container:hover {
    transform: scale(1.02);
}

.game-container:hover::before {
    box-shadow: 0 0 30px var(--glow-coral);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.game-info h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 4px;
}

.game-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.game-controls button {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.game-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #22d3ee;
    border-color: #22d3ee;
}

.game-frame-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    background: #000;
}

.game-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 8. Features Section (Asymmetrical Grid) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(18px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 211, 238, 0.1);
}

.feature-card:hover::after {
    left: 200%;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(34, 211, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #22d3ee;
    font-size: 24px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #fff;
}

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

.card-large { grid-column: span 8; }
.card-small { grid-column: span 4; }
.card-medium { grid-column: span 6; }

/* 9. Internal Pages Layout */
.page-hero {
    padding: calc(var(--header-height) + 60px) 0 60px;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #fff;
    margin-bottom: 16px;
}

.page-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.content-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 60px;
    backdrop-filter: blur(18px);
    max-width: 900px;
    margin: 0 auto;
}

.content-card h2 {
    color: #fff;
    margin: 32px 0 16px;
    font-size: 1.5rem;
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-card ul {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.content-card li {
    margin-bottom: 8px;
    list-style-type: disc;
    line-height: 1.6;
}

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

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

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

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #22d3ee;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

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

/* 10. Footer & Legal */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 24px;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(18px);
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    grid-column: span 4;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    grid-column: span 8;
    display: flex;
    justify-content: flex-end;
    gap: 60px;
}

.link-group h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1rem;
}

.link-group ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.link-group a:hover {
    color: #22d3ee;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 24px;
    text-align: center;
}

.disclaimer-box {
    border: 1px solid rgba(244, 63, 94, 0.3);
    background: rgba(244, 63, 94, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: inline-block;
}

.disclaimer-box p {
    color: #f43f5e;
    font-size: 0.85rem;
    font-weight: 500;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 11. Animations */
@keyframes rotateRays {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-20vh) scale(1.5);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes animatedBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 12. Utilities & Responsive */
.text-aqua { color: #22d3ee; }

@media (max-width: 1024px) {
    .card-large, .card-small, .card-medium {
        grid-column: span 12;
    }
    
    .footer-brand { grid-column: span 12; }
    .footer-links { grid-column: span 12; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 768px) {
    :root {
        --nav-width: 0px;
        --header-height: 70px;
    }
    
    .page-wrapper {
        padding-left: 0;
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    .top-header {
        left: 0;
        padding: 0 20px;
    }
    
    .side-nav {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 80px;
        transform: none;
        flex-direction: row;
        justify-content: space-around;
        padding: 0 20px;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }
    
    .nav-tooltip {
        display: none;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .content-card {
        padding: 30px 20px;
    }
}