/* RuleTheMando - estilos del sitio (capa sobre theme.css).
 * Estetica: sci-fi minimal. Acentos cyan eléctrico, indigo y violeta
 * sobre azul-noche. Detalles HUD: numeradores monospaced, esquinas
 * chaflanadas (clip-path), líneas técnicas, glow en focus/hover.
 *
 * Reglas:
 *  - Cero animaciones en bucle infinito.
 *  - Cero handlers JS de scroll/mousemove decorativos.
 *  - Reduced motion respetado (theme.css cubre la base).
 */

/* ===================== Base ===================== */

* { box-sizing: border-box; }

body {
  line-height: 1.6;
  min-height: 100vh;
  /* Grilla decorativa sutil de fondo (estatica, sin coste por frame) */
  background-color: var(--bg-body);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(var(--rgb-primary), 0.15), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(var(--rgb-secondary), 0.10), transparent 60%);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

/* Asegurar que el contenido este por encima de capas decorativas */
.navbar, main, footer, .hero-banner, .game-hero { position: relative; z-index: 1; }

/* Selección de texto */
::selection { background: rgba(var(--rgb-accent), 0.35); color: #fff; }

/* ===================== Tipografia ===================== */

h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.lead { color: var(--text-secondary); }

/* Texto monospaced para etiquetas tech (numeros HUD, codigos) */
.mono, .countdown-number {
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-feature-settings: 'tnum';
}

/* ===================== Hero banner (index.php) ===================== */

.hero-banner {
  height: 64vh;
  min-height: 380px;
  background: var(--gradient-dark);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-accent);
}

/* Imagen de fondo del hero (estatica) */
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.45) saturate(1.1) hue-rotate(-10deg);
  animation: fadeIn 0.7s ease-out;
}

/* Capa HUD: viñeta + grilla + scanline efimero */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.02) 3px,
      rgba(255, 255, 255, 0.02) 4px
    ),
    radial-gradient(ellipse at center, transparent 30%, rgba(7, 11, 21, 0.6) 100%),
    linear-gradient(to top, rgba(7, 11, 21, 0.85), transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.hero-banner::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  filter: blur(1px);
  z-index: 2;
  animation: scanlineOnce 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s 1 both;
}

@keyframes scanlineOnce {
  0%   { top: 0;    opacity: 0; }
  10%  { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

.hero-overlay {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  color: #fff;
  animation: heroIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); letter-spacing: 0.4em; }
  to   { opacity: 1; transform: translateY(0);     letter-spacing: normal; }
}

.hero-banner h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(var(--rgb-accent), 0.25);
}

.hero-banner .lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Marco decorativo en el hero (esquinas tipo HUD) */
.hero-banner .container::before,
.hero-banner .container::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--rgb-accent), 0.5);
  pointer-events: none;
}
.hero-banner .container { position: relative; }
.hero-banner .container::before { top: -14px; left: -14px;  border-right: 0; border-bottom: 0; }
.hero-banner .container::after  { bottom: -14px; right: -14px; border-left: 0; border-top: 0; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ===================== Navbar ===================== */

.navbar-dark.bg-dark {
  background: rgba(7, 11, 21, 0.72) !important;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border-accent);
  box-shadow: 0 1px 0 0 rgba(var(--rgb-accent), 0.06), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.navbar-dark .navbar-brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.navbar-dark .navbar-brand img {
  outline: 1px solid rgba(var(--rgb-accent), 0.4);
  outline-offset: 2px;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--color-accent);
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
  color: #fff;
}

.navbar-dark .navbar-nav .nav-link.active::after,
.navbar-dark .navbar-nav .show > .nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--gradient-neon);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(var(--rgb-accent), 0.6);
}

/* Buscador del navbar */
.navbar .form-control {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.navbar .form-control::placeholder { color: rgba(255, 255, 255, 0.5); }
.navbar .form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--rgb-accent), 0.18);
}

