:root {
  --bg: #0a0f14;
  --bg-2: #111923;
  --text: #e9f2ff;
  --muted: #a9b7d9;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --accent: #ffd74a;
  --accent-2: #fff07a;
  --shadow: 0 8px 26px rgba(0,0,0,.5);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid rgba(255, 215, 74, 0.95);
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { color-scheme: dark light; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  line-height: 1.5;
  color: var(--text);
  background: 
    radial-gradient(circle at 20% 0%, rgba(180,210,255,.25), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(255,230,120,.22), transparent 28%),
    linear-gradient(135deg, #0a0f14 0%, #111524 40%, #0a0f14 100%);
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Subtle noise/scanline overlay (pure CSS) */
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: .55;
}
header, nav, main, article, aside, footer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  max-width: min(1100px, 92vw);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header { text-align: center; padding: 1.75rem 1rem; }
header h1 { margin: .25rem 0 .25rem; font-size: clamp(1.75rem, 4vw + 0.5rem, 3.5rem); letter-spacing: .2px; color: var(--text); }
header .meta { margin: 0; font-size: .9rem; color: var(--muted); }

main { padding: 1rem; }
article { padding: 1rem; margin: 0; }
.featured-image { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); margin-bottom: .75rem; }
.featured-image img { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 16/9; }

h2 { font-size: clamp(1.4rem, 2.5vw + 1rem, 2.4rem); color: var(--text); margin: .75rem 0; }
h3 { font-size: clamp(1.1rem, 2vw + .6rem, 1.4rem); color: var(--text); margin: .5rem 0; }
p { color: var(--muted); margin: .6rem 0; }
blockquote {
  margin: .9rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  color: var(--text);
}
ul { padding-left: 1.25rem; margin: .6rem 0; color: var(--muted); }
li { margin: .25rem 0; }

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

.content { padding: 0.75rem 0; }

.product-ad {
  display: block;
  padding: .8rem;
  margin: .6rem 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  text-align: center;
}
.product-ad a { color: var(--text); text-decoration: none; display: inline-block; width: 100%; }
.product-ad p { margin: 0; font-weight: 600; }

footer { display: grid; gap: .75rem; padding: 1rem; }

.sponsored-page { display: block; padding: .8rem; margin: .6rem 0; text-align: center; background: rgba(0,0,0,.25); border-radius: 12px; border: 1px solid rgba(255,255,255,.25); }
.sponsored-page a { color: var(--text); text-decoration: none; }

a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
button { font: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.1rem; border-radius: 999px;
  background: var(--accent);
  color: #1b1b1b;
  font-weight: 700;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: #ffd83a; }
.btn:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 2px; }

.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.38);
  color: var(--text);
}
.btn.outline:hover { background: rgba(255,255,255,.05); }

.cta { padding: .65rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08); color: var(--text);
}
.cta:hover { background: rgba(255,255,255,.14); color: #111; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: .75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tag {
  display:inline-block;
  padding:.15rem .55rem;
  border-radius:999px;
  font-size:.75rem;
  background: rgba(255, 215, 0, .15);
  color: var(--accent);
  border: 1px solid rgba(255, 214, 0, .4);
}

/* Layout helpers (utility-like) */
.container {
  width: 100%;
  max-width: clamp(640px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid, .card, .tag, .container { min-width: 0; }

/* Desktop refinements */
@media (min-width: 720px) {
  header, main, footer { padding: 1.25rem 1.25rem; }
  header { padding-top: 1.75rem; }
}

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

/* Light mode adjustments for legibility */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7fb;
    --bg-2: #f0f2f7;
    --text: #0b1020;
    --muted: #4a5470;
    --surface: rgba(255,255,255,0.88);
    --surface-2: rgba(255,255,255,0.95);
    --border: rgba(0,0,0,0.12);
    --accent: #b8860b;
    --accent-2: #8b6f00;
  }
  body {
    background: linear-gradient(#f7f7fb, #f0f2f7);
    color: var(--text);
  }
  header, nav, main, aside, article, footer {
    background: rgba(255,255,255,.80);
    border: 1px solid rgba(0,0,0,.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .image-frame { border-color: rgba(0,0,0,.15); }
  .product-ad, .sponsored-page { background: rgba(255,255,255,.95); }
  a, button { color: var(--text); }
}
@media print {
  body { background: white; color: black; }
  a { color: blue; text-decoration: underline; }
}