:root{
  --bg:#0a0503;
  --panel:#140a06;
  --panel2:#25160d;
  --border:#a66b2f;
  --gold:#ffb84d;
  --text:#f5e9dc;
  --muted:#d8c2a0;
  --red:#c63b1e;
  --orange:#ff7a18;
  --shadow: rgba(0,0,0,.55);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 50% 0%, rgba(255,122,24,.18), transparent 60%),
    radial-gradient(900px 600px at 10% 10%, rgba(255,184,77,.10), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(166,107,47,.10), transparent 55%),
    linear-gradient(180deg, rgba(10,5,3,1), rgba(5,2,1,1));
}

body.has-bg-image{
  background:
    var(--site-bg-image) center / cover fixed no-repeat;
}
/* ===== BACKGROUND MEDIA ===== */

.has-bg-media{
  background: none !important;
}

/* VIDEO */
.bg-video{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* IMAGE */
.bg-image{
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

/* ===== LOGO ANIMADO (VIDEO) ===== */

.hero-logo-video{
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter:
    drop-shadow(0 0 25px rgba(255,184,77,.45))
    drop-shadow(0 0 60px rgba(255,122,24,.25));
}

@media (max-width: 768px){
  .hero-logo-video{
    max-width: 280px;
  }
}

a{color:inherit}
.page{
  max-width:1300px;
  margin:0 auto;
  padding:120px 24px 60px;
}

/* =========================
   NAVBAR PRO SIN LOGO
========================= */
.navbar{
/*  position:sticky; */
  position:fixed;
  inset:0 0 auto 0;
  top:0;
  z-index:100;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  height:64px;
  padding:0 24px;

  background:
    linear-gradient(180deg, rgba(10,5,3,.92), rgba(10,5,3,.78));
  border-bottom:1px solid rgba(201,164,92,.35);
  backdrop-filter: blur(6px);
}

/* =========================
   MENU CENTRAL
========================= */
.nav-center{
  display:flex;
  gap:26px;
}

/* LINKS */
.nav-link{
  position:relative;
  font-family:'Cinzel', serif;
  font-size:14px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#e6c27a;
  text-decoration:none;
  padding:6px 4px;
  transition:all .25s ease;
}

/* LINEA DORADA */
.nav-link::after{
  content:'';
  position:absolute;
  left:50%;
  bottom:-6px;
  width:0;
  height:2px;
  background:linear-gradient(90deg,#c9a45c,#ffe6a3,#c9a45c);
  transition:width .25s ease;
  transform:translateX(-50%);
}

/* HOVER */
.nav-link:hover{
  color:#ffe6a3;
  text-shadow:0 0 8px rgba(255,230,163,.45);
}

.nav-link:hover::after{
  width:100%;
}

/* =========================
   ESPACIADORES
========================= */
.nav-spacer{
  height:1px;
}

/* =========================
   MOBILE
========================= */
@media (max-width:900px){
  .navbar{
    height:auto;
    padding:12px;
  }

  .nav-center{
    flex-wrap:wrap;
    justify-content:center;
    gap:16px;
  }

  .nav-link{
    font-size:13px;
  }
}

.nav-left a{
  text-decoration:none;
  margin-right:22px;
  color:var(--muted);
  letter-spacing:.4px;
  font-weight:600;
  font-size:14px;
  text-transform:none; /* 👈 clave */
}

.nav-left a:hover{color:var(--gold)}
.nav-right{display:flex; align-items:center; gap:12px}

.lang-pill{
  border:1px solid rgba(166,107,47,.55);
  background:rgba(10,5,3,.35);
  color:var(--muted);
  padding:8px 10px;
  border-radius:10px;
  font-weight:800;
  font-size:12px;
}

/* BUTTONS */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:12px;
  padding:10px 14px;
  font-weight:800;
  font-size:14px;
  text-decoration:none;
  border:1px solid rgba(166,107,47,.55);
  background:rgba(10,5,3,.25);
  color:var(--text);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, filter .15s ease;
  cursor:pointer;
}
.btn:hover{transform:translateY(-1px); border-color:rgba(255,184,77,.70); filter:brightness(1.05)}
.btn:active{transform:translateY(0px)}
.btn-primary{
  border:none;
  background:linear-gradient(135deg,var(--orange),var(--red));
  box-shadow:0 0 20px rgba(255,122,24,.35);
}
.btn-primary:hover{box-shadow:0 0 30px rgba(255,122,24,.60)}

/* PANELS */
.panel{
  background:linear-gradient(180deg, rgba(37,22,13,.92), rgba(20,10,6,.92));
  border:1px solid rgba(166,107,47,.5);
  border-radius:18px;
  box-shadow: 0 20px 50px var(--shadow), inset 0 0 30px rgba(0,0,0,.55);
}
.panel-header{
  padding:18px 18px 0;
  font-family:Cinzel,serif;
  letter-spacing:.8px;
  text-transform:uppercase;
  color:var(--gold);
  font-weight:700;
}
.panel-body{padding:18px}

.hr{
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,184,77,.35), transparent);
  margin:14px 0;
}

