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

:root {
    /* Colors - Dark Base */
    --bg-base: #0b0b0c;
    --bg-surface: #111111;
    --bg-surface-light: #1a1a1c;
    --bg-glass: rgba(17, 17, 17, 0.6);
    
    /* Colors - Neon Accents */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-magenta: #ec4899;
    --accent-cyan: #22d3ee;
    
    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    --gradient-secondary: linear-gradient(135deg, var(--accent-magenta), var(--accent-purple));
    --gradient-glow: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-magenta), var(--accent-cyan));
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1280px;
    --nav-height: 80px;
    
    /* Effects */
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --border-glass: 1px solid rgba(255, 255, 255, 0.05);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

/* ================= Typography ================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1rem;
}

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

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

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

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

section {
    padding: 6rem 0;
    position: relative;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ================= Header & Navigation ================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    transition: var(--transition);
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-purple);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition);
}

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

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

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-base);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    clip-path: circle(0% at top right);
    transition: clip-path 0.5s ease-in-out;
}

.mobile-menu.active {
    clip-path: circle(150% at top right);
}

.mobile-menu a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
}

/* ================= Buttons ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gradient-secondary);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ================= Hero Section ================= */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-image: url('images/photo-1550745165-9bc0b252726f.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(11, 11, 12, 0.7), var(--bg-base));
}

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

.hero-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* ================= Game Cards ================= */
.game-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: var(--border-glass);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.game-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 65%; /* Aspect ratio */
    overflow: hidden;
}

.game-img-wrap img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-img-wrap img {
    transform: scale(1.1);
}

.game-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.3);
    z-index: 2;
}

.game-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-category {
    color: var(--accent-purple);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.game-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.game-card .btn {
    margin-top: auto;
    width: 100%;
}

/* ================= Categories Section ================= */
.category-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(11,11,12,0.9), rgba(11,11,12,0.2));
    z-index: 1;
}

.category-card img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.category-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.category-content p {
    color: var(--accent-cyan);
    font-weight: 500;
}

.category-card:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
    border: 1px solid var(--accent-blue);
}

/* ================= Leaderboard ================= */
.leaderboard-wrap {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: var(--border-glass);
    padding: 2rem;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.leaderboard-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.leaderboard-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.rank {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-magenta);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-surface-light);
    border: 2px solid var(--accent-purple);
    overflow: hidden;
}

.player-name {
    font-weight: 600;
}

.score {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent-cyan);
}

/* ================= Internal Page Headers ================= */
.page-header {
    padding: 12rem 0 6rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(17,17,17,0.8), var(--bg-base)), url('images/photo-1542751371-adc38448a05e.png');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ================= Forms ================= */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-surface-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

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

/* ================= Game Detail ================= */
.game-play-area {
    background: #000;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.game-play-area img {
    opacity: 0.5;
    width: 100%; height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* ================= Footer ================= */
footer {
    background: var(--bg-surface);
    border-top: var(--border-glass);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about p {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

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

.footer-links ul li a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ================= Utility Classes & GSAP setup ================= */
.reveal {
    opacity: 0;
    visibility: hidden;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.py-5 { padding-top: 4rem; padding-bottom: 4rem; }

/* ================= Responsive Breakpoints ================= */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .header-btn { display: none; }
    .menu-toggle { display: block; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    
    .hero h1 { font-size: 2.5rem; }
    section { padding: 4rem 0; }
}