/* =========================================
   GameVault Global Styles
   ========================================= */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* =========================================
   Scrollbars
   ========================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0b;
}
::-webkit-scrollbar-thumb {
  background: #1f1f23;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Ocultar scrollbar pero mantener funcionalidad */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none; /* IE y Edge */
  scrollbar-width: none; /* Firefox */
}

/* =========================================
   Hero Gradients & Utilities
   ========================================= */

/* Por defecto (detalle.html) */
.hero-gradient {
  background: linear-gradient(to top, #0a0a0b 0%, transparent 100%);
}

/* index.html hero-gradient (limitado a su contexto mediante la clase del body) */
body.overflow-x-hidden .hero-gradient {
  background: linear-gradient(to top, #0a0a0b 0%, rgba(10, 10, 11, 0.5) 50%, transparent 100%);
}

/* login.html y register.html hero-gradient (limitado a su body) */
body.h-screen.flex .hero-gradient {
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.15), transparent 40%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 40%);
}

.glass-panel {
  background: rgba(20, 20, 22, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.glow-accent {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

/* =========================================
   Cards Hover Effects
   ========================================= */

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px -10px rgba(6, 182, 212, 0.15); /* Estilo base unificado */
}

/* Específico para perfil.html (dentro de tabs) */
#juegos .card-hover:hover {
  border-color: #06b6d4;
  box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.2);
}

/* =========================================
   Menús, Inputs y Forms (Settings, etc.)
   ========================================= */

.menu-item {
  transition: all 0.2s ease;
}
.menu-item:hover {
  background: rgba(6, 182, 212, 0.1);
  border-left-color: #06b6d4;
}
.menu-item.active {
  background: rgba(6, 182, 212, 0.15);
  border-left-color: #06b6d4;
  color: #06b6d4;
}

.input-field {
  transition: all 0.2s ease;
}
.input-field:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Toggle Checkboxes para settings y conexiones */
.toggle-checkbox:checked {
  background-color: #06b6d4;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #06b6d4;
}
.toggle-checkbox:checked + .toggle-label div,
.toggle-checkbox:checked + .toggle-label .toggle-inner {
  transform: translateX(100%);
}

/* =========================================
   Star Rating (detalle.html)
   ========================================= */

.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
}
.star-rating input {
  display: none;
}
.star-rating label {
  cursor: pointer;
  color: #3f3f46;
  transition: color 0.2s ease;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #fbbf24;
}

/* =========================================
   Tabs (perfil.html)
   ========================================= */

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* =========================================
   Efectos Especiales (404.html)
   ========================================= */

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #ef4444;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #06b6d4;
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-anim-1 {
  0% { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); }
  20% { clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%); }
  40% { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); }
  60% { clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%); }
  80% { clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%); }
  100% { clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%); }
  20% { clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%); }
  40% { clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%); }
  60% { clip-path: polygon(0 2%, 100% 2%, 100% 2%, 0 2%); }
  80% { clip-path: polygon(0 27%, 100% 27%, 100% 27%, 0 27%); }
  100% { clip-path: polygon(0 42%, 100% 42%, 100% 42%, 0 42%); }
}

.scanlines {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 50%,
    rgba(0,0,0,0.1) 50%,
    rgba(0,0,0,0.1)
  );
  background-size: 100% 4px;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 10;
}
