/* Base Palette & Typographic System */
:root {
  --bg: #0b1020;
  --bg-2: #14172a;
  --text: #eaf2ff;
  --muted: #a6b4d6;
  --accent: #8a2be2;        /* violet */
  --accent-2: #b6ff00;      /* lime neon */
  --glass: rgba(20, 20, 40, 0.22);
  --glass-2: rgba(40, 0, 80, 0.28);
  --border: rgba(255, 255, 255, 0.24);
  --shadow: 0 8px 28px rgba(0,0,0,.38);
  --focus: 0 0 0 3px rgba(182, 255, 0, 0.8);
  --radius: 14px;
  --text-on-glass: #f6fdff;
}
:root {
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: 
    radial-gradient(circle at 20% 0%, rgba(125, 255, 0, 0.08) 0 40%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(140, 0, 255, 0.10) 0 40%, transparent 40%),
    linear-gradient(135deg, #0b0f1a 0%, #140b20 60%, #0b0f1a 100%);
  /* Subtle firefly noise/scanlines (pure CSS) */
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  background-blend-mode: overlay;
  /* Layered background allowed; prefers-color-scheme overrides below */
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-2: #e9ecf7;
    --text: #0b1020;
    --muted: #4b5563;
    --accent: #6d28d9;
    --accent-2: #16a34a;
    --glass: rgba(255,255,255,0.85);
    --glass-2: rgba(255,255,255,0.95);
    --border: rgba(0,0,0,0.15);
    --shadow: 0 6px 18px rgba(0,0,0,.12);
    --text-on-glass: #0a1020;
  }
  html, body {
    background: linear-gradient(135deg, #f8f7ff 0%, #eef2ff 60%, #f4f7ff 100%);
    color: var(--text);
    background-blend-mode: normal;
  }
  @supports (backdrop-filter: blur(4px)) {
    .glass { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  }
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.header, header { padding: 1.75rem 0; text-align: center; }
main { padding: 1rem 0 2rem; display: block; }

/* Type & hero hierarchy */
h1 {
  font-size: clamp(1.6rem, 2.6vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 0 12px rgba(140,255,0,.5);
}
p { color: var(--muted); margin: 0.25rem 0 0; }
.hero { display: grid; gap: .75rem; justify-items: center; padding: 0 0 1rem; }
.brand-glow {
  color: var(--text-on-glass);
  text-shadow: 0 0 14px rgba(140,255,0,.6);
  font-weight: 600;
}

/* Glass panels (content + promos) */
.glass { 
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(8px)) {
  .glass { background: rgba(20,20,40,.7); }
}
.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: #000;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.02);
}
footer { padding: 1.25rem 0; text-align: center; color: var(--muted); }

/* Content targets */
.content { display: grid; gap: .75rem; }

/* Specific selectors required by page */
.image-frame, .image-frame img { display: block; max-width: 100%; }

/* Product ad blocks in footer */
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(14, 16, 32, 0.28);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, background .25s ease;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); background: rgba(14,16,32,.38); }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }
.product-ad:focus-visible, .sponsored-page:focus-visible { outline: none; box-shadow: var(--focus); border-color: rgba(140,255,0,.9); }

/* Link & button treatment */
a, button { color: inherit; text-decoration: none; }
a:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; padding: 2px; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-2); }
button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  padding: .55em 1.05em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.3);
  background: linear-gradient(#1b1f2e, #0e1220);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, background .25s ease, border-color .25s ease;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(140,255,0,.8);
  color: var(--text);
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:active, .btn:active, .cta:active { transform: translateY(0); }

/* Lists & tags */
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0; padding: 0; }
.tag {
  display: inline-flex; align-items: center; gap: .25em;
  padding: .25em .5em; border-radius: 999px;
  background: rgba(139,92,246,.25);
  border: 1px solid rgba(139,92,246,.55);
  color: #e9e0ff;
  font-size: .8rem;
}

/* Utility layout helpers */
@media (min-width: 640px){
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px){
  main { padding: 2rem 0 3rem; }
  .container { padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  .glass, .image-frame { background: #fff; border: 1px solid #ccc; box-shadow: none; }
  a, button { color: #000; }
}