/* Dropdown del navbar */
.navbar .dropdown-menu {
  background: rgba(15, 21, 37, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
}

/* ===================== Section title (HUD numerada) ===================== */

main .container > section,
main > section,
main.container > section {
  counter-increment: rtm-section;
}

main .container,
main.container { counter-reset: rtm-section; }

.section-title {
  position: relative;
  padding: 0 0 14px 0;
  margin-bottom: 28px;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: counter(rtm-section, decimal-leading-zero) " //";
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  background: rgba(var(--rgb-accent), 0.08);
  border: 1px solid var(--border-accent);
  padding: 4px 8px;
  border-radius: 4px;
  text-shadow: 0 0 8px rgba(var(--rgb-accent), 0.4);
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--color-accent) 0%,
    var(--color-primary) 30%,
    transparent 60%);
  opacity: 0.6;
}

/* ===================== Game cards (index.php) ===================== */

.game-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  position: relative;
}

.game-card::before {
  /* Marca de esquina superior-derecha tipo HUD */
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--border-accent);
  border-right: 1px solid var(--border-accent);
  pointer-events: none;
  opacity: 0.6;
  transition: opacity var(--transition);
  z-index: 2;
}

.game-card:hover::before { opacity: 1; }

/* Escalonado al cargar (max 6 - lo que muestra index.php) */
.game-card { animation-delay: 0.05s; }
.col-md-6:nth-child(2)  .game-card,
.col-lg-4:nth-child(2)  .game-card { animation-delay: 0.10s; }
.col-md-6:nth-child(3)  .game-card,
.col-lg-4:nth-child(3)  .game-card { animation-delay: 0.15s; }
.col-md-6:nth-child(4)  .game-card,
.col-lg-4:nth-child(4)  .game-card { animation-delay: 0.20s; }
.col-md-6:nth-child(5)  .game-card,
.col-lg-4:nth-child(5)  .game-card { animation-delay: 0.25s; }
.col-md-6:nth-child(6)  .game-card,
.col-lg-4:nth-child(6)  .game-card { animation-delay: 0.30s; }

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card-hover);
}

.game-card .card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-slow);
  filter: saturate(0.9);
}

.game-card:hover .card-img-top {
  transform: scale(1.04);
  filter: saturate(1.1) brightness(1.05);
}

.game-card .card-body {
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent, rgba(var(--rgb-primary), 0.04));
}

.game-card .card-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.game-card .card-title a { color: inherit; transition: color var(--transition); }
.game-card .card-title a:hover { color: var(--color-accent); }

.game-card .card-text { color: var(--text-secondary); font-size: 0.9rem; }

/* ===================== Future release card (index.php) ===================== */

.future-release-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(var(--rgb-primary), 0.08), rgba(var(--rgb-secondary), 0.06) 50%, transparent 80%),
    var(--bg-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  /* Esquinas chaflanadas para look HUD */
  clip-path: var(--clip-corner-md);
}

/* Linea de neón izquierda (estatica, sin animar) */
.future-release-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3px;
  background: var(--gradient-neon);
  box-shadow: 0 0 16px rgba(var(--rgb-accent), 0.6);
  border-radius: 2px;
  z-index: 2;
}

.future-release-card .card-body {
  padding: 1.75rem;
  position: relative;
  z-index: 1;
}

