/* Base tokens */
:root {
  --bg: #0b001a;
  --bg-2: #1e0a2b;
  --text: #f6f0ff;
  --muted: #c9aaff;
  --accent: #ff2bd0;      /* magenta highlight */
  --accent-2: #d4af37;    /* gold */
  --card: rgba(255, 255, 255, 0.08);
  --card-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  --focus: 0 0 0 3px rgba(255, 255, 255, 0.8);
  --radius: 12px;
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
html, body {
  height: 100%;
}
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Inter", Arial, "Noto Sans", sans-serif;
}
body {
  margin: 0;
  color: var(--text);
  background: 
    /* base magenta gradient */
    linear-gradient(135deg, rgba(255, 0, 170, 0.25) 0%, rgba(0,0,0,0) 40%),
    /* deep cloak of night with magenta cast */
    linear-gradient(180deg, rgba(12,0,28,0.95) 0%, rgba(12,0,28,0.65) 60%, rgba(0,0,0,0.75) 100%),
    /* subtle gold glints */
    radial-gradient(circle at 70% -10%, rgba(212, 175, 55, 0.15), transparent 40%),
    #0a001a;
  background-image:
    linear-gradient(135deg, rgba(255, 0, 170, 0.18), rgba(0,0,0,0)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 70% -10%, rgba(212,175,55,.15), transparent 40%);
  background-blend-mode: overlay;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04), rgba(255,255,255,.04)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.015) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  opacity: 0.65;
  z-index: 0;
  animation: scan 12s linear infinite;
}
@keyframes scan {
  from { transform: translateY(0); }
  to   { transform: translateY(2px); }
}

/* Layout scaffolding */
.container {
  max-width: clamp(320px, 92vw, 1120px);
  margin: 0 auto;
  padding: 1rem;
  position: relative;
  z-index: 1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  backdrop-filter: saturate(1.15) blur(12px);
  -webkit-backdrop-filter: saturate(1.15) blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(1px)) {
  .card {
    background: rgba(255,255,255,.08);
  }
}
.ghost { background: transparent; border: none; box-shadow: none; }

/* Image frame with aspect-ratio and glow */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.03);
  transform: scale(1.002);
}
.image-frame:hover img { transform: scale(1.04); transition: transform .3s ease; }

/* Glass panels with graceful fallbacks */
.content {
  padding: 1rem;
  line-height: 1.5;
}
.header-glow {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
header {
  padding: 2rem 1rem 1.25rem;
  text-align: center;
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(2rem, 4vw + 1rem, 3.75rem);
  line-height: 1.04;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
}
.main-section { padding: 1rem 0; }

/* Typography & helpers */
h2, h3 {
  margin-top: .5rem;
  margin-bottom: .25rem;
}
p { margin: 0.75rem 0; }
ul { margin: 0.75rem 0; padding-left: 1.15rem; }
li { margin: .25rem 0; }
.tag {
  display: inline-block;
  padding: .2em .5em;
  border-radius: 999px;
  font-size: .72rem;
  background: rgba(212, 175, 55, 0.25);
  color: #ffd;
  border: 1px solid rgba(212, 175, 55, 0.6);
}

/* Links & buttons - high contrast focus */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
  border-radius: 6px;
}
.btn {
  display: inline-block;
  padding: .72rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(#f8d56a, #e1b325);
  color: #2a1800;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(226, 190, 60, .45); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.55);
}
.btn:active { transform: translateY(0); }

.cta {}

/* Sections on the page */
.product-ad, .sponsored-page {
  width: 100%;
  text-align: center;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a:hover, .sponsored-page a:hover {
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

/* Structure-specific styling to satisfy required selectors */
html, body, header, nav, main, article, footer, aside { } /* reserved for specificity; no extra rules here */
.image-frame, .image-frame img { }

/* Print styles */
@media print {
  body::before { display: none; }
  body { background: white; color: black; }
  a { text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
