/* ==================================================
   VARIABLES PREMIUM - ESTILO COMUNIDAD GAMER
================================================== */

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
}
body {
    padding-bottom: 0;
    position: relative;
}
.ranking-container {
    position: relative; /* necesario para que los botones se posicionen dentro */
}

.scroll-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.scroll-buttons a img {
    width: 40px;
    height: 40px;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.scroll-buttons a img:hover {
    opacity: 1;
    transform: scale(1.08);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('https://www.comunidadgamer.eu/site/img/fondo.png') center -30px / cover no-repeat;
    opacity: 0.6;
    z-index: -1;
}
.scroll-buttons {
    position: fixed;
    right: 40px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.scroll-buttons a img {
    width: 50px;
    height: 50px;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.scroll-buttons a img:hover {
    opacity: 1;
    transform: scale(1.08);
}
/* BotÃ³n volver arriba izquierda */
.back-main-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(120deg, #3b8edf, #1e5eae);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(58, 141, 222, 0.35);
    transition: transform 0.18s ease, box-shadow 0.2s ease;
    z-index: 10;
}

.back-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(77, 163, 255, 0.45);
}

/* Layout general */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    padding: 40px 0;
    text-align: center;
}

/* Layout principal */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

/* CONTENEDOR PRINCIPAL Y SIDEBAR - ESTÃ‰TICA FOOTER (MINIMALISTA) */
.content-main,
.content-sidebar {
    padding: 40px;
    background: rgba(24, 24, 24, 0.95);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: none;
    border: none;
    height: auto;
}

/* Evitar hover con sombras */
.content-main:hover {
    box-shadow: none;
}

/* Site footer */
.site-footer {
    margin-top: -150px;
    padding: 15px 0;
    text-align: center;
}

.site-footer .container {
    background: rgba(24, 24, 24, 0.95);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    letter-spacing: 0.3px;
}

:root {
    --color-bg: #040404;
    --color-bg-alt: #0e0e0e;
    --color-surface: rgba(18, 18, 18, 0.94);
    --color-card: rgba(24, 24, 24, 0.98);

    --color-text: #eaeaea;
    --color-muted: #9a9a9a;

    --color-accent: #ffd86f;
    --color-accent-2: #ffdf94;
    --color-accent-dark: #b38b31;

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

    --shadow-heavy: 0 20px 50px rgba(0, 0, 0, 0.75);
    --shadow-glow-light: 0 0 12px rgba(255, 215, 0, 0.25);
    --shadow-glow-strong: 0 0 18px rgba(255, 215, 0, 0.32);

    --radius-lg: 18px;
    --radius-md: 12px;
    --transition-fast: 0.18s ease;
    --transition-smooth: 0.28s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cinzel', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #030303, #0a0a0a 80%);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* CONTENEDORES GENERALES */
.page-wrapper {
    min-height: 100vh;
}

.container {
    width: min(900px, 100%);
}

.main-content {
    flex: 1;
    padding: 150px 0;
}

/* Layout grid ajustado */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 20px;
    align-items: stretch;
}

.content-layout:has(.content-sidebar) {
    grid-template-columns: 1fr 280px;
}

.content-layout:not(:has(.content-sidebar)) {
    grid-template-columns: 1fr;
}

/* CARDS Y PANELES (sin cambios, opcional) */
.card,
.panel {
    background: rgba(8, 8, 8, 0.95);
    border: 1px solid rgba(8, 8, 8, 0.95);
    border-radius: var(--radius-lg);
    padding: 26px;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
    transition: transform var(--transition-fast), box-shadow var(--transition-smooth);
}

/* MODALES / OVERLAYS */
.modal {
    background: rgba(0, 0, 0, 0.92);
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    display: grid;
    place-items: center;
    z-index: 9999;
}

#IrVentanaFlotante:target {
    opacity: 1;
    pointer-events: auto;
}

.ventana {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: min(400px, 90%);
    text-align: center;
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.32s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* TITULOS */
.page-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    text-align: center;
    color: var(--color-accent);
    text-shadow:
        0 8px 22px rgba(255, 215, 0, 0.25),
        0 0 10px rgba(255, 215, 0, 0.18);
    margin-bottom: 26px;
}

/* FLEX UTILIDADES */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; }
.flex-between-center { display: flex; justify-content: space-between; align-items: center; }

/* SECCIONES */
.section-hero {
    padding: 90px 0;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.03), transparent 70%);
    text-align: center;
}

.section-content {
    padding: 60px 0;
}

/* TABLA RANKING - ESTILO ELEGANTE */
.rankings-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: transparent;
}

.rankings-table thead {
    background: rgba(255, 215, 0, 0.06);
}

.rankings-table thead td {
    padding: 14px 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-accent);
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
}

.rankings-table tbody tr {
    transition: background var(--transition-fast);
}

.rankings-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.rankings-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.05);
}

.rankings-table tbody td {
    padding: 14px 8px;
    font-size: 14px;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

/* COLUMNAS CON MEJOR CONTRASTE */
.rankings-table td:first-child {
    font-weight: 700;
    color: var(--color-accent);
}

/* BADGES O INSIGNIAS (si los usas) */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.12);
    color: var(--color-accent);
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow-glow-light);
}

/* FILAS DESTACADAS */
.rankings-table tbody tr.highlight {
    background: rgba(255, 215, 0, 0.08);
    border-left: 3px solid var(--color-accent);
}


.rankings-table tbody td img {
    width: 50%;
    height: auto;
    max-width: 60px; /* l¨ªmite para que no crezca en pantallas grandes */
    border-radius: 50%; /* si es avatar */
    display: block;
    margin: 0 auto;
}


/* BOTONES PREMIUM */
.btn-primary,
.admincp-button {
    background: linear-gradient(120deg, #3b8edf, #1e5eae);
    border: 1px solid #3b8edf;
    color: #fff;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 12px 30px rgba(58, 141, 222, 0.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-smooth);
}

.btn-primary:hover {
    background: linear-gradient(120deg, #4da3ff, #2b70c2);
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(77, 163, 255, 0.45);
}

/* USER CONTROL PANEL */
.user-cp-title h3 {
    padding: 18px 20px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffd86f;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 10px;
}

.user-cp-menu {
    margin-top: 10px;
}

.user-cp-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-cp-menu ul li {
    margin-bottom: 6px;
}

.user-cp-menu ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.25s ease;
}

.user-cp-menu ul li a:hover {
    background: linear-gradient(
        90deg,
        rgba(255,215,0,0.12),
        rgba(255,215,0,0.03)
    );
    color: #ffd86f;
    transform: translateX(6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.user-cp-menu ul li a.active {
    background: rgba(255,215,0,0.12);
    color: #ffd86f;
    border: 1px solid rgba(255,215,0,0.25);
}

/* LINKS */
a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: 0.22s ease;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.35);
}

a:hover {
    color: var(--color-accent-2);
    text-shadow:
        0 0 12px rgba(255, 215, 0, 0.8),
        0 0 24px rgba(255, 215, 0, 0.35);
}