/* FORMS */
.input, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(166,107,47,.45);
  background:rgba(10,5,3,.55);
  color:var(--text);
  outline:none;
}
.input:focus, textarea:focus{
  border-color:rgba(255,184,77,.75);
  box-shadow:0 0 0 3px rgba(255,184,77,.12)
}
.label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:10px 0 6px;
  font-weight:700;
  letter-spacing:.3px;
  text-transform:uppercase;
}

/* HERO */
.hero{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  min-height:140px;     /* antes 220px */
  padding-top:0px;     /* controla qué tan cerca del menú */
  margin-bottom:0;      /* elimina hacks */
}

.logo-wrap{text-align:center; max-width:760px}
.logo-text{
  font-family:Cinzel,serif;
  font-size:56px;
  letter-spacing:1.2px;
  color:var(--gold);
  text-shadow:0 0 28px rgba(255,184,77,.25), 0 0 60px rgba(255,122,24,.12);
}
.tagline{
  margin-top:6px;
  color:var(--muted);
  letter-spacing:.9px;
  text-transform:uppercase;
  font-weight:700;
  font-size:13px;
}

/* NEWS STRIP */
.news-strip{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin:18px 0 26px;
}
.news-card{
  overflow:hidden;
  border-radius:18px;
  border:1px solid rgba(166,107,47,.45);
  background:rgba(20,10,6,.85);
  box-shadow:0 18px 40px rgba(0,0,0,.5);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  text-decoration:none;
  display:block;
}
.news-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,184,77,.70);
  box-shadow:0 24px 55px rgba(0,0,0,.65);
}
.news-img{
  height:160px;
  background-size: cover;
  background-position: top center; /* clave */
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  padding:14px;
  font-family:Cinzel,serif;
  color:var(--text);
  font-size:18px;
  letter-spacing:.4px;
}
.news-body{padding:14px}
.news-meta{display:flex; gap:10px; align-items:center; color:var(--muted); font-size:12px}
.badge{
  display:inline-flex; align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,184,77,.10);
  border:1px solid rgba(255,184,77,.20);
  color:var(--gold);
  font-size:12px;
  font-weight:900;
  letter-spacing:.3px;
}
.news-title{
  margin:8px 0 6px;
  font-family:Cinzel,serif;
  color:var(--gold);
  font-size:18px
}
.news-excerpt{color:var(--text); opacity:.9; font-size:13px; line-height:1.45}

/* MAIN GRID */
.grid{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:18px;
}

/* DISCORD FLOAT - DEPRECATED (replaced by social-floats in header) */

/* STATS RAIL */
.stats-rail{
  position:fixed;
  right:18px;
  top:110px;
  width:190px;
  z-index:35;
}
.stats-box{
  border-radius:18px;
  background:linear-gradient(180deg, rgba(37,22,13,.92), rgba(20,10,6,.92));
  border:1px solid rgba(166,107,47,.55);
  box-shadow:0 20px 50px rgba(0,0,0,.55);
  padding:14px;
}
.stats-title{
  font-family:Cinzel,serif;
  color:var(--gold);
  letter-spacing:.8px;
  font-size:14px;
  margin-bottom:10px;
  text-transform:uppercase;
}
.stat{
  padding:10px 10px;
  border-radius:14px;
  background:rgba(10,5,3,.35);
  border:1px solid rgba(166,107,47,.35);
  margin-bottom:10px;
  text-align:center;
}
.stat-num{
  font-family:Cinzel,serif;
  font-size:28px;
  color:var(--gold);
}
.stat-label{
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.4px;
  text-transform:uppercase;
  font-weight:700;
}
.stat-foot{
  text-align:center;
  font-size:11px;
  color:rgba(216,194,160,.75);
}

