/*
====================================================
 Shiva & Sally — Mapas Custom
====================================================
*/

:root {
  --color-text:       #f2f5f8;
  --color-text-muted: rgba(242, 245, 248, 0.70);
  --radius:           10px;
  --text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.6),
    0 2px 12px rgba(0, 0, 0, 0.4);
  --glass-bg:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.13) 0%,
      rgba(255,255,255,0.04) 50%,
      rgba(255,255,255,0.09) 100%
    );
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-shadow:
    inset 0 1px 0 rgba(255,255,255,0.40),
    inset 0 -8px 12px -8px rgba(0,0,0,0.30),
    0 8px 24px rgba(0,0,0,0.30);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.5rem 2rem;
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(
      ellipse at center,
      rgba(8,10,14,.60) 0%,
      rgba(8,10,14,.30) 45%,
      rgba(8,10,14,.05) 75%
    ),
    url("fondo.webp") center center / cover no-repeat fixed;
}

/* ── Page wrapper ── */
.page {
  width: min(100%, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* ── Header ── */
header {
  text-align: center;
}

.logo {
  display: block;
  width: 110px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.2rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.55));
}

h1 {
  font-family: 'Creepster', sans-serif;
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-shadow: var(--text-shadow), 0 0 24px rgba(102, 192, 244, 0.35);
}

h1 a {
  color: inherit;
  text-decoration: none;
  transition: opacity .15s ease;
}

h1 a:hover,
h1 a:focus-visible {
  opacity: 0.3;
}

header p {
  margin-top: 0.5rem;
  color: var(--color-text-muted);
  text-shadow: var(--text-shadow);
}

.server-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-shadow: var(--text-shadow);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 8px #2ecc71;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Selector de juego (pestañas) ── */
.game-tabs {
  display: inline-flex;
  gap: 8px;
  margin-top: 1.4rem;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  box-shadow: var(--glass-shadow);
}

.game-tab {
  font-family: 'Creepster', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  text-shadow: var(--text-shadow);
  transition: background .2s ease, color .2s ease;
}

.game-tab:hover {
  color: var(--color-text);
}

.game-tab.is-active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ── Section titles ── */
.maps-section,
.instructions {
  width: 100%;
}

h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-shadow: var(--text-shadow);
  margin-bottom: 1.2rem;
}

/* ── Maps grid ── */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* ── Map card ── */
.map-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  box-shadow: var(--glass-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.map-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.50),
    0 12px 32px rgba(0,0,0,0.4);
}

.map-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.map-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
  filter: brightness(0.85) saturate(0.9);
}

.map-card:hover .map-thumb img {
  transform: scale(1.06);
  filter: brightness(1) saturate(1.1);
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(8,10,14,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: var(--text-shadow);
  opacity: 0;
  transition: opacity .22s ease;
}

.map-overlay span { font-size: 1.3rem; }

.map-card:hover .map-overlay { opacity: 1; }

.map-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.map-name {
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: var(--text-shadow);
}

.map-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.map-card--placeholder {
  border-style: dashed;
  opacity: 0.6;
}

.map-card--placeholder .map-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
}

/* ── Instructions ── */
.instructions {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

.instructions ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instructions ol[hidden] {
  display: none;
}

.instructions li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  text-shadow: var(--text-shadow);
  line-height: 1.5;
}

.instructions li span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  min-width: 18px;
}

code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.8em;
  background: rgba(8,10,14,0.50);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--color-text);
  word-break: break-all;
}

/* ── Footer ── */
footer {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-shadow: var(--text-shadow);
}

/* ── Responsive ── */
@media (max-width: 500px) {
  h1 { font-size: 2.4rem; }
  .logo { width: 90px; }
  .maps-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Accesibilidad ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
