:root {
  color-scheme: light;
  --bg: #0b0b10;
  --bg-2: #141622;
  --accent: #f7b731;
  --accent-2: #f56b6b;
  --text: #f8f4ee;
  --muted: #b8b4c1;
  --panel: rgba(20, 22, 34, 0.78);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top, #1c1f33 0%, #0b0b10 45%, #050506 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(247, 183, 49, 0.4), rgba(245, 107, 107, 0));
  filter: blur(30px);
  opacity: 0.6;
  z-index: 0;
}

.bg-orb--one {
  top: -120px;
  left: -120px;
}

.bg-orb--two {
  bottom: -160px;
  right: -160px;
  background: radial-gradient(circle, rgba(63, 157, 255, 0.4), rgba(11, 11, 16, 0));
}

.app-shell {
  position: relative;
  z-index: 1;
  padding: 24px 18px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.4rem);
  margin: 0;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
}

h3 {
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 6px;
}

.subhead {
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 420px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.tiny {
  font-size: 0.75rem;
  color: var(--muted);
}

.landing {
  display: grid;
  gap: 24px;
}

.panel,
.landing-card,
.vault-card,
.badge,
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: var(--muted);
}

.panel input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 16, 0.7);
  color: var(--text);
  font-size: 1rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0b0b10;
  box-shadow: 0 12px 20px rgba(245, 107, 107, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.alert {
  background: rgba(245, 107, 107, 0.2);
  border: 1px solid rgba(245, 107, 107, 0.5);
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  margin-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.vault {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.vault-card h2 {
  font-size: 2.4rem;
  margin: 4px 0 6px;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.badge-grid {
  display: grid;
  gap: 12px;
}

.badge {
  display: grid;
  gap: 6px;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.card {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  perspective: 800px;
}

.card-inner {
  position: relative;
  width: 100%;
  padding-top: 140%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}


.card-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(26, 29, 46, 0.9), rgba(10, 10, 16, 0.95));
  backface-visibility: hidden;
}

.card-face--back {
  transform: rotateY(180deg);
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.card--locked .card-face {
  background: rgba(15, 17, 28, 0.9);
  color: var(--muted);
}

.card-overlay {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(11, 11, 16, 0.85), rgba(245, 107, 107, 0.3));
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-overlay-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.card-overlay-cost {
  font-size: 0.8rem;
  color: var(--accent);
}

.card--owned .card-overlay {
  display: none;
}

.card-play {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(11, 11, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  display: none;
}

.card--owned .card-play {
  display: inline-flex;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.card-media {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
}

.card-media img,
.card-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.card-media video {
  background: #000;
}

.hidden {
  display: none;
}

.card--locked .card-media img {
  opacity: 0.3;
}

.card--locked .card-overlay {
  background: rgba(11, 11, 16, 0.9);
}

.card--locked .card-play {
  display: none;
}

.badges,
.page {
  margin-bottom: 32px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 7, 12, 0.7);
  padding: 24px;
  z-index: 5;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .landing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

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

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