/* CONTENT */
.article{line-height:1.65; color:rgba(245,233,220,.95)}
.article ul{padding-left:18px}
.article a{color:var(--gold)}

/* RESPONSIVE */
@media (max-width: 1100px){
  .stats-rail{display:none}
  .page{padding-right:24px}
}
@media (max-width: 980px){
  .news-strip{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  .navbar{padding:0 14px}
  .nav-left a{margin-right:12px}
  .logo-text{font-size:42px}
}
.event-card{
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(166,107,47,.45);
  background:rgba(10,5,3,.45);
  margin-bottom:12px;
}
.event-card.active{
  box-shadow:0 0 25px rgba(255,184,77,.22);
}
.event-card.upcoming{
  opacity:.9;
}
.event-title{
  font-family:Cinzel,serif;
  color:var(--gold);
  font-size:16px;
}
.event-timer{
  margin-top:6px;
  font-weight:800;
}
.event-meta{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}
.event-row{
  display:flex;
  gap:12px;
  align-items:center;
}

.event-icon{
  width:48px;
  height:48px;
  flex-shrink:0;
  filter: drop-shadow(0 0 6px rgba(255,184,77,.35));
}

.event-card.active .event-icon{
  animation: pulse 2s infinite;
}

@keyframes pulse{
  0%   { transform:scale(1); }
  50%  { transform:scale(1.08); }
  100% { transform:scale(1); }
}
.top-player-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(10,5,3,.35);
  border:1px solid rgba(166,107,47,.35);
  margin-bottom:8px;
}

.top-pos{
  width:26px;
  text-align:center;
  font-weight:900;
  color:var(--gold);
}

.top-name{
  flex:1;
  font-weight:700;
}

.top-lvl{
  font-size:13px;
  color:var(--muted);
}

/* LAYOUT PRINCIPAL */
.layout{
  display:grid;
  grid-template-columns: 280px 1fr 300px;
  gap:20px;
  align-items:start;
}
.left-column,
.center-column,
.right-column{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* COMMUNITY CONTROLADA */
.center-column .panel-body{
  max-height:720px;
  overflow-y:auto;
  word-break:break-word;
}

/* FLAGS */
.empire-flag{
  width:20px;
  height:14px;
  display:inline-block;
}
/* CONTENIDO IZQUIERDO */
.grid{
  grid-area: main;
  display:grid;
  grid-template-columns: 320px 5fr; /* COMMUNITY MUCHO MÁS ANCHA */
  gap:22px;
}

/* SIDEBAR DERECHA */
.sidebar{
  grid-area: sidebar;
  position:sticky;
  top:90px;
  align-self:start;
}
.panel-body.article{
  padding:26px;
  font-size:15px;
}

/* ===== TOP 3 INSIGNIAS ===== */

.top-player-row.top-1{
  background:linear-gradient(135deg, rgba(255,184,77,.35), rgba(166,107,47,.25));
  border-color:rgba(255,184,77,.85);
  box-shadow:0 0 22px rgba(255,184,77,.55);
}

.top-player-row.top-2{
  background:linear-gradient(135deg, rgba(220,220,220,.25), rgba(160,160,160,.18));
  border-color:rgba(220,220,220,.65);
  box-shadow:0 0 18px rgba(220,220,220,.35);
}

.top-player-row.top-3{
  background:linear-gradient(135deg, rgba(205,127,50,.35), rgba(140,85,30,.25));
  border-color:rgba(205,127,50,.75);
  box-shadow:0 0 18px rgba(205,127,50,.45);
}

.top-player-row.top-1 .top-pos{
  color:#ffcc66;
  font-size:18px;
  text-shadow:0 0 10px rgba(255,184,77,.8);
}

.top-player-row.top-2 .top-pos{
  color:#e0e0e0;
  font-size:17px;
}

.top-player-row.top-3 .top-pos{
  color:#d89b5a;
  font-size:17px;
}

/* ===== USER DASHBOARD CHARACTERS ===== */

.char-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}

