/* ===============================
   1. VARIABLES + BASE
   =============================== */
:root{
  --bg:#070a0d;
  --panel:#0c1218;
  --text:#e9f2ff;
  --muted:#9bb0c9;
  --neon:#2cff7a;
  --border: rgba(44,255,122,.18);
 
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: url("assets/bg/fondo.jpg") center/cover fixed no-repeat;
}

/* Overlay oscuro */
body::before{
  content:"";
  position:fixed;
  inset:0;
  background: radial-gradient(circle at 50% 20%, rgba(44,255,122,.18), rgba(0,0,0,.85) 60%, rgba(0,0,0,.92));
  z-index:-1;
}

/* ===============================
   2. HEADER
   =============================== */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 22px;
  border-bottom:1px solid var(--border);
  background: rgba(7,10,13,.65);
  backdrop-filter: blur(10px);
  position:sticky;
  top:0;
  z-index:10;
}

.brand{display:flex; gap:12px; align-items:center}
.brand h1{margin:0; font-size:18px}
.brand p{margin:0; font-size:12px; color:var(--muted)}

.logo-img{width:36px;height:36px;object-fit:contain;border-radius:10px}

.header-actions{display:flex;gap:12px}
.header-actions a{
  padding:10px 16px;
  border-radius:14px;
  font-weight:600;
  font-size:14px;
}

