/* base.css — reset, theme variables, scenery (stars/floor), page layout, link cards, footer */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --sky-top: #0b1035;
  --sky-mid: #1b2a6b;
  --sky-low: #3b4fd8;
  --brick-red: #e2231a;
  --brick-yellow: #f5cd30;
  --brick-blue: #0d69ac;
  --brick-green: #4b974b;
  --brick-orange: #ff8c1a;
}

html, body { height: 100%; }

body {
  font-family: "Segoe UI", "Arial Black", Arial, sans-serif;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
  overflow-x: hidden;
  min-height: 100vh;
  color: #fff;
  position: relative;
}

/* ---------- Baseplate grid floor ---------- */
.floor {
  position: fixed;
  left: -50vw;
  bottom: -12vh;
  width: 200vw;
  height: 55vh;
  background:
    linear-gradient(rgba(120, 255, 140, 0.25) 2px, transparent 2px),
    linear-gradient(90deg, rgba(120, 255, 140, 0.25) 2px, transparent 2px),
    linear-gradient(180deg, rgba(30, 90, 45, 0.9), rgba(20, 60, 35, 0.95));
  background-size: 64px 64px, 64px 64px, 100% 100%;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: top center;
  animation: floorScroll 12s linear infinite;
  z-index: 0;
}

@keyframes floorScroll {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 64px, 0 0, 0 0; }
}

.floor-glow {
  position: fixed;
  left: 0; right: 0;
  bottom: 28vh;
  height: 18vh;
  background: linear-gradient(180deg, transparent, rgba(90, 220, 255, 0.18));
  pointer-events: none;
  z-index: 0;
}

/* ---------- Stars ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 8% 12%,  #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 22% 30%, #ffe9a8 50%, transparent 51%),
    radial-gradient(3px 3px at 37% 8%,  #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 52% 22%, #aee6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 68% 10%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 81% 28%, #ffd0f0 50%, transparent 51%),
    radial-gradient(2px 2px at 93% 15%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 15% 45%, #aee6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 42%, #ffe9a8 50%, transparent 51%);
  animation: twinkle 3.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes twinkle {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}


.card.secret { --accent: #b64bff; }
.card.shop   { --accent: var(--brick-orange); }

@keyframes secretIn {
  from { transform: scale(0) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.secret-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #b64bff, #7a1fd0);
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: 0 0 14px rgba(182, 75, 255, 0.7);
}

.card.digger { display: none; --accent: var(--brick-green); }
body.digger-owned .card.digger { display: block; animation: secretIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }

.card.hopper { display: none; --accent: #0d9ac4; }
body.hopper-owned .card.hopper { display: block; animation: secretIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }

.card.vault { display: none; --accent: #8d8d99; }
body.vault-unlocked .card.vault { display: block; animation: secretIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }

.card.runner { display: none; --accent: #2ea3c7; }
body.map-owned .card.runner { display: block; animation: secretIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }

.card.pebbles { display: none; --accent: #a89f91; }
body.pebbles-unlocked .card.pebbles { display: block; animation: secretIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }

.card.trophies { --accent: var(--brick-yellow); }


/* ---------- Layout ---------- */
.content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 120px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.05;
  color: #fff;
  text-shadow:
    3px 3px 0 #e2231a,
    6px 6px 0 #a01310,
    9px 9px 22px rgba(0, 0, 0, 0.55);
  transform: rotate(-2deg);
  margin-bottom: 14px;
}

h1 span { color: var(--brick-yellow); }

.tagline {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 56px;
}

/* ---------- Link cards ---------- */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  width: 100%;
  max-width: 900px;
}

.card {
  flex: 1 1 320px;
  max-width: 400px;
  display: block;
  text-decoration: none;
  color: #fff;
  background: rgba(10, 16, 48, 0.55);
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 34px 28px 30px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: var(--accent);
}

.card:hover {
  transform: translateY(-10px) scale(1.03) rotate(-1deg);
  border-color: var(--accent);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.55),
    0 0 34px color-mix(in srgb, var(--accent) 55%, transparent);
}

.card .icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: var(--accent);
  border: 3px solid rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  box-shadow:
    inset 0 -8px 0 rgba(0, 0, 0, 0.22),
    inset 0 6px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.22s ease;
}

.card:hover .icon { transform: rotate(8deg) scale(1.1); }

.card h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin-bottom: 18px;
}

.card .go {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--accent);
  padding: 10px 26px;
  border-radius: 12px;
  border: 3px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22);
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.card.plated   { --accent: var(--brick-red); }
.card.rivals   { --accent: var(--brick-orange); }
.card.abyss    { --accent: #3b4fd8; }
.card.arachni  { --accent: var(--brick-blue); }
.card.findall  { --accent: #1fbfa3; }

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px 34px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .cube.idle, .cube-wrap, .floor, .stars, .decor, .card.secret, .card.shop { animation: none; }
}
