:root{
  /* Theme tokens (neon blue / turquoise palette) */
  --bg: #040b1a;
  --bg-2: #021522;
  --text: #e8fbff;
  --muted: #9de7ff;
  --accent: #00e5ff;
  --accent-2: #00ffd0;
  --glass: rgba(255,255,255,0.10);
  --glass-2: rgba(0,0,0,0.25);
  --border: rgba(255,255,255,0.30);
  --shadow: 0 8px 28px rgba(0,0,0,0.35);
}

html, body, header, nav, main, article, aside, footer {
  box-sizing: border-box;
}

html, body { height: 100%; }

/* Layered, mobile-first background (gradient + scanline) */
html {
  background: linear-gradient(135deg, rgba(0,229,255,0.25), rgba(0,255,208,0.25) 60%, rgba(0,0,0,0) 60%), #020614;
  color: var(--text);
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  background-attachment: fixed;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle scanlines + soft glow overlay (pure CSS) */
  background:
    linear-gradient(135deg, rgba(0,224,255,0.20), rgba(0,255,208,0.20) 60%, rgba(0,0,0,0) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.9;
  border-radius: 0;
}
@media (prefers-reduced-motion: reduce) {
  html::before { display: none; }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
}
a, button, .btn, .cta {
  text-decoration: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
ul, li { margin: 0; padding: 0; list-style: disc inside; }
li { margin: .25rem 0; }

/* Typography */
h1, h2, h3 { margin: .25rem 0 0.5rem; line-height: 1.25; font-weight: 700; }
p { margin: 0.5rem 0 1rem; }
h1 { font-size: clamp(1.4rem, 1.2rem + 2vw, 2.4rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 0.8vw + 1rem, 1.75rem); }
h3 { font-size: clamp(1rem, 0.6vw + 0.9rem, 1.25rem); }

/* Glass panels (fallback included) */
.header-glass, .article-glass, .footer-glass, .panel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .header-glass, .article-glass, .footer-glass, .panel {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.35);
  }
}

/* Header */
header {
  padding: 1.25rem;
  text-align: center;
}
header h1 { color: #eaffff; letter-spacing: .4px; }
header .meta { font-size: .9rem; color: #cfefff; opacity: .95; margin-top: .25rem; }

/* Nav */
nav {
  display: inline-flex;
  gap: .5rem;
  padding-top: .5rem;
}
nav a {
  padding: .5em 0.9em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: var(--text);
}
nav a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Main & Article content */
main { padding: 0 0.5rem 1.5rem; position: relative; z-index: 1; }
article {
  max-width: clamp(320px, 92vw, 900px);
  margin: 0 auto;
  padding: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.featured-image { width: 100%; display: block; margin: 1rem auto; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.35); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.featured-image img { width: 100%; height: auto; display: block; object-fit: cover; }

/* Image frame variant (for required selectors) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 880px;
  margin: 1rem auto;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content helper (as required selector) */
.content { padding: 0; margin: 0; }

/* Product ad / footer sections */
.product-ad, .sponsored-page {
  display: block;
  width: min(100%, 420px);
  text-align: center;
  padding: .5rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,.25);
  margin: .25rem auto;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; padding: .7rem; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Primary / secondary CTAs (solid and outline variants) */
.btn, .cta {
  display: inline-block;
  padding: .65em 1.05em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #eaffff;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  user-select: none;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04171b;
  border: 1px solid rgba(0,0,0,.15);
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(0, 230, 255, 0.95);
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 0.9; }

/* Focus visibility for accessibility */
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
a:focus-visible { text-decoration: underline; }

/* List styling for clarity and contrast on glass */
ul { padding-left: 1.25rem; }
ul li { margin: .25rem 0; }

/* Print styles: basic readability */
@media print {
  body, header, nav, main, article, footer { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
}
@media (min-width: 0) and (max-width: 799px) {
  header { padding: .9rem; }
  article { padding: .9rem; }
}

/* Reduced motion fallback */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
