/* Base tokens */
:root {
  --bg: #0a0a12;
  --bg-2: #0f1020;
  --text: #e6f0ff;
  --muted: #a5b4d6;
  --accent: #ff0bf6;
  --accent-2: #2ff0d6;
  --glass: rgba(11,14,22,.28);
  --glass-2: rgba(11,14,22,.18);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --focus: #8ff5ff;
  --card: rgba(255,255,255,.04);
  --bg-noise: rgba(255,0,255,.05);
  --tag: rgba(47, 240, 214, .18);
  --tag-border: rgba(47, 240, 214, .4);
}

/* Section: Reset-ish + base typography */
* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, #0b0d14 0%, #141522 60%, #0b0d14 100%),
    repeating-linear-gradient(to bottom, rgba(255,0,255,.04) 0 2px, transparent 2px 4px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  min-height: 100%;
}

/* Section: Light mode fallback palette (prefers-color-scheme) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7fb;
    --bg-2: #ffffff;
    --text: #0b0b10;
    --muted: #444;
    --accent: #8b1fa9;
    --accent-2: #0b8b75;
    --glass: rgba(255,255,255,.85);
    --glass-2: rgba(255,255,255,.65);
    --border: rgba(0,0,0,.15);
    --shadow: 0 6px 18px rgba(0,0,0,.15);
    --focus: #166d7f;
  }
  body {
    background:
      linear-gradient(135deg, #f6f7fb 0%, #f0f4ff 60%, #f6f7fb 100%),
      repeating-linear-gradient(to bottom, rgba(21, 50, 70, .04) 0 2px, transparent 2px 4px);
  }
}

/* Section: Layout primitives */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-block: 0.75rem;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Section: Structural elements styling (apply to provided selectors) */
html, body, header, nav, main, article, footer, aside { }

/* Header / Hero */
header {
  padding: 2rem 1rem;
  text-align: center;
  display: grid;
  gap: .5rem;
  place-items: center;
  margin: 0 auto;
  max-width: 980px;
  border-radius: 14px;
  background: rgba(11,14,22,.3);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}
header h1 {
  font-size: clamp(1.8rem, 4vw + 1rem, 3.75rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: .5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
header .meta {
  font-size: .9rem;
  color: var(--muted);
}

/* Featured media block */
.featured-image {
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #000;
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content blocks */
.content { padding: 0.75rem 0; color: var(--text); }

/* Headings & text blocks */
h2 { color: var(--text); margin: 0.75rem 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }

/* Paragraphs & lists */
p { margin: 0.75rem 0; }
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Blockquote styling for emphasis */
blockquote {
  margin: .75rem 0;
  padding: .5rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(2,6,20,.25);
  border-radius: 6px;
}

/* Links & interactive elements */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent); }
:focus { outline: none; }

button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 0.6em 1.1em;
  background: rgba(0,0,0,.25);
  color: #fff;
  transition: transform .15s ease, background .2s ease;
}
.btn { background: linear-gradient(135deg, rgba(255,0,255,.9), rgba(0,255,214,.9)); border: 1px solid rgba(255,255,255,.6); }
.cta { background: rgba(0,0,0,.4); }
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }

.btn:focus-visible, .cta:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Ad & footer sections */
.product-ad, .sponsored-page {
  display: inline-block;
  width: calc(50% - 0.5rem);
  vertical-align: middle;
}
.product-ad { text-align: center; padding: .75rem; border-radius: 12px; background: rgba(12,18,28,.45); border: 1px solid rgba(255,255,255,.25); margin: .25rem; }
.product-ad a { color: var(--text); text-decoration: none; display: inline-block; padding: .3rem .5rem; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); }
.sponsored-page { text-align: center; }

/* Footer layout */
footer { padding: 1.5rem 1rem; border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; }

/* Utility: tag chip */
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: var(--tag);
  color: #bafff0;
  border: 1px solid var(--tag-border);
}

/* Image glow variant (optional helper) */
.image-frame--glow {
  box-shadow: 0 0 12px 4px rgba(0,255,216,.4) inset;
}

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

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
