/* Base & Theme Tokens */
:root{
  --bg: #0b0b12;
  --bg-2: #1a1020;
  --panel: rgba(255,255,255,0.08);
  --panel-strong: rgba(255,255,255,0.18);
  --text: #e9e6f8;
  --muted: #c5bfd0;
  --accent: #b58aff;
  --accent-2: #8e6dff;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --shadow-soft: 0 4px 12px rgba(0,0,0,.25);
  --focus: 2px solid #fff;
  --outline: 0 0 0 3px rgba(181, 138, 255, 0.4);
  --glass-border: 1px solid rgba(255,255,255,.25);
}

html, body { height: 100%; }
html, body { margin: 0; padding: 0; color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: linear-gradient(135deg, rgba(14,8,22,.95), rgba(16,10,24,.95) 60%),
              linear-gradient(to bottom right, rgba(255,255,255,.04), rgba(255,255,255,0) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
html, body { font-synthesis: none; }

/* Layered background: subtle holographic noise & scanlines */
html::before,
html::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; }
html::before {
  /* soft holographic parches (silver/purple) */
  background: radial-gradient(circle at 20% 0%, rgba(180,140,255,.25), transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(120,60,255,.25), transparent 40%);
  mix-blend-mode: screen;
  opacity: .6;
}
html::after {
  /* subtle scanlines overlay */
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  opacity: .25;
  mix-blend-mode: overlay;
  filter: saturate(0.9);
}

/* Layout scaffolding */
.container { width: 100%; max-width: clamp(640px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Typography scale (fluid) */
h1, h2, h3 { line-height: 1.15; margin: .4em 0; }
h1 { font-size: clamp(2rem, 4vw + .5rem, 3.75rem); font-weight: 700; letter-spacing: .4px;
     text-shadow: 0 0 14px rgba(181,138,255,.6); color: #f8f6ff; }
h2 { font-size: clamp(1.25rem, 2.5vw, 2rem); color: #f6f3ff; margin-top: .6rem; }
p { font-size: clamp(0.95rem, 1.6vw, 1.05rem); line-height: 1.6; color: var(--text); margin: .9rem 0; }
blockquote { margin: .9rem 0; padding: .6rem 1rem; border-left: 3px solid var(--accent); color: #f2eaff;
             background: rgba(0,0,0,.15); border-radius: 6px; }

/* Glass panels (with fallback) */
.panel, .card, .product-ad { background: var(--panel); border: var(--glass-border);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1rem; position: relative; z-index: 1; }

/* Backdrop blur with graceful fallback for older browsers */
.panel { backdrop-filter: blur(12px) saturate(1.2); }
@supports not (backdrop-filter: blur(12px)) {
  .panel { background: rgba(255,255,255,.18); backdrop-filter: none; }
}
.image-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content container for article text blocks (glass-friendly) */
.content { padding: 1rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.15);
           background: rgba(255,255,255,.04); }

/* Navigation / header basics */
header { padding: 2rem 1rem; text-align: center; display: grid; gap: .5rem; place-items: center; position: relative; z-index: 1; }
header h1 { color: #f1edff; font-weight: 800; margin: 0; }
header .meta { color: var(--muted); font-size: 0.95rem; }

/* Main content area */
main { padding: 1rem; display: grid; gap: 1.25rem; justify-items: center; position: relative; z-index: 1; }

/* Article body tweaks for readability on glass */
article { max-width: clamp(640px, 90vw, 860px); width: 100%; }

/* Utility & components */
.tag { display: inline-block; font-size: .75rem; padding: .25rem .5rem; border-radius: 999px;
       background: rgba(181,138,255,.25); border: 1px solid rgba(181,138,255,.6); color: #fff; }

/* Button & link styling (interactive states) */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(122, 88, 255, .25);
  padding: .6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
a { display: inline-block; }
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; background: rgba(122, 88, 255, .34); transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* CTA variants (primary/secondary) */
.btn { background: linear-gradient(135deg, rgba(181,138,255,.95), rgba(120,80,255,.95)); border: none; }
.btn.secondary { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.38); }

/* Footer / ad sections */
footer { padding: 2rem 1rem; display: grid; gap: 1rem; justify-items: center; text-align: center; }
.product-ad, .sponsored-page { width: min(680px, 92%); }
.product-ad a, .sponsored-page a { display: block; padding: .5rem 0; color: #fff; text-decoration: none; }

/* Lists */
ul, li { margin: 0; padding: 0 0 0 1.25rem; }
li { margin: .25rem 0; }

/* Print styles (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  header, main, footer { padding: 0; }
  .panel, .card { background: #fff; border: none; box-shadow: none; }
  a, button { color: #000; text-decoration: underline; }
}

/* Layout helpers (compact without external assets) */
@media (max-width: 720px) {
  header { padding: 1.5rem 1rem; }
  .image-frame { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}