/* Section: Base tokens and background */
:root {
  --bg: #0a0b14;
  --bg-2: #0b1220;
  --text: #eaf6ff;
  --muted: #a6b7cf;
  --accent: #ff2db6;       /* neon pink */
  --accent-2: #4cc9ff;     /* neon blue */
  --panel: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 26px rgba(0,0,0,.4);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(76, 217, 255, 0.65);
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.25);
}

html, body { height: 100%; }

/* Section: Global layout and layered background (mobile-first) */
html, body, header, nav, main, article, footer, aside {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 0, 180, .15), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(0, 180, 255, .12), transparent 40%),
    linear-gradient(135deg, rgba(5,5,15,.95), rgba(8,12,28,.95));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle scanlines / noise overlay for neon cyberpunk vibe */
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 2px),
    linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.0));
  mix-blend-mode: overlay;
  opacity: .6;
  z-index: 0;
  /* respects prefers-reduced-motion */
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Section: Layout helpers */
.container {
  max-width: clamp(320px, 86vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(76, 217, 255, .22);
  border: 1px solid rgba(76, 217, 255, .55);
  color: #eaffff;
}

/* Section: Typography and hero pattern */
h1, h2, h3 {
  margin: 0.25rem 0;
  font-weight: 700;
}
h1 {
  font-size: clamp(1.8rem, 2.4vw + 1rem, 3rem);
  line-height: 1.15;
  letter-spacing: .2px;
}
h2 {
  font-size: clamp(1.25rem, 1.6vw + .8rem, 2rem);
  line-height: 1.25;
}
h3 {
  font-size: clamp(1rem, 1.2vw + .6rem, 1.25rem);
  color: var(--muted);
}
p { margin: .5rem 0 1rem; }

/* Section: Glass panels (fallback if backdrop-filter not available) */
.header-panel, .article-panel, .footer-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .header-panel, .article-panel, .footer-panel {
    background: rgba(255,255,255,.15);
  }
}

/* Section: Page structure styling (selectors required) */
html, body { scroll-behavior: smooth; }

/* header, nav, main, article, aside styling (mobile-first) */
header {
  padding: 1rem;
  margin: 0 auto 1rem;
}
header h1 { margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: .92rem; margin-bottom: .5rem; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color .2s ease, background .2s ease;
}
nav a:hover { text-decoration: underline; text-underline-offset: 2px; background: rgba(255,255,255,.04); }
nav a:focus-visible { outline: none; box-shadow: var(--focus); }

/* main content area */
main { padding: 0 0 2rem; }

/* article content (neon glass hero + text) */
article {
  display: block;
  margin: 0 auto;
  padding: 1rem;
  max-width: 900px;
  /* glass panel look for article */
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  margin: 0 auto 1rem;
  background: #000;
  display: block;
}
.image-frame, .image-frame img, .featured-image, .featured-image img {
  height: 100%; width: 100%; object-fit: cover;
}
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  display: block;
}
.image-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* .content utility (if used) */
.content { padding: .75rem; }

/* section: product ad styling in footer */
footer {
  padding: 1rem 0 2rem;
}
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  margin: .25rem 0;
  text-align: center;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .2s ease;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }

/* anchor and button styling (CTA rules) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: .5rem .95rem;
  display: inline-block;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; background: transparent; }
.btn {
  background: var(--accent);
  color: #08131e;
  border: 1px solid rgba(255,255,255,.6);
  padding: .6rem 1.05rem;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #ff5790; }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(76, 217, 255, .8);
  color: var(--text);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(76, 217, 255, .9);
  outline-offset: 2px;
}
a.cta {
  display: inline-flex; align-items: center; gap: .5ch;
  padding: .6rem 1rem;
  background: linear-gradient(135deg, rgba(255,45,182,.85), rgba(0, 0, 0, .0));
  border: 1px solid rgba(255,255,255,.6);
}
a:hover { text-decoration: underline; }

/* list styling */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* footer text and layout helper grid for ads */
footer .grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Section: accessibility and print */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}