/* =========================================================
   SISTEMA DE DISEÑO MCPEV (GLASSMORPHISM & DARK NEON)
   ========================================================= */
:root {
  --bg-main: #28023e;
  --bg-main-nav: #210e32af;
  --bg-secondary: #2d0643;
  --glass-card: #2e0448a6;
  --glass-header: #29023ed9;
  --glass-border: #25023714;
  --accent-purple: #9146ff;
  --accent-purple-glow: #9146ff59;
  --accent-cyan: #9146ff;
  --accent-cyan-glow: #9146ff59;
  --accent-kick: #53fc18;
  --accent-kick-glow: #53fc1859;
  --text-primary: #a362c9;
  --text-secondary: #a362c9;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --container-max: 1240px;
  --radius-card: 16px;
}

/* =========================================================
   RESET & ESTILOS BASE
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-purple) var(--bg-main);
}

body {
  font-family: var(--font-family);
  background: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, #9146ff14 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, #00f0ff0f 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(145, 70, 255, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* =========================================================
   HEADER / BARRA DE NAVEGACIÓN ESTILO MCPEV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--glass-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover img {
  transform: scale(1.1) rotate(-3deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--text-primary);
  background: #00000000;
  border: 1px solid var(--glass-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn, .hamburger-btn {
  background: #ffffff00;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.icon-btn:hover, .hamburger-btn:hover {
  background: #ffffff00;
  border-color: var(--accent-purple);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-purple-glow);
}

.hamburger-btn {
  display: none;
}

/* =========================================================
   CONTENEDOR Y HERO SEARCH
   ========================================================= */
.main-container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px;
  flex: 1;
}

.hero-search {
  margin-bottom: 40px;
}

.search-box {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  pointer-events: none;
  transition: color 0.3s;
}

#buscador {
  width: 100%;
  padding: 16px 48px 16px 52px;
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  box-shadow: 0 8px 32px #00000033;
  transition: all 0.3s ease;
}

#buscador::placeholder {
  color: var(--text-secondary);
}

#buscador:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px var(--accent-purple-glow), 0 8px 32px #00000066;
}

#buscador:focus + .search-icon {
  color: var(--accent-cyan);
}

#btnLimpiar {
  position: absolute;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  transition: color 0.2s;
}

#btnLimpiar:hover {
  color: var(--text-primary);
}

/* =========================================================
   TITULARES DE PLATAFORMA
   ========================================================= */
.platform-section {
  margin-bottom: 48px;
}

.platform-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 24px;
  padding: 8px 20px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.platform-title .logo {
  width: 26px;
  height: 26px;
  cursor: pointer;
  transition: transform 0.2s;
}

.platform-title .logo:hover {
  transform: scale(1.15);
}

.platform-title span {
  cursor: pointer;
}

.twitch-header {
  color: #a970ff;
  background: #9146ff14;
  border: 1px solid #9146ff33;
}

.kick-header {
  color: var(--accent-kick);
  background: #53fc180f;
  border: 1px solid #53fc1833;
}

.search-header {
  color: var(--accent-cyan);
  background: #00f0ff14;
  border: 1px solid #00f0ff33;
}

/* =========================================================
   TARJETAS Y REJILLA (GRID ESTILO MCPEV)
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(145, 70, 255, 0.4);
  box-shadow: 0 12px 30px #00000080, 0 0 20px var(--accent-purple-glow);
}

.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.card .title {
  padding: 14px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  word-break: break-word;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #22102bb3;
  border-top: 1px solid var(--glass-border);
}

.identificador {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.identificador.twitch {
  background: #9146ffe6;
  color: black;
  border: 1px solid #ffffff33;
}

.identificador.kick {
  background: #53fc18e6;
  color: black;
  border: 1px solid #00000033;
}

/* =========================================================
   PANEL MODAL / ABOUT ESTILO GLASS
   ========================================================= */
.about-panel {
  position: fixed;
  inset: 0;
  background: #1a0b26cc;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  padding: 20px;
}

.about-panel.active {
  opacity: 1;
  pointer-events: all;
}

.about-content {
  position: relative;
  background: #1e0f2ae6;
  border: 1px solid var(--accent-cyan);
  padding: 32px 28px;
  border-radius: 24px;
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 0 30px var(--accent-cyan-glow);
}

.close-about {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-about:hover {
  color: var(--accent-cyan);
}

.modal-title {
  color: var(--accent-cyan);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.about-content .author {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about-content h3 {
  margin: 16px 0 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.modal-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 18px 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.links a {
  width: 42px;
  height: 42px;
  background: #ffffff0a;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.links a:hover {
  background: var(--accent-cyan);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

/* =========================================================
   FOOTER & VOLVER ARRIBA
   ========================================================= */
.footer {
  background: var(--bg-main); 
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

#btnSubir {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-purple);
  border-radius: 50%;
  color: var(--accent-cyan);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 800;
  box-shadow: 0 4px 20px #00000099;
}

#btnSubir:hover {
  background: var(--accent-purple);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--accent-purple-glow);
}

#btnSubir.mostrar {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   ADAPTABILIDAD MÓVIL
   ========================================================= */
@media (max-width: 768px) {
  .hamburger-btn {
    display: grid;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-main-nav);
    border-bottom: 1px solid var(--glass-border);
    flex-direction: column;
    padding: 16px 20px;
    display: none;
  }

  .main-nav.active {
    display: flex;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 14px;
  }
}