/* 
   Infinite Block World - Premium Dark Theme 
   v2.0 - High Contrast & Vibrant
*/

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors - Adjusted for Dark Mode Pop */
    --color-red: #FF453A;
    --color-orange: #FF9F0A;
    --color-yellow: #FFD60A;
    --color-green: #32D74B;
    --color-blue: #0A84FF;

    /* UI Colors */
    --bg-body: #050505;
    --bg-surface: #101012;
    --bg-surface-hover: #1C1C1E;

    --text-primary: #FFFFFF;
    --text-secondary: #98989D;

    --border-color: rgba(255, 255, 255, 0.1);

    /* Spacing & Layout */
    --max-width: 1200px;
    --header-height: 80px;
    --radius-lg: 24px;
    --radius-md: 16px;

    /* Fonts */
    --font-main: 'Inter', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

/* Background Grid Effect */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

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

/* Typography */
h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3.5rem, 6vw, 5rem);
}

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

h3 {
    font-size: 1.5rem;
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--color-yellow), var(--color-red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: white;
}

.nav-link.cta-button {
    background: var(--color-blue);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.2);
}

.nav-link.cta-button:hover {
    background: #0077E6; /* Slightly darker shade */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
    color: white; /* Ensure text remains white */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary {
    background: white;
    color: black;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-description {
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.25rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 80px;
}

/* Visual Demo */
.visual-container {
    perspective: 1000px;
}

.game-grid-3d {
    width: 320px;
    height: 500px;
    margin: 0 auto;
    background: #000;
    border-radius: 20px;
    border: 8px solid #222;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 6px;
    transform: rotateX(20deg) rotateY(-10deg) rotateZ(5deg);
    box-shadow:
        50px 50px 100px rgba(0, 0, 0, 0.5),
        -5px -5px 20px rgba(255, 255, 255, 0.05);
    transition: transform 0.5s ease;
}

.game-grid-3d:hover {
    transform: rotateX(0) rotateY(0) rotateZ(0) scale(1.05);
}

.block {
    border-radius: 4px;
    position: relative;
    box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.2);
}

.block::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 4px;
}

.b-red {
    background: var(--color-red);
}

.b-orange {
    background: var(--color-orange);
}

.b-yellow {
    background: var(--color-yellow);
}

.b-green {
    background: var(--color-green);
}

.b-blue {
    background: var(--color-blue);
}

/* Features Section */
.features {
    padding: 120px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--color-blue);
    transform: translateY(-5px);
    background: var(--bg-surface-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

.feature-card h3 {
    margin-bottom: 12px;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    h1 {
        font-size: 3rem;
    }

    .hero {
        padding-top: 140px;
    }
}