/* Base tokens */
:root {
  --bg: #0b0b14;
  --bg-2: #14101f;
  --text: #e9e0ff;
  --muted: #c6b8e6;
  --accent: #8a5fff;
  --accent-2: #b26cff;
  --glass: rgba(255,255,255,.08);
  --glass-strong: rgba(255,255,255,.16);
  --border: rgba(170,140,210,.38);
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --radius: 12px;
  --focus: 0 0 0 3px rgba(138,95,255,.65);
  --text-on-dark: #f8f4ff;
}

/* Reset-ish, box model */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  background: #0b0b14;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, rgba(60,0,80,.85) 0%, rgba(20,0,40,.85) 60%, rgba(10,0,20,.85) 100%);
  /* subtle chrome-like vignette */
  filter: saturate(1.1);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* subtle scanlines / noise via dual gradients */
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 100%),
    linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 100%);
  background-size: 100% 2px, 2px 100%;
  opacity: .25;
  pointer-events: none;
}

/* Layout container utility */
.container { width: 100%; max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Glass panels (modern frosted look) */
header, main, article, aside, footer {
  background: rgba(16, 12, 34, 0.28);
  border: 1px solid rgba(160, 140, 210, 0.38);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}

/* Header specifics */
header { text-align: center; padding: 1.5rem 1rem; margin: 0; }
header h1 { font-size: clamp(1.6rem, 3.5vw + 0.4rem, 3rem); line-height: 1.08; margin: 0 0 .25rem; color: var(--text); }
header .meta { color: var(--muted); font-size: .85rem; margin: 0 0 .5rem; }

/* Nav styling inside header */
nav { margin-top: .25rem; }
nav a { color: #e8e0ff; padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); }
nav a:hover { text-decoration: underline; }

/* Main content */
main { padding: 1rem 0; }

/* Featured image frame with proper framing */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* Content wrapper inside article (glass panel feel) */
.content { font-size: clamp(0.95rem, 0.8vw + 0.75rem, 1.05rem); line-height: 1.6; }

/* Article headings */
article h2, article h3 { color: var(--text); margin: .75rem 0; }

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

/* Card utility for compact panels (glass look) */
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: .75rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* Product ad /Sponsored sections (footer area) */
.product-ad, .sponsored-page {
  display: block;
  margin: .25rem 0;
  padding: .5rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(138,95,255,.20);
}
.product-ad a, .sponsored-page a { color: var(--text-on-dark); }

/* Link/button styling and variants */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  padding: .65rem 1rem;
  display: inline-block;
  font-weight: 600;
  background: var(--accent);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
a:hover, button:hover, .btn:hover, .cta:hover { background: #7a4bd9; transform: translateY(-1px); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}
a:focus-visible { text-decoration: underline; }

/* Utility classes (grid, card, tag) */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); border-radius: 12px; padding: .75rem; }

/* Tag pills */
.tag {
  display: inline-block;
  padding: .15em .5em;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(138,95,255,.65);
  background: rgba(138,95,255,.25);
  color: #fff;
}

/* Responsive grid behavior */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  main { padding: 1.25rem 0; }
}

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

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; border: none; padding: 0; }
  .image-frame { page-break-inside: avoid; }
}

/* Accessibility fallback if backdrop-filter unsupported */
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer {
    background: rgba(16, 12, 34, 0.66);
    border-color: rgba(140,120,200,.6);
  }
}