/* ============================================================
   games.lauta.site — biblioteca de ports al navegador
   Estética: oscura, piedra, brasas. Inspirada en la web de
   Mortal Kombat Armageddon.
   ============================================================ */

:root {
  --ink: #080607;
  --ember: #ff5a1a;
  --ember-hot: #ffb066;
  --blood: #7d0f0b;
  --ash: #a99f98;
  --steel: #efe8e1;
  --line: rgba(255, 255, 255, 0.09);
  --card: #100c0c;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--steel);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 70% at 50% 112%, rgba(255, 84, 20, 0.3) 0%, rgba(190, 40, 8, 0.12) 34%, transparent 62%),
    radial-gradient(70% 45% at 50% 104%, rgba(255, 140, 50, 0.18), transparent 60%),
    radial-gradient(55% 45% at 0% 12%, rgba(120, 12, 8, 0.2), transparent 70%),
    radial-gradient(55% 45% at 100% 22%, rgba(120, 12, 8, 0.16), transparent 70%),
    linear-gradient(180deg, #0d0a0b 0%, #080607 40%, #060505 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 90, 26, 0.85);
  color: #0a0606;
}

/* Textura de grano + viñeta, fijas sobre el fondo */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

#embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ------------------------------------------------------------
   Héroe / título
   ------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(64px, 12vh, 150px) 20px clamp(38px, 6vh, 72px);
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(920px, 96vw);
  height: min(540px, 70vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    closest-side,
    rgba(255, 86, 24, 0.22),
    rgba(180, 20, 6, 0.08) 55%,
    transparent 76%
  );
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}

.hero__inner {
  animation: rise 0.9s var(--ease) both;
}

.hero__kicker {
  margin: 0 0 clamp(18px, 3vw, 34px);
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}

.hero__kicker::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px rgba(255, 90, 26, 0.9);
  vertical-align: 2px;
}

.hero__title {
  margin: 0;
  font-weight: 400;
}

.hero__title-main {
  display: block;
  font-family: 'Anton', Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(3.3rem, 11.5vw, 8.6rem);
  line-height: 0.85;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    #fffdfb 0%,
    #f1eae3 28%,
    #bdb2aa 47%,
    #6f6560 52%,
    #dcd3cb 60%,
    #fffdfb 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 24px 55px rgba(255, 70, 20, 0.22));
}

.hero__title-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 26px);
  margin-top: clamp(10px, 1.6vw, 18px);
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.7vw, 1.05rem);
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  text-transform: uppercase;
  color: #cdbfb6;
}

.hero__title-sub i {
  display: block;
  width: clamp(26px, 7vw, 92px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 120, 60, 0.7));
}

.hero__title-sub i:last-child {
  background: linear-gradient(90deg, rgba(255, 120, 60, 0.7), transparent);
}

.hero__by {
  margin: clamp(18px, 2.6vw, 28px) 0 0;
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--ash);
}

.hero__by strong {
  font-weight: 600;
  color: var(--ember-hot);
  text-shadow: 0 0 20px rgba(255, 90, 26, 0.55);
}

/* ------------------------------------------------------------
   Biblioteca
   ------------------------------------------------------------ */

.library-wrap {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px) clamp(56px, 10vh, 104px);
}

.library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #141010, #0b0808);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  animation: rise 0.7s var(--ease) both;
  animation-delay: calc(160ms + var(--i, 0) * 70ms);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(255, 120, 60, 0.45);
  box-shadow:
    0 26px 60px -24px rgba(255, 72, 18, 0.65),
    inset 0 0 0 1px rgba(255, 120, 60, 0.1);
}

.card:focus-visible {
  outline: 2px solid var(--ember-hot);
  outline-offset: 4px;
}

.card__art {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0a0808;
}

.card__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(0.94) contrast(1.05) brightness(0.93);
  transition:
    transform 0.65s var(--ease),
    filter 0.4s ease;
}

.card:hover .card__art img,
.card:focus-visible .card__art img {
  transform: scale(1.06);
  filter: saturate(1.06) contrast(1.06) brightness(1);
}

.card__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.06) 0%,
    transparent 42%,
    rgba(8, 6, 6, 0.55) 100%
  );
  pointer-events: none;
}

.card__play {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(10, 7, 6, 0.5);
  backdrop-filter: blur(6px);
  color: #fff;
  opacity: 0;
  transform: translateY(-4px) scale(0.9);
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease),
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.card__play svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.card:hover .card__play,
.card:focus-visible .card__play {
  opacity: 1;
  transform: none;
  border-color: transparent;
  background: var(--ember);
  box-shadow: 0 0 24px rgba(255, 90, 26, 0.75);
}

.card__meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 15px 15px;
}

.card__name {
  margin: 0;
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f4eee8;
}

.card__row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  color: var(--ash);
}

.card__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember);
  animation: pulse 2.6s ease-in-out infinite;
}

.card__host {
  margin-left: auto;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.26);
}

.library__fallback {
  text-align: center;
  color: var(--ash);
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------
   Pie
   ------------------------------------------------------------ */

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px clamp(26px, 5vh, 44px);
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.26);
}

.footer__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 90, 26, 0.65);
}

/* ------------------------------------------------------------
   Animaciones
   ------------------------------------------------------------ */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 820px) {
  .library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: clamp(56px, 11vh, 90px);
  }

  .card__meta {
    padding: 11px 12px 13px;
  }

  .card__host {
    display: none;
  }

  .footer {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
  }
}

/* En pantallas táctiles no hay hover: mostramos el botón de play siempre */
@media (hover: none) {
  .card__play {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .card,
  .hero__inner {
    opacity: 1;
    transform: none;
  }
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #070505;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #070505;
  border-radius: 10px;
  background: #2a1c19;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d2721;
}