.future-release-card .card-title {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.future-release-card .card-title a {
  color: inherit;
  transition: color var(--transition);
}
.future-release-card .card-title a:hover { color: var(--color-accent); }

.object-cover { object-fit: cover; }

.future-release-card .col-md-4 { display: block; }
.future-release-card .col-md-4 img {
  width: 100%;
  height: clamp(220px, 30vh, 420px);
  object-fit: cover;
  filter: saturate(0.95);
}

@media (max-width: 767.98px) {
  .future-release-card { clip-path: none; }
  .future-release-card .col-md-4 img { height: auto; max-height: 60vh; }
}

/* ===================== Countdown (index.php) ===================== */

.countdown-container {
  background:
    linear-gradient(180deg, rgba(var(--rgb-accent), 0.08), transparent 60%),
    var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(var(--rgb-accent), 0.08), var(--shadow-card);
  position: relative;
}

.countdown-container::before,
.countdown-container::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-accent);
  pointer-events: none;
}
.countdown-container::before { top: -1px; left: -1px;   border-right: 0; border-bottom: 0; }
.countdown-container::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.countdown-container h5 {
  color: var(--color-accent);
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.countdown-display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.countdown-number {
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(7, 11, 21, 0.6);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 0.5rem 0.4rem;
  margin-bottom: 0.35rem;
  display: block;
  width: 100%;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 10px rgba(var(--rgb-accent), 0.4);
}

.countdown-label {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

/* ===================== Badges ===================== */

.badge {
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.badge-upcoming {
  background: linear-gradient(135deg, var(--color-warning), #d97706);
  color: #1f1306;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.badge-available {
  background: linear-gradient(135deg, var(--color-success), #059669);
  color: #042118;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.badge.bg-secondary {
  background: rgba(148, 163, 184, 0.18) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
}

.badge.bg-primary {
  background: var(--gradient-primary) !important;
  color: #fff;
  box-shadow: 0 0 12px rgba(var(--rgb-primary), 0.35);
}

.badge.bg-info {
  background: rgba(var(--rgb-accent), 0.18) !important;
  color: var(--color-accent) !important;
  border: 1px solid var(--border-accent);
}

.badge.bg-warning,
.badge.bg-warning.text-dark {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fcd34d !important;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge.bg-success {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge.bg-dark {
  background: rgba(0, 0, 0, 0.45) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
}

/* ===================== Game detail (game.php) ===================== */

.game-details p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.game-details strong { color: var(--text-primary); }

.meta li { margin-bottom: .5rem; color: var(--text-secondary); }
.meta li strong { color: var(--text-primary); }

.card-related img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: border-color var(--transition), filter var(--transition);
}
.card-related img:hover { border-color: var(--border-accent); filter: brightness(1.1); }

.game-hero {
  background:
    linear-gradient(135deg, rgba(var(--rgb-primary), 0.18), transparent 50%),
    var(--gradient-dark);
  color: #fff;
  border-bottom: 1px solid var(--border-accent);
  position: relative;
}

.game-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gradient-neon);
  opacity: 0.5;
}

.game-hero h1 { color: #fff; letter-spacing: -0.01em; }
.game-hero .text-muted { color: rgba(255, 255, 255, 0.78) !important; opacity: 1 !important; }
.game-hero .lead { color: rgba(255, 255, 255, 0.92); }

.game-hero-img {
  width: 100%;
  height: clamp(260px, 30vh, 520px);
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(var(--rgb-primary), 0.18);
}

@media (max-width: 767.98px) {
  .game-hero-img { height: auto; max-height: 60vh; }
}

/* ===================== Social links (footer) ===================== */

.social-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.7) !important;
  transition: color var(--transition), transform var(--transition), text-shadow var(--transition);
}

.social-links a:hover {
  color: var(--color-accent) !important;
  transform: translateY(-2px);
  text-shadow: 0 0 12px rgba(var(--rgb-accent), 0.6);
}

/* ===================== Footer ===================== */

footer.site-footer,
.site-footer {
  background:
    linear-gradient(180deg, rgba(7, 11, 21, 0.5), rgba(7, 11, 21, 0.95)),
    var(--bg-muted) !important;
  color: rgba(255, 255, 255, 0.82);
  border-top: 1px solid var(--border-accent);
  position: relative;
}

footer.site-footer::before,
.site-footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--gradient-neon);
  opacity: 0.55;
}

footer h5 {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

footer .text-muted { color: rgba(255, 255, 255, 0.55) !important; }

footer hr.border-secondary { border-color: var(--border-color) !important; }

/* ===================== Forms ===================== */

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-muted);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.form-control:hover:not(:focus),
.form-select:hover:not(:focus) {
  border-color: var(--border-color-strong);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--rgb-accent), 0.18);
  background-color: var(--bg-elevated);
}

.form-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.form-floating > label { color: var(--text-muted); }

/* ===================== Buttons ===================== */

.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}

.btn:not(.btn-sm) {
  padding: 0.55rem 1.1rem;
}

/* Brillo lateral one-shot que cruza el boton al pasar el cursor */
.btn-primary,
.btn-outline-primary,
.btn-secondary {
  position: relative;
  isolation: isolate;
}

