/* Section: Palette & Tokenized Palette */
:root {
  --bg: #0b0b12;
  --bg-2: #1a0b28;
  --text: #e9e0f7;
  --muted: #c4b5cb;
  --accent: #ff2a2a;
  --accent-2: #8b00ff;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 10px 28px rgba(0,0,0,.45);
  --ring: rgba(255, 0, 0, 0.8);
}

/* Section: Global resets & background layers */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #0b0b12 0%, #1a0b1f 60%, #0b0b12 100%);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Layered gradient background: subtle neon hints + scanlines */
  background:
    radial-gradient(circle at 20% 10%, rgba(255,0,0,.15), transparent 25%),
    radial-gradient(circle at 85% 15%, rgba(140,0,255,.15), transparent 25%),
    linear-gradient(135deg, rgba(0,0,0,.0), rgba(0,0,0,.0)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal, overlay;
  opacity: 0.9;
  filter: saturate(110%);
}

/* Section: Layout helpers & typography helpers */
.container {
  width: 100%;
  max-width: clamp(640px, 75vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Core structural selectors to style */
html, body, header, nav, main, article, aside, footer {
  display: block;
}
header { padding: 1rem 0; text-align: center; position: relative; z-index: 1; }
main { padding: 0; }
article { padding: 1rem 0; }
footer { padding: 1rem 0; text-align: center; color: var(--muted); }

/* Section: Hero / header typography */
header h1 {
  font-size: clamp(1.4rem, 1.2vw + 1rem, 2.6rem);
  line-height: 1.15;
  margin: .25rem auto;
  font-weight: 700;
  letter-spacing: .4px;
  text-wrap: balance;
}

/* Section: Interactive content (image frame) */
.image-frame {
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  margin: 1rem auto;
  border-radius: 14px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Section: Glassy content panels (fallback) */
.backdrop {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .75rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Section: Links & controls */
a, button, .btn, .cta { text-decoration: none; color: inherit; }
a { color: var(--accent-2); }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 2px; outline: none; }

/* Button variants & focus management */
.btn {
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .25s ease, border-color .25s ease;
}
.btn--solid {
  background: linear-gradient(135deg, #ff2a2a 0%, #8b00ff 100%);
  border: 1px solid rgba(255,255,255,.7);
  color: #fff;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.7);
  color: #fff;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: .95; }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Section: Layout flow for content blocks (static in provided HTML) */
.content { padding: 1rem 0; color: var(--muted); }

/* Section: Footer groups (ads / promos) */
.product-ad, .sponsored-page {
  display: inline-block;
  vertical-align: middle;
  margin: .25rem;
  padding: .6rem 0;
  min-width: 240px;
}
.product-ad a, .sponsored-page a {
  display: block;
  text-align: center;
  padding: .5rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Section: Dark-mode variant for readability on light scheme */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f5ff;
    --bg-2: #ece0ff;
    --text: #1a0b24;
    --muted: #5b456e;
    --accent: #c40000;
    --accent-2: #6a00b4;
  }
  body {
    background: linear-gradient(135deg, #f7f5ff 0%, #efe4ff 60%, #f7f5ff 100%);
    color: var(--text);
  }
  .image-frame {
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(0,0,0,.15);
    backdrop-filter: blur(6px);
  }
  a { color: var(--accent-2); }
  .product-ad a, .sponsored-page a { background: rgba(255,255,255,.95); color: #1a0b24; }
  header h1 { color: var(--text); }
}

/* Section: Print styles */
@media print {
  body { background: #fff; color: #000; }
  .image-frame { page-break-inside: avoid; }
}
  
/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}