/* ==================================================
   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: 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);
}
*/
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('https://www.comunidadgamer.eu/site/img/fondo.png') center -39px / cover no-repeat;
    z-index: -1;
}

body::after {
    content: "";
    position: absolute; /* Cambiado de fixed a absolute */
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;            
    height: 240px;         
    background: url('https://www.comunidadgamer.eu/site/img/logocg.png') center / contain no-repeat;
    z-index: 20;          
    pointer-events: none; /* Permite hacer clic a través de la imagen si esta se superpone con algún botón */
}

/* 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: 45px 0;
    text-align: center;
}

:root {
    --color-bg: #040404;
    --color-bg-alt: #0e0e0e;
    --color-surface: rgba(20, 20, 20, 0.8);
    --color-card: rgba(20, 20, 20, 0.8);

    --color-text: #ffffff; /* Texto principal en blanco para mejor contraste */
    --color-muted: #bcbcbc; /* Tono más brillante para los textos secundarios */

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

    --color-border: rgba(255, 215, 120, 0.4);

    --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: 16px;
    --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, rgba(3, 3, 3, 0.6), rgba(10, 10, 10, 0.6)); /* Degradado con transparencia */
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    width: min(900px, 100%);
    margin-top: -7px;
}

/* 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;
}

/* CONTENEDORES PRINCIPAL, SIDEBAR, CARDS Y PANELES */
.content-main,
.content-sidebar,
.card,
.panel {
    position: relative;
    background-color: rgba(30, 30, 30, 0.6) !important; /* Fondo más translúcido */
    background-image: none !important;
    
    backdrop-filter: blur(-0px) !important; /* Efecto de cristal */
    -webkit-backdrop-filter: blur(-0px) !important;
    
    border: 1px solid rgba(255, 215, 120, 0.5) !important;
    border-radius: 16px !important;
    
    padding: 22px !important;
    margin-bottom: 26px !important;
    
    box-shadow:
        inset 0 0 20px rgba(255, 215, 120, 0.05),
        0 0 15px rgba(0, 0, 0, 0.3) !important; /* Sombras más suaves */
    
    height: auto;
}

/* ELIMINA LA CAJA INTERIOR SI EXISTE UNA CAJA CONTENEDORA */
.content-main .content-main,
.content-main .content-sidebar,
.content-main .card,
.content-main .panel,
.content-sidebar .content-main,
.content-sidebar .content-sidebar,
.content-sidebar .card,
.content-sidebar .panel,
.card .content-main,
.card .content-sidebar,
.card .card,
.card .panel,
.panel .content-main,
.panel .content-sidebar,
.panel .card,
.panel .panel {
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* CLASE INDIVIDUALIZADA */
.mu-box {
    position: relative;
    background-color: rgba(30, 30, 30, 0.6) !important;
    background-image: none !important;
    
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    
    border: 1px solid rgba(255, 215, 120, 0.5) !important;
    border-radius: 16px !important;
    
    padding: 22px !important;
    margin-bottom: 26px !important;
    
    box-shadow:
        inset 0 0 20px rgba(255, 215, 120, 0.05),
        0 0 15px rgba(0, 0, 0, 0.3) !important;
}

/* MODALES / OVERLAYS */
#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;
    }
}

.page-title {
    /* Tipografía medieval y espaciado de inscripción */
    font-family: 'MedievalSharp', 'Uncial Antiqua', 'Cinzel', serif;
    font-size: clamp(23px, 4vw, 38px);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    
    /* Colores y brillos reales */
    color: #e6c66b; /* Tono dorado más cálido y envejecido */
    text-shadow:
        2px 3px 6px rgba(0, 0, 0, 0.9), /* Sombra oscura para dar relieve */
        0 0 35px rgba(230, 198, 107, 0.6), /* Brillo dorado */
        0 0 60px rgba(184, 134, 11, 0.3); /* Resplandor exterior */
    
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 7px;
}

/* Detalle decorativo a modo de estandarte o borde de pergamino */
.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #e6c66b, transparent);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(230, 198, 107, 0.6);
}

/* 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);
}

.rankings-table td:first-child {
    font-weight: 700;
    color: var(--color-accent);
}

/* INSIGNIAS */
.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);
}

.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;
    border-radius: 50%;
    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);5    text-shadow:
        0 0 12px rgba(255, 215, 0, 0.8),
        0 0 24px rgba(255, 215, 0, 0.35);
}
/* HEADER SUPERIOR */
.site-header {
    text-align: center;
    padding: 292px 20px 40px 20px;
  background: linear-gradient(rgba(5,7,12,0.95), rgba(5,7,12,0.8));
  border-bottom: 1px solid rgba(214,180,106,0.35);
  box-shadow: 0 6px 25px rgba(0,0,0,0.8);
    width: 100%;
    z-index: 10;
    margin-bottom: 40px;
}
/* Barra de navegación superior horizontal */
.custom-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
  background: linear-gradient(rgba(5,7,12,0.75), rgba(5,7,12,0.0));
  border-bottom: 1px solid rgba(214,180,106,0.35);
  box-shadow: 0 6px 25px rgba(0,0,0,0.8);
    z-index: 10000;
}

.top-menu {
  top: 0;
  z-index: 9998;

}
.nav-btn-entrar {
    border: 1px solid #d93838;
    color: #d93838;
    padding: 8px 18px;
    font-family: 'Cinzel', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: all var(--transition-fast);
    
}

.nav-btn-entrar:hover {
    background: rgba(217, 56, 56, 0.1);
    box-shadow: 0 0 12px rgba(217, 56, 56, 0.3);
    color: #e65252;
}

.custom-navbar .nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin-right: auto; /* Empuja los enlaces hacia la izquierda */
    margin-left: 22.5%;  /* Ajusta este valor si necesitas un espacio adicional desde el borde izquierdo */
    padding: 0;
}

.custom-navbar .nav-links li {
    list-style: none;
}

.custom-navbar .nav-links a {
    color: var(--color-text);
    font-family: 'Cinzel', 'Segoe UI', sans-serif;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: none;
    transition: color var(--transition-fast);
}

.custom-navbar .nav-links a:hover {
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.site-header .section-subtitle {
    color: var(--color-muted);
    font-size: 15px;
    margin: 12px auto 0 auto;
    max-width: 650px;
    line-height: 1.5;
}

.site-header .header-actions {
    margin-top: 28px;
}
/* FOOTER */
.site-footer {
    text-align: center;
    padding: 187px 20px 30px 20px;
  background: linear-gradient(rgba(5,7,12,0.95), rgba(5,7,12,0.8));
  border-bottom: 1px solid rgba(214,180,106,0.35);
  box-shadow: 0 6px 25px rgba(0,0,0,0.8);
    border-top: 2px solid rgba(255, 215, 120, 0.2);
    margin-top: auto;
    width: 100%;
    z-index: 10;
}

.site-footer .section-subtitle {
    color: var(--color-muted);
    font-size: 15px;
    margin: 0 auto 28px auto;
    max-width: 650px;
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    margin-top: 30px;
    color: var(--color-muted);
    font-size: 13px;
    letter-spacing: 0.5px;
}