/* â”€â”€ VARIABILI & RESET â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    --neon-purple: #a855f7;
    --neon-blue:   #3b82f6;
    --neon-green:  #22d3ee;
    --bg-dark:     #050510;
    --bg-card:     #0d0d1f;
    --bg-card2:    #111128;
    --text:        #e2e8f0;
    --text-muted:  #94a3b8;
    --border:      rgba(168, 85, 247, 0.2);
    --glow-purple: 0 0 24px rgba(168, 85, 247, 0.45);
    --glow-blue:   0 0 24px rgba(59, 130, 246, 0.45);
    --radius:      14px;
    --transition:  0.3s ease;
}

[data-theme="light"] {
    --bg-dark:    #f0f0ff;
    --bg-card:    #ffffff;
    --bg-card2:   #f5f5ff;
    --text:       #0f0f1a;
    --text-muted: #5a5a7a;
    --border:     rgba(168, 85, 247, 0.25);
    --glow-purple: 0 0 24px rgba(168, 85, 247, 0.25);
    --glow-blue:   0 0 24px rgba(59, 130, 246, 0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

/* â”€â”€ UTILITY â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* â”€â”€ BUTTONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.25rem;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: #fff;
    box-shadow: var(--glow-purple);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(168,85,247,.7); }
.btn-outline {
    background: transparent;
    color: var(--neon-purple);
    border: 1px solid var(--neon-purple);
}
.btn-outline:hover { background: rgba(168,85,247,.1); }
.btn-ghost {
    background: rgba(255,255,255,.05);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.1);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; border-radius: 16px; }

/* â”€â”€ NAVBAR â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(5, 5, 16, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: padding var(--transition);
}
.navbar.scrolled { padding: .65rem 2rem; }

.nav-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
}
#logo-canvas { display: block; flex-shrink: 0; }

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text);
}
.logo-accent { color: var(--neon-purple); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-muted); font-size: .9rem; transition: var(--transition); }
.nav-links a:hover { color: var(--neon-purple); }

.nav-auth { display: flex; align-items: center; gap: .75rem; }
.nav-username { color: var(--neon-green); font-weight: 600; font-size: .9rem; }

/* Miglioramenti navbar */
.navbar {
    padding: .85rem 2rem;
    background: rgba(5, 5, 16, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(168,85,247,.12);
    transition: padding var(--transition), background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
    padding: .6rem 2rem;
    background: rgba(5, 5, 16, 0.92);
    box-shadow: 0 4px 32px rgba(0,0,0,.4);
}
.nav-links { gap: .2rem; }
.nav-links a {
    padding: .4rem .85rem;
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: .2px;
}
.nav-links a:hover {
    color: var(--text);
    background: rgba(255,255,255,.05);
}
.nav-links a.active {
    color: var(--neon-purple);
    background: rgba(168,85,247,.08);
}
.btn-sm { padding: .38rem 1rem; font-size: .82rem; border-radius: 8px; }
.nav-guest-btns { display: flex; align-items: center; gap: .5rem; }
.nav-user-info { display: flex; align-items: center; gap: .65rem; position: relative; }
.nav-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: .65rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(168,85,247,.4);
}

/* â”€â”€ HERO â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Griglia olografica */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(168,85,247,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168,85,247,.07) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 1.5rem;
    animation: fadeUp .9s ease both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(168,85,247,.08);
    color: var(--neon-purple);
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 1.8rem;
    letter-spacing: .5px;
}
.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse 2s ease infinite;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.8rem, 7.5vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.title-line {
    display: block;
    text-shadow: 0 0 40px rgba(168,85,247,.25);
}

.hero-subtitle {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

/* Statistiche hero */
.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: .9rem 2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(13,13,31,.7);
    backdrop-filter: blur(10px);
}
.stat { text-align: center; }
.stat-num {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--neon-purple);
    line-height: 1;
}
.stat-label { font-size: .72rem; color: var(--text-muted); letter-spacing: .5px; margin-top: .2rem; display: block; }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.hero-scroll-hint span {
    display: block;
    width: 24px; height: 40px;
    border: 2px solid rgba(168,85,247,.4);
    border-radius: 12px;
    position: relative;
}
.hero-scroll-hint span::after {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 8px;
    background: var(--neon-purple);
    border-radius: 2px;
    animation: scrollDot 1.8s ease infinite;
}

/* â”€â”€ SECTIONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.section { padding: 6rem 0; }
.section-dark { background: var(--bg-card); }
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3.5rem;
    letter-spacing: 1px;
}

/* â”€â”€ TILT CARD (effetto 3D al mouse) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: box-shadow var(--transition);
}
.card-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 2;
}
.tilt-card:hover .card-shine { opacity: 1; }

/* â”€â”€ STEPS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.step-card::before {
    content: attr(data-step);
    position: absolute;
    top: -10px; right: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(168,85,247,.05);
    line-height: 1;
    pointer-events: none;
}
.step-card:hover { border-color: var(--neon-purple); box-shadow: var(--glow-purple); }
.step-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.step-card p  { color: var(--text-muted); font-size: .88rem; line-height: 1.65; }

/* â”€â”€ TOURNAMENT TYPES â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.type-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.type-card:hover { box-shadow: var(--glow-blue); border-color: var(--neon-blue); }
.type-card.featured {
    border-color: var(--neon-purple);
    box-shadow: var(--glow-purple);
    background: linear-gradient(135deg, rgba(168,85,247,.08), rgba(59,130,246,.06));
}
.type-canvas {
    display: block;
    margin-bottom: .75rem;
}
.type-label {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}
.type-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.type-card p  { color: var(--text-muted); font-size: .88rem; line-height: 1.65; }

/* â”€â”€ GAMES GRID â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
}
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.game-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--neon-blue);
    box-shadow: var(--glow-blue);
}
.game-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.game-card-body { padding: 1rem; }
.game-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .25rem; }
.game-card p  { color: var(--text-muted); font-size: .8rem; line-height: 1.5; }
.games-loading { color: var(--text-muted); text-align: center; padding: 2rem; grid-column: 1/-1; }

/* â”€â”€ CTA SECTION â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cta-section { background: var(--bg-dark); }
.cta-box {
    text-align: center;
    padding: 5rem 2rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(168,85,247,.05), rgba(59,130,246,.05));
    position: relative;
    overflow: hidden;
}
.cta-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(168,85,247,.12), transparent 70%);
    pointer-events: none;
    animation: ctaPulse 4s ease infinite;
}
.cta-box h2 { font-family: 'Orbitron', sans-serif; font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; margin-bottom: 1rem; position: relative; z-index: 1; }
.cta-box p  { color: var(--text-muted); margin-bottom: 2rem; font-size: 1rem; position: relative; z-index: 1; }
.cta-box .btn { position: relative; z-index: 1; }

/* â”€â”€ FOOTER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer .logo-text { font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 900; letter-spacing: 2px; }
.footer .logo-accent { color: var(--neon-purple); }
.footer p { color: var(--text-muted); font-size: .82rem; margin-top: .6rem; }

/* â”€â”€ ANIMAZIONI â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollDot {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(16px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.4); }
}
@keyframes ctaPulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50%       { opacity: .6; transform: translate(-50%, -50%) scale(1.15); }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
