/* Section: Tokens & Base Theme */
:root{
  --bg: #0b0d18;
  --bg-2: #0a0f1a;
  --card: rgba(18,18,28,0.22);
  --card-border: rgba(255,255,255,0.28);
  --glass: rgba(18,18,28,0.22);
  --text: #f3f4ff;
  --muted: #b8b8c3;
  --accent: #ff00a8;       /* hot pink */
  --accent-2: #ffd400;     /* neon yellow */
  --shadow: 0 8px 20px rgba(0,0,0,.35);
  --ring: 3px solid rgba(255,0,122,.75);
}
html, body { height: 100%; }

/* Section: Global & Layered Background (mobile-first) */
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(255,0,122,.08), rgba(255,214,0,.08) 60%, rgba(0,0,0,.0) 100%),
    /* diagonal hot-pink lines */
    repeating-linear-gradient(-45deg, rgba(255,0,122,.22) 0 2px, rgba(255,0,122,0) 2px 8px),
    /* subtle horizontal scanlines */
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 2px),
    #05060c;
  min-height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }

/* Section: Layout Helpers (Container / Grid / Card) */
.container { width: min(92%, 1100px); margin: 0 auto; padding: 0 0.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Core Typography */
:root { --flow: clamp(14px, 1.2vw, 16px); }
html { font-size: 16px; }
body { font-feature-settings: "kern" 1; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; color: #fff; }
h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 1.2vw + .8rem, 1.75rem); color: #fff; margin-top: .75rem; }
p { margin: .6rem 0; color: #e8e8f5; font-size: clamp(14px, 1.1vw, 16px); }

/* Section: Global Element Styles (required selectors) */
html, body, header, nav, main, article, footer, aside { }

.image-frame, .image-frame img { }

.image-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  background: #111;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Glass Panels (frosted glass) with fallback */
.glass, .content, .product-ad {
  background: rgba(18,18,28,.22);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: .9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass, .content, .product-ad { 
    background: rgba(18,18,28,.88); /* stronger fallback for no backdrop-filter */
  }
}
.header-glow { text-shadow: 0 0 6px rgba(255,0,122,.8); }

/* Section: Header / Hero */
header {
  padding: 2rem 1rem;
  text-align: center;
}
header h1 { font-size: clamp(1.8rem, 2.5vw + 1rem, 2.8rem); margin: .25rem 0 .25rem; }
header .meta { color: var(--muted); font-size: clamp(0.85rem, 0.8vw + .6rem, 1rem); }

/* Section: Main content styling */
main { padding: 1rem; }
article { max-width: clamp(720px, 90%, 1100px); margin: 0 auto; }

/* Section: Utility & Components */
.content { margin: 0.5rem 0 1rem; }
ul, ol { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Buttons & Links (interactive states) */
a, button, .btn, .cta { cursor: pointer; color: #fff; text-decoration: none; border-radius: 8px; }

/* Primary button / outline variants */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.25rem; border: 1px solid rgba(255,255,255,.42); background: linear-gradient(135deg, rgba(255,0,122,.95), rgba(255,0,122,.75)); font-weight: 700; transition: transform .15s ease, background .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--outline { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* Primary CTA & general CTA usage */
.cta { display: inline-flex; gap: .5rem; align-items: center; padding: .75rem 1rem; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.25); font-weight: 700; }
.cta:hover { background: rgba(255,255,255,.08); }

/* Focus styles (WCAG AA) */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a:focus-visible, button:focus-visible { outline-offset: 2px; outline: 3px solid var(--accent); }

/* Section: Badges / Tags */
.tag { display: inline-block; padding: .15rem .5rem; font-size: .75rem; border-radius: 999px; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); }

/* Section: Footer / Ad blocks */
footer { padding: 1.5rem 1rem; display: grid; gap: .75rem; grid-template-columns: 1fr; justify-items: center; text-align: center; }
.product-ad, .sponsored-page { min-width: 0; width: 100%; }

/* Rule: Make any generic text inside a glass panel legible on dark backdrop */
.glass, .content, .product-ad { color: #f6f6ff; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  header, main, footer { page-break-after: avoid; }
  a { text-decoration: underline; }
}

/* Section: Responsiveness helpers */
@media (min-width: 640px) {
  .container { padding-left: 0.75rem; padding-right: 0.75rem; }
}
@media (min-width: 860px) {
  article { padding: 1.25rem; }
  .grid { gap: 1.25rem; }
}

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