/* ==================== VARIABLES Y RESET ==================== */
:root {
    --primary: #5865F2;
    --success: #57F287;
    --warning: #FEE75C;
    --error: #ED4245;
    --gold: #FFD700;
    --neon: #5865F2;
    --neon-glow: rgba(88, 101, 242, 0.6);

    --bg-dark: #0a0a0a;
    --bg-surface: #1a1a1a;
    --bg-elevated: #252525;
    --bg-hover: #2f2f2f;

    --text-primary: #ffffff;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;

    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.5);

    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, #7289da 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, #3ba55d 100%);
    --gradient-gold: linear-gradient(135deg, var(--gold) 0%, #ffaa00 100%);
    --surface-gradient: linear-gradient(180deg, rgba(88, 101, 242, 0.10), rgba(10, 10, 10, 0.92));
    --elevated-gradient: linear-gradient(180deg, rgba(88, 101, 242, 0.12), rgba(10, 10, 10, 0.94));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.christmas-ribbon {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--elevated-gradient);
    color: #fff;
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 24px rgba(88,101,242,0.25);
    z-index: 1200;
}


.snow-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9000;
}

.global-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('rayos.gif') center/cover no-repeat;
    opacity: 0.12;
    filter: saturate(1.2) contrast(1.05);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(88, 101, 242, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-shadow: 0 0 12px var(--neon-glow);
}

.hero-subtitle {
    display: block;
    color: var(--text-secondary);
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
}

.hero-stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.25);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Fira Code', monospace;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 6rem 0;
}

.section-dark {
    background: var(--surface-gradient);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ==================== RANKINGS ==================== */
.rankings-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-group {
    display: flex;
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 12px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.rankings-table-container {
    background: var(--surface-gradient);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(88, 101, 242, 0.35);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.15);
}

.rankings-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(88, 101, 242, 0.25);
}

.page-btn {
    padding: 8px 14px;
    background: rgba(88, 101, 242, 0.12);
    color: #fff;
    border: 1px solid rgba(88, 101, 242, 0.5);
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: rgba(88, 101, 242, 0.2);
    box-shadow: 0 0 16px rgba(88, 101, 242, 0.35);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
}

.rankings-table thead {
    background: rgba(88, 101, 242, 0.08);
}

.rankings-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.rankings-table td {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.rankings-table tbody tr {
    transition: background-color 0.2s;
}

.rankings-table tbody tr:hover {
    background: rgba(88, 101, 242, 0.10);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
}

.rank-1 {
    background: var(--gradient-gold);
    color: #000;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #E6A57E);
    color: #000;
}

.rank-other {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.stat-number {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
}

.win-rate {
    color: var(--success);
    font-weight: 600;
}

/* ==================== VIDEO TUTORIAL ==================== */
.video-container {
    max-width: 900px;
    margin: 0 auto 4rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
}

.tutorial-video {
    width: 100%;
    display: block;
}

.tutorial-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(88, 101, 242, 0.10);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.25);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--surface-gradient);
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.2), 0 0 20px rgba(88, 101, 242, 0.25);
}

.stat-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 12px;
}

.stat-info {
    flex: 1;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Fira Code', monospace;
    color: var(--primary);
}

.stat-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--surface-gradient);
    border-top: 1px solid rgba(88, 101, 242, 0.35);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
    z-index: 3000;
    transition: all 0.3s ease;
}

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== MODAL DE LOGIN ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
 .modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('rayos.gif') center/cover no-repeat;
    opacity: 0.25;
    filter: blur(2px) saturate(1.2);
 }

.modal-content {
    background: linear-gradient(180deg, rgba(88, 101, 242, 0.12), rgba(10, 10, 10, 0.92));
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(88, 101, 242, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(88, 101, 242, 0.3);
    position: relative;
    z-index: 1;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px var(--neon-glow);
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 14px var(--neon-glow);
}

.modal-header p {
    color: #dce3ff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-login-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-login-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4), 0 0 20px var(--neon-glow);
}

.btn-continue-guest {
    padding: 1rem 2rem;
    background: rgba(88, 101, 242, 0.1);
    color: var(--primary);
    border: 1px solid rgba(88, 101, 242, 0.5);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue-guest:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(88, 101, 242, 0.5);
}

/* ==================== USER MENU ==================== */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-name {
    color: var(--text-primary);
    font-weight: 600;
}

.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

.btn-login {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        display: none;
    }

    .hero-title {
        font-size: 3rem;
    }

    .rankings-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }

    .rankings-table {
        font-size: 0.85rem;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.75rem 0.5rem;
    }
}
.prize-section .section-title { display: flex; align-items: center; gap: 0.5rem; justify-content: center; }
.prize-section .section-header { text-align: center; }
.prize-section .section-subtitle { text-align: center; }
.prize-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.prize-image img { width: 100%; border-radius: 16px; border: 1px solid rgba(88,101,242,0.35); box-shadow: 0 10px 30px rgba(88,101,242,0.15); }
.prize-image { perspective: 900px; }
.prize-image img { transition: transform 0.25s ease, box-shadow 0.25s ease; will-change: transform; }
.prize-image:hover img { transform: translateY(-6px) scale(1.02); box-shadow: 0 20px 50px rgba(88,101,242,0.25); }
.flyer-bump { animation: flyer-bump 600ms ease; }
@keyframes flyer-bump {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-8px) scale(1.03); box-shadow: 0 24px 60px rgba(88,101,242,0.28); }
  100% { transform: translateY(0) scale(1); }
}
.prize-content { display: flex; flex-direction: column; gap: 1.5rem; }
.prize-text { background: var(--elevated-gradient); border: 1px solid rgba(88,101,242,0.35); border-radius: 16px; padding: 1.5rem; box-shadow: 0 10px 30px rgba(88,101,242,0.12); }
.prize-text p { color: #e6e9ff; margin: 0.35rem 0; font-weight: 600; line-height: 1.5; }
.countdown { display: flex; gap: 1rem; padding: 1rem; border: 1px solid rgba(88,101,242,0.35); border-radius: 12px; background: rgba(88,101,242,0.10); justify-content: center; }
.count-item { display: flex; flex-direction: column; align-items: center; min-width: 76px; }
.count-item span { font-size: 2rem; font-weight: 900; color: #fff; }
.count-item label { font-size: 0.9rem; color: var(--text-secondary); }

@media (max-width: 900px) {
  .prize-grid { grid-template-columns: 1fr; }
}
#cookie-banner{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);background:var(--elevated-gradient);border:1px solid rgba(88,101,242,.45);box-shadow:0 20px 60px rgba(88,101,242,.2);border-radius:14px;padding:1rem 1.25rem;display:flex;gap:1rem;align-items:flex-start;max-width:900px;width:calc(100% - 24px);z-index:10000;color:#fff}
.cookie-text{flex:1;line-height:1.35;opacity:.95}
.cookie-actions{display:flex;gap:.5rem;align-items:center}
.btn-cookie{background:#5865F2;color:#fff;border:none;border-radius:10px;padding:.6rem 1rem;cursor:pointer;transition:transform .12s ease,box-shadow .2s ease}
.btn-cookie:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(88,101,242,.25)}
.btn-cookie-outline{background:transparent;color:#cfe1ff;border:1px solid rgba(88,101,242,.45)}
.cookie-link{color:#aab7ff;text-decoration:underline;text-underline-offset:2px}