.btn-primary::after,
.btn-outline-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  z-index: -1;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::after,
.btn-outline-primary:hover::after,
.btn-secondary:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--gradient-primary);
  border: 1px solid rgba(var(--rgb-primary), 0.6);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(var(--rgb-primary), 0.2), 0 4px 12px rgba(var(--rgb-primary), 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--color-primary-hover), #c084fc);
  color: #fff;
  border-color: rgba(var(--rgb-secondary), 0.7);
  box-shadow: 0 0 0 1px rgba(var(--rgb-accent), 0.3), 0 8px 22px rgba(var(--rgb-primary), 0.35), var(--glow-violet);
}

.btn-outline-primary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--border-accent);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: rgba(var(--rgb-accent), 0.08);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), var(--glow-accent);
}

.btn-secondary {
  background: rgba(var(--rgb-secondary), 0.18);
  border: 1px solid rgba(var(--rgb-secondary), 0.4);
  color: #d8b4fe;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: rgba(var(--rgb-secondary), 0.28);
  color: #fff;
  border-color: var(--color-secondary);
  box-shadow: var(--glow-violet);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color-strong);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-outline-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-outline-light:hover,
.btn-outline-light:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-outline-success {
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-outline-success:hover { background: rgba(16, 185, 129, 0.12); color: #fff; border-color: var(--color-success); }

.btn-outline-danger {
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-outline-danger:hover { background: rgba(239, 68, 68, 0.12); color: #fff; border-color: var(--color-danger); }

.btn-outline-dark {
  color: var(--text-secondary);
  border: 1px solid var(--border-color-strong);
}
.btn-outline-dark:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); }

/* ===================== Tablas ===================== */

.table {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.table thead {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-accent);
}

.table tbody tr {
  transition: background-color var(--transition);
}
.table tbody tr:hover { background-color: rgba(var(--rgb-accent), 0.05); }

.table-hover > tbody > tr:hover > * { color: var(--text-primary); }

/* ===================== List group ===================== */

.list-group-item {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
  transition: background-color var(--transition), border-color var(--transition);
}

.list-group-item:hover {
  background-color: var(--bg-elevated);
  border-color: var(--border-accent);
}

/* ===================== Nav tabs (login y otras) ===================== */

.nav-tabs { border-bottom-color: var(--border-color); }
.nav-tabs .nav-link {
  color: var(--text-secondary);
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav-tabs .nav-link:hover { color: var(--text-primary); border-color: transparent; isolation: isolate; }
.nav-tabs .nav-link.active {
  background: var(--gradient-primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* ===================== Page header (mini-strip de paginas internas) ===================== */

.page-header {
  background:
    linear-gradient(135deg, rgba(var(--rgb-primary), 0.25), rgba(var(--rgb-secondary), 0.18) 60%, transparent 100%),
    var(--gradient-dark) !important;
  border-bottom: 1px solid var(--border-accent);
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gradient-neon);
  opacity: 0.6;
}

.page-header h1 {
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 0 20px rgba(var(--rgb-accent), 0.18);
}
.page-header p { color: rgba(255, 255, 255, 0.78); }

/* ===================== Auth (login.php, forgot, reset, verify, resend) ===================== */

.auth-container {
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(var(--rgb-primary), 0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(var(--rgb-secondary), 0.18), transparent 60%),
    var(--bg-body) !important;
}

.auth-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(var(--rgb-primary), 0.18) !important;
  border-radius: var(--radius-lg) !important;
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gradient-neon);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.35;
  pointer-events: none;
}

.auth-header {
  background:
    linear-gradient(135deg, rgba(var(--rgb-primary), 0.4), rgba(var(--rgb-secondary), 0.3)),
    var(--gradient-dark) !important;
  border-bottom: 1px solid var(--border-accent);
}

.auth-header h2 {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.btn-auth {
  background: var(--gradient-primary) !important;
  border: 1px solid rgba(var(--rgb-primary), 0.6) !important;
  color: #fff !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.btn-auth:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 22px rgba(var(--rgb-primary), 0.35), var(--glow-violet) !important;
}

.back-home { color: rgba(255, 255, 255, 0.78) !important; transition: color var(--transition), transform var(--transition); }
.back-home:hover { color: var(--color-accent) !important; transform: translateX(-4px); }

/* ===================== Verify email card ===================== */

.verify-container {
  background:
    radial-gradient(ellipse 70% 50% at 30% 0%, rgba(var(--rgb-primary), 0.25), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(var(--rgb-secondary), 0.18), transparent 60%),
    var(--bg-body) !important;
}

.verify-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(var(--rgb-primary), 0.18) !important;
  border-radius: var(--radius-lg) !important;
}

.verify-icon { box-shadow: 0 0 32px rgba(var(--rgb-primary), 0.4); }
.verify-title { color: var(--text-primary); }
.verify-message { color: var(--text-secondary) !important; }
.btn-verify {
  background: var(--gradient-primary) !important;
  border: 1px solid rgba(var(--rgb-primary), 0.6) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ===================== Admin layout ===================== */

.admin-sidebar {
  background:
    linear-gradient(180deg, rgba(var(--rgb-primary), 0.15), transparent 40%),
    var(--gradient-dark) !important;
  border-right: 1px solid var(--border-accent);
}

.admin-main {
  background-color: var(--bg-body) !important;
  color: var(--text-primary);
}

.admin-header {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-card) !important;
}

.sidebar-brand {
  color: var(--color-accent) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom-color: var(--border-color) !important;
}

.sidebar-nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  letter-spacing: 0.04em;
}
.sidebar-nav-link:hover,
.sidebar-nav-link.active {
  background: rgba(var(--rgb-accent), 0.08) !important;
  color: var(--color-accent) !important;
  border-left: 2px solid var(--color-accent);
}

.stat-card {
  background:
    linear-gradient(135deg, rgba(var(--rgb-primary), 0.5), rgba(var(--rgb-secondary), 0.4)) !important;
  border: 1px solid rgba(var(--rgb-accent), 0.25);
  box-shadow: 0 0 0 1px rgba(var(--rgb-primary), 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-table {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card) !important;
}

/* ===================== Card headers de Bootstrap sobre tema dark ===================== */

.card-header.bg-primary {
  background: var(--gradient-primary) !important;
  border-bottom: 1px solid var(--border-accent);
  color: #fff;
}
.card-header.bg-secondary {
  background: var(--bg-elevated) !important;
  border-bottom: 1px solid var(--border-accent) !important;
  color: var(--text-primary) !important;
}
.card-header.bg-dark {
  background: var(--gradient-dark) !important;
  border-bottom: 1px solid var(--border-accent) !important;
  color: #fff !important;
}

/* ===================== Filtros (games.php) ===================== */

.filters-card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.filters-card .card-header.bg-primary {
  background: var(--gradient-primary) !important;
  border-bottom: 1px solid var(--border-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Game section listing (games.php) */
.game-section {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
  margin-bottom: 24px;
}

.game-cover-wrap {
  background: var(--bg-muted) !important;
  position: relative;
}

.game-cover-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 70%, rgba(15, 21, 37, 0.4));
  pointer-events: none;
}

/* ===================== Podio (favorites.php) ===================== */

.podium-1 {
  border: 1px solid #fbbf24 !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15), 0 0 24px rgba(251, 191, 36, 0.18);
}
.podium-2 {
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.12), 0 0 22px rgba(203, 213, 225, 0.15);
}
.podium-3 {
  border: 1px solid #d97706 !important;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15), 0 0 22px rgba(217, 119, 6, 0.18);
}

/* ===================== Pagination override (oscuro) ===================== */

.pagination .page-link {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.pagination .page-item.active .page-link {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(var(--rgb-accent), 0.25);
}

/* ===================== Responsive ===================== */

@media (max-width: 768px) {
  .hero-banner { height: 56vh; min-height: 320px; }
  .hero-banner h1 { font-size: 2rem; }
  .countdown-display { gap: 0.5rem; }
  .countdown-item { min-width: 56px; }
  .countdown-number { font-size: 1.4rem; }
  body {
    background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
  }
}

/* ===================== Scrollbar ===================== */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: var(--bg-muted);
  border-left: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(var(--rgb-primary), 0.55), rgba(var(--rgb-secondary), 0.55));
  border-radius: 6px;
  border: 2px solid var(--bg-muted);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
  box-shadow: 0 0 8px rgba(var(--rgb-accent), 0.5);
}

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(var(--rgb-primary), 0.55) var(--bg-muted); }