.char-card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(20,10,6,.9), rgba(10,5,3,.9));
  border:1px solid rgba(166,107,47,.45);
  box-shadow:0 12px 30px rgba(0,0,0,.55);
}

.char-icon{
  width:48px;
  height:48px;
  border-radius:12px;
  background-size:cover;
  background-position:center;
  box-shadow:0 0 12px rgba(255,184,77,.35);
}

/* ICONOS POR CLASE + SEXO */
.char-icon.warrior_m{ background-image:url('/assets/icons/jobs/warrior_m.png'); }
.char-icon.warrior_f{ background-image:url('/assets/icons/jobs/warrior_f.png'); }

.char-icon.ninja_m{ background-image:url('/assets/icons/jobs/ninja_m.png'); }
.char-icon.ninja_f{ background-image:url('/assets/icons/jobs/ninja_f.png'); }

.char-icon.sura_m{ background-image:url('/assets/icons/jobs/sura_m.png'); }
.char-icon.sura_f{ background-image:url('/assets/icons/jobs/sura_f.png'); }

.char-icon.shaman_m{ background-image:url('/assets/icons/jobs/shaman_m.png'); }
.char-icon.shaman_f{ background-image:url('/assets/icons/jobs/shaman_f.png'); }

.char-icon.unknown{
  background:rgba(255,255,255,.1);
}

.char-info{ flex:1; }

.char-name{
  font-weight:900;
  letter-spacing:.4px;
}

.char-class{
  font-size:12px;
  color:var(--muted);
}

.char-level{
  font-family:Cinzel,serif;
  font-size:20px;
  color:var(--gold);
}

/* ===== NAVBAR CENTRADO ===== */

.navbar-centered{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
}

.nav-side{
  /* vacío a propósito para centrar el menú */
}

.nav-center{
  display:flex;
  gap:28px;
  justify-content:center;
  align-items:center;
}

.nav-center a{
  text-decoration:none;
  color:var(--muted);
  font-weight:700;
  font-size:13px;
  letter-spacing:.6px;
  text-transform:uppercase;
  position:relative;
}

.nav-center a:hover{
  color:var(--gold);
}

.nav-center a::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  width:0;
  height:2px;
  background:linear-gradient(90deg,var(--orange),var(--gold));
  transition:all .2s ease;
  transform:translateX(-50%);
}

.nav-center a:hover::after{
  width:100%;
}


/* ===== HERO LOGO IMAGE ===== */

.hero-logo-img{
  max-width:360px;
  width:100%;
  height:auto;
  display:block;
  margin:0 auto;
  filter: drop-shadow(0 0 28px rgba(255,184,77,.35));
}

@media (max-width: 768px){
  .hero-logo-img{
    max-width:260px;
  }
}

/* ===== HERO LOGO LIBRE (SIN PANEL) ===== */
/* 
.hero-logo{
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 80px 18px 60px;
  margin-bottom: 28px;
}
*/
.hero-logo .logo-wrap{
  transform: translateY(-40px);
}

.hero-logo-img{
  max-width:420px;
  width:100%;
  height:auto;
  margin:0 auto;
  display:block;
  filter:
    drop-shadow(0 0 25px rgba(255,184,77,.45))
    drop-shadow(0 0 60px rgba(255,122,24,.25));
}

.hero-logo .tagline{
  margin-top:12px;
  font-size:13px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:var(--muted);
}


.news-img{
  height:160px; /* antes 160 */
}

.news-card{
  min-height:320px;
}

.news-img{
  position:relative;
  height:180px;
  overflow:hidden;
  border-bottom:1px solid rgba(166,107,47,.35);
}

.news-img video,
.news-img .news-bg{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius: 10px;
}

.news-bg{
  background-size:cover;
  background-position:center;
}

.news-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-end;
  padding:14px;
  background:linear-gradient(
    to top,
    rgba(5,2,1,.75),
    transparent 55%
  );
}

