
/* =========================================
   1. Reset & Variables
   ========================================= */
:root {
    /* Color Palette - Dark Gaming Theme */
    --color-bg: #0f1115;
    --color-bg-secondary: #161b22;
    --color-surface: #1e232e;
    
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-accent: #8b5cf6; /* Violet */
    --color-success: #10b981;
    --color-text-main: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #334155;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-hover: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    --gradient-surface: linear-gradient(180deg, rgba(30, 35, 46, 0.7) 0%, rgba(15, 17, 21, 1) 100%);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 1rem;
    --font-size-h1: clamp(2rem, 5vw, 3.5rem);
    --font-size-h2: clamp(1.5rem, 3vw, 2.25rem);
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 2rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--border-radius-md);
}

/* =========================================
   2. Layout & Container
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

/* =========================================
   3. Header & Navigation (.intro nav)
   ========================================= */
.intro {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 40%),
                var(--color-bg);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) 0;
    position: relative;
    z-index: 10;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo::before {
    content: 'UP X'; /* Fallback logo text */
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

nav ul {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-brand);
    transition: width var(--transition-fast);
}

nav ul li a:hover,
nav ul li a:focus {
    color: var(--color-text-main);
}

nav ul li a:hover::after {
    width: 100%;
}

.border {
    display: none; /* Semantic structural fix */
}

/* Burger Menu Icon */
.burger {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.burger::before,
.burger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.burger::before { top: 0; box-shadow: 0 9px 0 var(--color-text-main); }
.burger::after { bottom: 0; }

/* =========================================
   4. Hero Section (.body)
   ========================================= */
.intro .body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) 0;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.intro h1 {
    font-size: var(--font-size-h1);
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.intro h1 span {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.intro p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
    max-width: 60ch;
}

/* CTA Button */
.intro .body a[href="/go/"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--gradient-brand);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.intro .body a[href="/go/"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.6);
}

.intro .body a[href="/go/"]:active {
    transform: translateY(-1px);
}

.intro .body a[href="/go/"] span {
    position: relative;
    z-index: 1;
}

/* =========================================
   5. Content Section
   ========================================= */
.content {
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    margin-top: -2rem; /* Overlap effect */
    padding-top: var(--spacing-xl);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}

.content h2 {
    font-size: var(--font-size-h2);
    margin: var(--spacing-xl) 0 var(--spacing-md);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content h2 span {
    color: var(--color-primary);
}

.content h3 {
    font-size: 1.5rem;
    margin: var(--spacing-lg) 0 var(--spacing-sm);
    color: var(--color-text-main);
    border-left: 4px solid var(--color-accent);
    padding-left: 1rem;
}

.content p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-muted);
    font-size: 1rem;
    text-align: justify;
}

.content ul, .content ol {
    margin: var(--spacing-md) 0 var(--spacing-lg) var(--spacing-lg);
    color: var(--color-text-muted);
}

.content ul li, .content ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.content ul li {
    list-style-type: disc;
}

.content ol li {
    list-style-type: decimal;
}

.content a {
    color: var(--color-primary);
    border-bottom: 1px solid transparent;
}

.content a:hover {
    border-bottom-color: var(--color-primary);
    color: var(--color-primary-dark);
}

/* =========================================
   6. Footer
   ========================================= */
footer {
    background-color: var(--color-bg);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

footer .bor {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
    margin-bottom: var(--spacing-lg);
}

footer nav {
    flex-direction: column;
    gap: var(--spacing-lg);
}

footer nav ul {
    background: transparent;
    border: none;
    flex-wrap: wrap;
    justify-content: center;
}

footer nav ul li a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

footer nav ul li a:hover {
    color: var(--color-primary);
}

/* =========================================
   7. Animations & Micro-interactions
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Focus states for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* =========================================
   8. Responsive Design (Mobile & Tablet)
   ========================================= */
@media screen and (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2.5rem;
    }

    /* Navigation */
    nav {
        padding: 1rem 0;
    }

    nav ul {
        display: none; /* Simple toggle logic assumed via JS or fallback to none */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--color-surface);
        padding: 1rem;
        gap: 0;
        border: 1px solid var(--color-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    /* Show links if needed or use CSS hover hack (omitted for clean code, assuming JS handles .active) */
    
    .burger {
        display: block; /* Show burger on mobile */
    }

    /* Mobile Menu Fallback: Horizontal Scroll if preferred without JS */
    nav ul {
        display: flex;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
        background: transparent;
        border: none;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        margin-top: 1rem;
        scrollbar-width: none; /* Firefox */
    }
    
    nav ul::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    nav ul li {
        white-space: nowrap;
    }
    
    nav ul li a {
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        font-size: 0.85rem;
    }

    .burger {
        display: none; /* Hiding burger to favor the scrollable menu for a no-js CSS solution */
    }

    /* Typography adjustments */
    .intro h1 {
        font-size: 2.2rem;
    }

    .intro .body a[href="/go/"] {
        width: 100%;
    }

    .content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .intro .body {
        align-items: stretch;
    }
    
    .intro p {
        text-align: left;
    }
    
    .intro h1 {
        text-align: left;
    }
}