.btn-login{background:linear-gradient(135deg,#6d28d9,#8b5cf6)}
.btn-add{background:linear-gradient(135deg,#5b21b6,#7c3aed)}

/* ===============================
   3. LAYOUT
   =============================== */
.container{
  max-width:1100px;
  margin:0 auto;
  padding:20px;
}

.meta{
  text-align:center;
  margin:30px 0;
}
.meta .hint{
  font-size:1.3rem;
  font-weight:700;
  color:#dbe612;
}

/* ===============================
   4. GRID SERVERS
   =============================== */
.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

/* ===============================
   5. SERVER CARD (ÚNICO SISTEMA)
   =============================== */
.s-card{
  display:grid;
  grid-template-columns:180px 1fr 220px;
  gap:14px;
  background: rgba(12,18,24,.68);
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  box-shadow:0 14px 40px rgba(0,0,0,.35);
  padding:14px;
  position:relative;
}

.s-card.is-featured{
  background: rgba(25,18,8,.70);
  border-color: rgba(255,195,70,.45);
}

/* LEFT - Logo con degradado */
.s-left{
  display:flex;
  flex-direction:column;
  gap:10px;
  position:relative;
}
.s-logo{
  width:100%;
  height:140px;
  object-fit:cover;
  border-radius:14px;
}
.s-left::after{
  content:"";
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:60%;
  background:linear-gradient(to top, rgba(12,18,24,.95), transparent);
  border-radius:0 0 14px 14px;
  pointer-events:none;
}

/* MAIN */
.s-main{display:flex;flex-direction:column;gap:8px}
.s-title{font-size:22px;font-weight:900}
.s-desc{opacity:.85}

.s-tags{display:flex;gap:8px;flex-wrap:wrap}
.s-tag{
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
}
.s-tag.pvm{background:rgba(146,72,255,.22)}
.s-tag.pvp{background:rgba(60,130,255,.22)}
.s-tag.semi{background:rgba(70,255,150,.18)}
.s-tag.fun{background:rgba(50,220,210,.18)}

/* SIDE - Métricas y botón votar */
.s-side{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.s-metrics{
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:16px;
}
.s-metric{
  display:flex;
  justify-content:space-between;
  font-weight:800;
  font-size:15px;
  padding:6px 0;
}
.s-metric:not(:last-child){
  border-bottom:1px solid rgba(255,255,255,.08);
}
.s-mlab{color:var(--muted);}
.s-mval{color:#2cff7a;}

.s-vote{
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  font-weight:900;
  font-size:16px;
  background:linear-gradient(135deg,#7b2cff,#a855f7);
  color:#fff;
  text-decoration:none;
  box-shadow:0 0 18px rgba(168,85,247,.45);
  transition:transform .15s ease, box-shadow .15s ease;
}
.s-vote:hover{
  transform:translateY(-2px);
  box-shadow:0 0 26px rgba(168,85,247,.65);
}



/* ===============================
   7. RESPONSIVE
   =============================== */
@media(max-width:900px){
  .s-card{grid-template-columns:1fr}
}
/* =========================================
   HEADER – Botones existentes estilo CTA
   (sin cambiar HTML ni enlaces)
   ========================================= */

.topbar .header-actions .btn,
.topbar .header-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:12px 22px;
  border-radius:999px;
  font-weight:800;
  font-size:14px;
  letter-spacing:.2px;

  color:#fff !important;
  text-decoration:none !important;

  background: linear-gradient(135deg, #7b2cff, #a855f7);
  border: none !important;

  box-shadow: 0 0 18px rgba(168,85,247,.45);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.topbar .header-actions .btn:hover,
.topbar .header-actions a:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(168,85,247,.65);
  opacity:.95;
}

/* Botón principal (Añadir) más grande */
.topbar .header-actions .btn-add,
.topbar .header-actions a.btn-add{
  padding:14px 26px;
  font-size:15px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.15),
    0 0 30px rgba(168,85,247,.75);
}

/* Si el usuario (prueba1) no quieres que parezca CTA tan grande */
.topbar .header-actions .user-btn,
.topbar .header-actions a.user-btn{
  background: rgba(255,255,255,.10) !important;
  box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px){
  .topbar .header-actions .btn,
  .topbar .header-actions a{
    padding:10px 18px;
    font-size:13px;
  }
}
/* ===============================
   CONTADOR DE SERVIDORES (HEADER)
   =============================== */
.server-count-top{
  display:flex;
  align-items:center;
}

.server-count-top #count{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:10px 16px;
  border-radius:14px;
  font-weight:700;
  font-size:14px;
  white-space:nowrap;

  color:#2dff8f;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(44,255,122,.35);


}
/* ===============================
   FRANJA DE BOTONES: Sitio / WA / Discord
   =============================== */

.s-actions{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
  margin-top:10px;
}

.s-action{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  height:44px;
  padding:0 14px;
  border-radius:14px;

  font-weight:900;
  text-decoration:none;

  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  color:#fff;

  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.s-action:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  opacity:.95;
}

/* Colores por tipo */
.s-action-site{
  border-color: rgba(255,255,255,.16);
}

.s-action-wa{
  border-color: rgba(44,255,122,.35);
  box-shadow: 0 0 0 1px rgba(44,255,122,.10);
}

.s-action-dc{
  border-color: rgba(168,85,247,.45);
  box-shadow: 0 0 0 1px rgba(168,85,247,.10);
}

/* Si no existe website */
.s-action.disabled{
  pointer-events:none;
  opacity:.45;
  filter: grayscale(1);
}

/* ✅ Si NO hay WhatsApp ni Discord: "Visitar sitio" se hace grande */
.s-actions.only-site{
  grid-template-columns: 1fr;
}
.s-actions.only-site .s-action-site{
  height:48px;
  font-size:15px;
}

/* Responsive */
@media (max-width: 900px){
  .s-actions{
    grid-template-columns: 1fr;
  }
}
/* ===============================
   VIP / DESTACADO (DORADO)
   =============================== */
.s-card.is-featured{
  background: rgba(25,18,8,.72);
  border: 1px solid rgba(255,195,70,.55);
  box-shadow:
    0 0 0 1px rgba(255,195,70,.20),
    0 18px 65px rgba(255,180,40,.18);
  position: relative;
  overflow: hidden;
}

/* brillo suave tipo VIP */
.s-card.is-featured::before{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(circle at 30% 20%, rgba(255,210,120,.20), transparent 55%);
  pointer-events:none;
}
/* ===============================
   CAJA OSCURA PARA LISTA
   =============================== */
.servers-wrap{
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}

/* ===============================
   PAGINACIÓN
   =============================== */
.pager{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pager .pbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.pager .pbtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  opacity:.95;
}

.pager .pbtn.active{
  background: linear-gradient(135deg, #7b2cff, #a855f7);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 0 20px rgba(168,85,247,.45);
}

.pager .pbtn:disabled{
  opacity:.4;
  cursor: default;
  transform:none;
  box-shadow:none;
}




/* ===============================
   BADGE DESTACADO (debajo del logo)
   Animación: pulso luminoso suave
   =============================== */

.s-featured-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  
  padding: 6px 14px;
  border-radius: 999px;
  
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  
  color: #1a0f00;
  background: linear-gradient(135deg, #ffd700, #ffb800, #ffa500);
  border: 1px solid rgba(255, 215, 0, 0.6);
  
  box-shadow:
    0 0 12px rgba(255, 195, 70, 0.6),
    0 0 24px rgba(255, 180, 40, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  
  /* Animación de pulso luminoso */
  animation: featuredPulse 2.5s ease-in-out infinite;
}

/* Keyframes: pulso suave sin ser molesto */
@keyframes featuredPulse {
  0%, 100% {
    box-shadow:
      0 0 12px rgba(255, 195, 70, 0.6),
      0 0 24px rgba(255, 180, 40, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateX(-50%) scale(1);
  }
  50% {
    box-shadow:
      0 0 18px rgba(255, 195, 70, 0.85),
      0 0 36px rgba(255, 180, 40, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) scale(1.03);
  }
}

/* Responsive: en móvil más pequeño */
@media (max-width: 600px) {
  .s-featured-badge {
    font-size: 10px;
    padding: 5px 10px;
  }
}


/* ===============================
   TOP 3 RANKING - ESTILOS
   =============================== */

.top3-section {
  margin: 30px auto 40px;
  padding: 0 20px;
  max-width: 1200px;
}

.top3-header {
  text-align: center;
  margin-bottom: 30px;
}

.top3-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0 0 10px 0;
  text-shadow: 0 0 20px rgba(138, 43, 226, 0.8), 0 0 40px rgba(138, 43, 226, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.crown-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  animation: crownFloat 2s ease-in-out infinite;
}

@keyframes crownFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.top3-subtitle {
  color: #9bb0c9;
  font-size: 1rem;
  margin: 0;
  letter-spacing: 1px;
}

.top3-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

/* ===== TARJETA TOP 3 ===== */
.top3-card {
  background: linear-gradient(145deg, #1a1f2e 0%, #0d1117 100%);
  border-radius: 20px;
  padding: 25px 20px;
  width: 280px;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.top3-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
}

.top3-card:hover {
  transform: translateY(-10px) scale(1.02);
}

/* ===== VARIANTES POR POSICIÓN ===== */

/* #1 - ORO */
.top3-gold {
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 
    0 10px 40px rgba(255, 215, 0, 0.3),
    0 0 60px rgba(255, 215, 0, 0.1),
    inset 0 0 30px rgba(255, 215, 0, 0.05);
}

.top3-gold::before {
  background: linear-gradient(90deg, #ffd700, #ffec8b, #ffd700);
}

.top3-gold:hover {
  box-shadow: 
    0 15px 50px rgba(255, 215, 0, 0.5),
    0 0 80px rgba(255, 215, 0, 0.2);
}

/* #2 - PLATA */
.top3-silver {
  border: 2px solid rgba(192, 192, 192, 0.5);
  box-shadow: 
    0 10px 40px rgba(192, 192, 192, 0.2),
    0 0 60px rgba(192, 192, 192, 0.1),
    inset 0 0 30px rgba(192, 192, 192, 0.05);
}

.top3-silver::before {
  background: linear-gradient(90deg, #c0c0c0, #e8e8e8, #c0c0c0);
}

.top3-silver:hover {
  box-shadow: 
    0 15px 50px rgba(192, 192, 192, 0.4),
    0 0 80px rgba(192, 192, 192, 0.2);
}

/* #3 - BRONCE */
.top3-bronze {
  border: 2px solid rgba(205, 127, 50, 0.5);
  box-shadow: 
    0 10px 40px rgba(205, 127, 50, 0.2),
    0 0 60px rgba(205, 127, 50, 0.1),
    inset 0 0 30px rgba(205, 127, 50, 0.05);
}

.top3-bronze::before {
  background: linear-gradient(90deg, #cd7f32, #e6a860, #cd7f32);
}

.top3-bronze:hover {
  box-shadow: 
    0 15px 50px rgba(205, 127, 50, 0.4),
    0 0 80px rgba(205, 127, 50, 0.2);
}

/* ===== CORONA Y POSICIÓN ===== */
.top3-crown {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.top3-emoji {
  font-size: 3rem;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
  animation: medalPulse 2s ease-in-out infinite;
}

@keyframes medalPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.top3-position {
  font-size: 1.5rem;
  font-weight: 900;
  color: #8b5cf6;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
  margin-top: -5px;
}

/* ===== LOGO ===== */
.top3-logo-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.1));
  box-shadow: 0 5px 25px rgba(139, 92, 246, 0.3);
}

.top3-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #1a1f2e;
}

/* ===== NOMBRE ===== */
.top3-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== CONTADOR DE VISITAS ===== */
.top3-visits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
  padding: 8px 15px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.visits-icon {
  font-size: 1rem;
}

.visits-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: #a78bfa;
}

/* ===== BOTÓN VISITAR ===== */
.top3-btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.top3-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.top3-btn:hover::before {
  left: 100%;
}

/* Botón Oro */
.top3-btn-gold {
  background: linear-gradient(135deg, #ffd700 0%, #f4a700 100%);
  color: #1a1a1a;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.top3-btn-gold:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

/* Botón Plata */
.top3-btn-silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
  color: #1a1a1a;
  box-shadow: 0 5px 20px rgba(192, 192, 192, 0.4);
}

.top3-btn-silver:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(192, 192, 192, 0.6);
}

/* Botón Bronce */
.top3-btn-bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #b5651d 100%);
  color: #fff;
  box-shadow: 0 5px 20px rgba(205, 127, 50, 0.4);
}

.top3-btn-bronze:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(205, 127, 50, 0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .top3-container {
    gap: 20px;
  }
  
  .top3-card {
    width: 250px;
    padding: 20px 15px;
  }
  
  .top3-logo-wrapper {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .top3-title {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }
  
  .crown-icon {
    font-size: 1.4rem;
  }
  
  .top3-container {
    flex-direction: column;
    align-items: center;
  }
  
  .top3-card {
    width: 90%;
    max-width: 320px;
  }
}