.news-overlay-title{
  font-family:Cinzel,serif;
  font-size:18px;
  color:var(--gold);
  letter-spacing:.4px;
}

/* =========================================================
   BACKGROUND MEDIA (VIDEO / IMAGEN)
========================================================= */

.has-bg-media{
  background: none !important;
}

/* VIDEO DE FONDO */
.bg-video{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* IMAGEN DE FONDO */
.bg-image{
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

/* CONTENIDO ENCIMA */
.page{
  position: relative;
  z-index: 1;
}

/* =========================================================
   MODAL PREVIEW (ADMIN)
========================================================= */

.bg-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.bg-modal.open{
  display: flex;
}

/* CONTENEDOR MODAL */
.bg-modal-content{
  width: 90%;
  max-width: 960px;
  background: rgba(20,10,6,.95);
  border-radius: 18px;
  border: 1px solid rgba(166,107,47,.55);
  box-shadow: 0 30px 80px rgba(0,0,0,.75);
  overflow: hidden;
}

/* HEADER */
.bg-modal-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-family: Cinzel, serif;
  color: var(--gold);
  border-bottom: 1px solid rgba(166,107,47,.35);
}

.bg-modal-close{
  background: none;
  border: none;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
}

/* BODY */
.bg-modal-body{
  background: #000;
}

/* VIDEO PREVIEW */
.bg-modal-body video{
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* IMAGEN PREVIEW */
.bg-preview-image{
  width: 100%;
  height: 420px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* FOOTER */
.bg-modal-footer{
  padding: 10px 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

/* =========================================================
   MEJORAS UX
========================================================= */

.bg-modal video{
  outline: none;
}

.bg-modal video::-webkit-media-controls{
  display: none !important;
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.community-item {
  background: var(--panel2);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}

.community-title {
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 6px;
}

.community-content {
  color: var(--text);
  font-size: 14px;
}

.community-content video {
  max-width: 85%;        /* reduce tamaño */
  max-height: 180px;     /* limita altura */
  display: block;
  margin: 10px auto;
  border-radius: 8px;
  object-fit: cover;
}

/* ===== MODAL BASE ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;
}

/* ACTIVO */
.video-modal.active {
  display: flex;
}

/* FONDO OSCURO */
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

/* CONTENIDO (CENTRADO REAL) */
.video-modal-content {
  position: relative;
  z-index: 2;

  max-width: 90vw;
  max-height: 90vh;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* VIDEO */
#video-modal-player {
  max-width: 100%;
  max-height: 80vh;

  border-radius: 12px;
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

/* BOTÓN CERRAR */
.video-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;

  width: 34px;
  height: 34px;

  border-radius: 50%;
  border: none;

  background: #111;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;

  box-shadow: 0 4px 14px rgba(0,0,0,.6);
}

.video-modal-close:hover {
  background: #c63b1e;
}
/* ===============================
   ANIMACIONES MODAL VIDEO
================================ */

/* Estado inicial */
.video-modal {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Activo */
.video-modal.active {
  opacity: 1;
}

/* Fondo fade */
.video-modal-backdrop {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.video-modal.active .video-modal-backdrop {
  opacity: 1;
}

/* Contenido zoom */
.video-modal-content {
  transform: scale(0.88);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(.22,1,.36,1),
    opacity 0.25s ease;
}

/* Al abrir */
.video-modal.active .video-modal-content {
  transform: scale(1);
  opacity: 1;
}

/* ===== PREVIEW MEDIA (VIDEO / IMAGE) ===== */
.community-media-preview {
  position: relative;
  max-width: 420px;
  margin: 14px auto 10px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;

  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}

.community-media-preview img,
.community-media-preview video {
  width: 100%;
  height: auto;
  display: block;
}

/* Overlay */
.media-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    to top,
    rgba(10,5,3,.75),
    rgba(10,5,3,.25)
  );

  color: #ffb84d;
  font-weight: 800;
  letter-spacing: .5px;
  font-size: 15px;

  opacity: 0;
  transition: opacity .25s ease;
}

.community-media-preview:hover .media-overlay {
  opacity: 1;
}


.forgot-link {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  opacity: .85;
}

.forgot-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* =========================
   SELECTOR IDIOMA – CLICK + ANIMACIÓN
========================= */
.lang-box {
  position: fixed;
  left: 20px;
  top: 90px;
  z-index: 998;

  display: flex;
  align-items: center;

  background: linear-gradient(
    180deg,
    rgba(30,20,10,.95),
    rgba(15,10,5,.95)
  );
  border: 1px solid rgba(255,184,77,.55);
  border-radius: 12px;
  padding: 8px 10px;

  box-shadow:
    0 10px 25px rgba(0,0,0,.6),
    inset 0 0 18px rgba(255,184,77,.08);
}

/* botón principal */
.lang-main {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.lang-main img {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,.6);
}

/* opciones ocultas */
.lang-options {
  display: flex;
  gap: 10px;
  margin-left: 0;

  max-width: 0;
  opacity: 0;
  overflow: hidden;

  transform: translateX(-6px);
  transition:
    max-width .35s ease,
    opacity .25s ease,
    transform .35s ease,
    margin-left .35s ease;
}

/* estado abierto */
.lang-box.open .lang-options {
  max-width: 1000px;        /* suficiente para varias banderas */
  opacity: 1;
  margin-left: 12px;
  transform: translateX(0);
}

/* banderas secundarias */
.lang-options img {
  width: 28px;
  height: 18px;
  border-radius: 4px;
  opacity: .7;
  transition: all .2s ease;
}

.lang-options a:hover img {
  opacity: 1;
  transform: scale(1.12);
  filter: saturate(1.2);
}

/* =====================================================
   MMORPG RANKING – ESTILO OFICIAL
===================================================== */

.ranking-panel{
  background:
    linear-gradient(180deg,#140a06,#0a0503);
  border:1px solid rgba(255,184,77,.35);
  border-radius:14px;
  padding:14px;
  box-shadow:
    inset 0 0 25px rgba(0,0,0,.65),
    0 12px 35px rgba(0,0,0,.75);
}

/* =========================
   TABS
========================= */
.ranking-tabs{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-bottom:14px;
}

.rank-btn{
  padding:8px 18px;
  border-radius:8px;
  border:1px solid rgba(255,184,77,.45);
  background:#120805;
  color:#ffddb0;
  font-weight:700;
  text-decoration:none;
}

.rank-btn.active{
  background:linear-gradient(180deg,#3a2412,#1a0f08);
  color:#ffd27a;
  border-color:#ffd27a;
}

/* =========================
   SEARCH
========================= */
.rank-search{
  display:flex;
  justify-content:center;
  margin-bottom:12px;
}

.rank-search input{
  width:100%;
  max-width:360px;
  padding:9px 14px;
  border-radius:8px;
  background:#0a0503;
  border:1px solid rgba(255,184,77,.45);
  color:#f5e9dc;
}

/* =========================
   TABLE
========================= */
.rank-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.rank-table thead th{
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.04em;
  color:#ffddb0;
  padding:10px 8px;
  border-bottom:1px solid rgba(255,184,77,.4);
}

.rank-table tbody tr{
  transition:.15s;
}

.rank-table tbody tr:hover{
  background:rgba(255,184,77,.08);
}

.rank-table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(255,184,77,.15);
  color:#f5e9dc;
}

/* =========================
   COLUMNAS
========================= */
.rank-pos{
  width:40px;
  text-align:center;
  font-weight:800;
  color:#ffb84d;
}

.rank-name{
  font-family:Cinzel,serif;
  font-weight:700;
  color:#ffddb0;
}

.rank-level{
  text-align:center;
  color:#d8c2a0;
}

.rank-empire{
  text-align:center;
  font-weight:700;
}

/* =========================
   TOP 1–3
========================= */
.rank-table tbody tr:nth-child(1){
  background:rgba(255,215,0,.15);
}
.rank-table tbody tr:nth-child(1) .rank-name{
  color:#ffd700;
}

.rank-table tbody tr:nth-child(2){
  background:rgba(220,220,220,.12);
}

.rank-table tbody tr:nth-child(3){
  background:rgba(205,127,50,.12);
}

/* =========================
   PAGINATION
========================= */
.pagination{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-top:12px;
}

.page-btn{
  min-width:32px;
  padding:6px 10px;
  border-radius:6px;
  background:#120805;
  border:1px solid rgba(255,184,77,.45);
  color:#ffddb0;
  cursor:pointer;
}

.page-btn.active{
  background:#ffb84d;
  color:#000;
  font-weight:800;
}

/* =========================
   RANKING – FLAGS
========================= */
.rank-empire{
  text-align:center;
}

.empire-flag-lg{
  width:26px;
  height:auto;
  filter:
    drop-shadow(0 0 4px rgba(0,0,0,.9))
    drop-shadow(0 0 6px rgba(255,184,77,.4));
}

.rank-table td {
  vertical-align: middle;
}

.rank-name {
  font-weight: 700;
  color: #f5e9dc;
}

.empire-flag-lg {
  width: 28px;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(0,0,0,.7));
}
.rank-name,
.top-name {
  font-family: "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 600;
}

/* ===============================
   REQUISITOS
================================ */
.req-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(220px,1fr));
  gap:16px;
}

.req-card{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2));
  border:1px solid rgba(255,184,77,.35);
  border-radius:16px;
  padding:16px;
}

.req-title{
  color:var(--gold);
  font-weight:600;
  margin-bottom:6px;
  display:flex;
  gap:6px;
  align-items:center;
}

.req-text{
  font-size:14px;
  line-height:1.4;
  color:rgba(216,194,160,.95);
}

.req-note{
  margin-top:8px;
  font-size:13px;
  color:#ff7a18;
}

/* ===============================
   DESCARGAS
================================ */
.download-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

/* RESPONSIVE */
@media (max-width:1100px){
  .req-grid{grid-template-columns:repeat(2,1fr);}
}

@media (max-width:700px){
  .req-grid,
  .download-grid{
    grid-template-columns:1fr;
  }
}

/* ===============================
   CONTENEDOR DESCARGAS
================================ */
.download-wrap{
  max-width: 820px;      /* 👈 ancho ideal como en tu imagen */
  margin: 0 auto;
  padding: 0 20px;
}

.req-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr); /* 2 arriba, 2 abajo */
  gap:16px;
}
/* =========================
   BOTÓN REGISTER (DESKTOP)
========================= */
.btn-pill-register{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin: 18px auto 0 13px;
  padding: 10px 22px;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  text-decoration: none;

  color: #ffffff;
  background: linear-gradient(135deg, #ff8a1f, #ff6a00);

  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(255,138,31,.35),
    0 6px 16px rgba(255,106,0,.45);

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    filter .25s ease;
}

/* Hover solo desktop */
@media (hover: hover){
  .btn-pill-register:hover{
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
      0 0 0 1px rgba(255,138,31,.6),
      0 10px 22px rgba(255,106,0,.6);
  }
}

.btn-pill-register:active{
  transform: translateY(0);
  filter: brightness(.98);
  box-shadow:
    0 0 0 1px rgba(255,138,31,.7),
    0 5px 12px rgba(255,106,0,.4);
}

/* =========================
   FOOTER PROFESIONAL
========================= */
.site-footer{
  margin-top: 40px;
  padding: 22px 18px 18px;
  border-top: 1px solid rgba(166,107,47,.35);
  background: linear-gradient(
    to top,
    rgba(10,5,3,.98),
    rgba(10,5,3,.78)
  );
}

.footer-inner{
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;

  font-size: 13px;
  color: rgba(216,194,160,.82);
}

.footer-left{ text-align: left; }
.footer-center{
  text-align: center;
  font-size: 12px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(216,194,160,.65);
}
.footer-right{ text-align: right; }

.footer-inner strong{
  color: var(--gold);
  font-weight: 700;
}

.footer-link-brand{
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  transition: color .2s ease, text-shadow .2s ease;
}

.footer-link-brand:hover{
  color: #ffd27d;
  text-shadow: 0 0 8px rgba(255,184,77,.45);
}

/* =========================
   TOPLISTS
========================= */
.toplist-container{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.toplist-container a{
  display: inline-flex;
}

.toplist-container img{
  width: 95px;
  height: auto;
  max-width: 100%;
  opacity: .85;
  filter: drop-shadow(0 0 6px rgba(255,184,77,.25));
  transition: transform .2s ease, opacity .2s ease;
}

@media (hover: hover){
  .toplist-container img:hover{
    transform: scale(1.08);
    opacity: 1;
  }
}

/* =========================
   MOBILE (≤ 768px)
========================= */
@media (max-width: 768px){

  .btn-pill-register{
    margin: 16px auto 0 auto;
    padding: 14px 26px;
    font-size: 15px;
    width: 100%;
    max-width: 260px;
  }

  .footer-inner{
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
  }

  .footer-left,
  .footer-right{
    text-align: center;
  }

  .footer-center{
    order: -1;
    margin-bottom: 8px;
  }

  .toplist-container img{
    width: 80px;
  }
}
/* =====================================================
   RESPONSIVE MOBILE FINAL (STATS PRIMERO)
   👉 ÚNICO BLOQUE MOBILE
===================================================== */

@media (max-width: 768px){

  /* =========================
     PAGE
  ========================= */
  .page{
    padding: 96px 14px 50px;
  }

  /* =========================
     NAVBAR
  ========================= */
  .navbar{
    grid-template-columns: 1fr;
    height: auto;
    padding: 10px 12px;
    gap: 8px;
  }

  .nav-center{
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .nav-link{
    font-size: 12px;
    letter-spacing: .08em;
  }

  /* =========================
     HERO
  ========================= */
  .hero{
    min-height: auto;
    padding-top: 10px;
  }

  .logo-text{
    font-size: 34px;
  }

  .tagline{
    font-size: 12px;
  }

  /* =========================
     LAYOUT EN COLUMNA
  ========================= */
  .layout,
  .grid{
    display: flex !important;
    flex-direction: column;
    gap: 16px;
  }

  /* =========================
     STATS (PRIMEROS)
  ========================= */
  .stats-rail{
    display: block !important;
    position: static !important;
    width: 100%;
    margin: 12px auto 18px;
    order: -1; /* 🔥 STATS PRIMERO */
  }

  .stats-box{
    max-width: 420px;
    margin: 0 auto;
  }

  .stat{
    padding: 12px;
  }

  .stat-num{
    font-size: 26px;
  }

  /* =========================
     COLUMNAS
  ========================= */
  .left-column,
  .center-column,
  .right-column{
    display: flex !important;
    flex-direction: column;
  }

  .center-column{ order: 1; }
  .left-column{ order: 2; }
  .right-column{ order: 3; }

  /* =========================
     NEWS
  ========================= */
  .news-strip{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .news-card{
    min-height: auto;
  }

  .news-img{
    height: 160px;
  }

  .news-title{
    font-size: 16px;
  }

  /* =========================
     SIDEBAR
  ========================= */
  .sidebar{
    position: static;
    top: auto;
  }

  /* =========================
     TOP JUGADORES
  ========================= */
  .top-player-row{
    padding: 10px;
    font-size: 14px;
  }

  .top-pos{
    width: 22px;
    font-size: 14px;
  }

  /* =========================
     RANKING
  ========================= */
  .rank-table{
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 13px;
  }

  .rank-level,
  .rank-empire{
    display: none; /* simplifica en móvil */
  }

  /* =========================
     CHARACTERS
  ========================= */
  .char-grid{
    grid-template-columns: 1fr;
  }

  .char-card{
    padding: 12px;
  }

  /* =========================
     REQUIREMENTS / DOWNLOADS
  ========================= */
  .req-grid,
  .download-grid{
    grid-template-columns: 1fr;
  }

  /* =========================
     LANG SELECTOR
  ========================= */
  .lang-box{
    left: 10px;
    bottom: 14px;
    top: auto;
    padding: 6px 8px;
  }

  .lang-main img{
    width: 26px;
    height: 18px;
  }

  /* =========================
     MODALS
  ========================= */
  .bg-modal-content{
    width: 95%;
    max-width: none;
  }

  .bg-preview-image{
    height: 260px;
  }

  .video-modal-content{
    max-width: 95vw;
    max-height: 90vh;
  }
}


/* Server status and social floats styles are inline in header.php */


/* Social floats styles are inline in header.php */
