:root {
  --sulfur-yellow: #e7ff00;
  --page-max-width: 1500px;
  --side-ad-width: 160px;
  --side-ad-height: 600px;
  --content-gap: clamp(14px, 2vw, 28px);
  --button-gap: clamp(14px, 1.7vw, 24px);
  --panel-border: rgba(231, 255, 0, 0.42);
  --dark-overlay: rgba(3, 6, 12, 0.58);
  --soft-shadow: 0 14px 34px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #070a10;
  background-image:
    linear-gradient(var(--dark-overlay), var(--dark-overlay)),
    url("../fotos/Fondo.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, var(--page-max-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(12px, 2vw, 28px) 34px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 122px;
  padding: 22px 0 18px;
  text-align: center;
}

.site-header h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--sulfur-yellow);
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: clamp(0.04em, 0.9vw, 0.13em);
  text-transform: uppercase;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.8),
    0 0 14px rgba(231, 255, 0, 0.52),
    0 0 38px rgba(231, 255, 0, 0.2);
}

.site-header h1::after {
  display: block;
  width: min(72%, 430px);
  height: 3px;
  margin: 15px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--sulfur-yellow), transparent);
  content: "";
}

.main-layout {
  display: grid;
  grid-template-columns: var(--side-ad-width) minmax(0, 1fr) var(--side-ad-width);
  align-items: start;
  gap: var(--content-gap);
}

.battle-section {
  min-width: 0;
}

.battle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--button-gap);
  width: 100%;
}

.battle-card {
  position: relative;
  display: flex;
  min-width: 0;
  aspect-ratio: 2.35 / 1;
  overflow: hidden;
  border: 1px solid rgba(231, 255, 0, 0.48);
  border-radius: 15px;
  color: var(--sulfur-yellow);
  background-color: rgba(7, 10, 16, 0.82);
  box-shadow: var(--soft-shadow);
  text-decoration: none;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}


.battle-card__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
}

.battle-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.06) 52%,
    rgba(0, 0, 0, 0.36) 100%
  );
  content: "";
}

.battle-card::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 34%) border-box;
  content: "";
  pointer-events: none;
}

.battle-card__text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: clamp(9px, 1.1vw, 14px) 10px;
  color: var(--sulfur-yellow);
  font-size: clamp(0.82rem, 1.25vw, 1.12rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.035em;
  text-align: center;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 1),
    0 0 8px rgba(0, 0, 0, 0.94);
  background: linear-gradient(
    180deg,
    rgba(4, 7, 12, 0.01),
    rgba(4, 7, 12, 0.1)
  );
  backdrop-filter: blur(0.5px);
}

.battle-card:hover .battle-card__image {
  transform: scale(1.035);
}

.battle-card:hover {
  border-color: var(--sulfur-yellow);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.56),
    0 0 22px rgba(231, 255, 0, 0.23);
  filter: saturate(1.08) brightness(1.06);
  transform: translateY(-4px) scale(1.012);
}

.battle-card:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
  border-color: var(--sulfur-yellow);
}

.battle-card:active {
  transform: translateY(-1px) scale(0.995);
}

.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed rgba(231, 255, 0, 0.52);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(4, 7, 12, 0.5);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  text-align: center;
}

.ad-slot--side {
  position: sticky;
  top: 18px;
  width: 100%;
  min-height: var(--side-ad-height);
}

.ad-slot__label {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot__size {
  margin-top: 7px;
  color: rgba(231, 255, 0, 0.72);
  font-size: 0.76rem;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding-top: clamp(28px, 5vw, 52px);
}

.ad-slot--bottom {
  width: min(100%, 970px);
  min-height: 90px;
}

.noscript-message {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  color: var(--sulfur-yellow);
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
}

@media (max-width: 1240px) {
  :root {
    --side-ad-width: 130px;
    --content-gap: 18px;
  }

  .battle-grid {
    gap: 16px;
  }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }

  .main-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-section {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .ad-slot--side {
    position: static;
    grid-row: 2;
    min-height: 110px;
  }

  .ad-slot--left {
    grid-column: 1;
  }

  .ad-slot--right {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 104px;
  }

  .battle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-card__text {
    font-size: clamp(0.82rem, 2.4vw, 1.05rem);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding-inline: 11px;
  }

  .site-header {
    min-height: 94px;
    padding-top: 18px;
  }

  .site-header h1 {
    font-size: clamp(2rem, 13vw, 3.2rem);
    letter-spacing: 0.06em;
  }

  .main-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .battle-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .battle-card {
    aspect-ratio: 2.55 / 1;
  }

  .battle-card__text {
    font-size: 1rem;
  }

  .ad-slot--left,
  .ad-slot--right {
    grid-column: 1;
  }

  .ad-slot--left {
    grid-row: 2;
  }

  .ad-slot--right {
    grid-row: 3;
  }

  .ad-slot--bottom {
    min-height: 76px;
  }
}

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