:root{
  --bg: #0b002a;
  --bg-2: #1a0050;
  --text: #e8e0ff;
  --muted: #c7a4ff;
  --accent: #ff3ecf;
  --accent-2: #a64dff;
  --glass: rgba(255,255,255,0.08);
  --glass-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  background: linear-gradient(135deg, #120033 0%, #0a0033 60%, #0b001a 100%);
  background-blend-mode: normal;
  color: var(--text);
  position: relative;
  z-index: 0;
  overflow-x: hidden;
}

/* Sand-dune violet ripple + subtle noise/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255, 0, 170, .15) 0 20%, transparent 40px),
    radial-gradient(circle at 65% 30%, rgba(160, 0, 255, .15) 0 22%, transparent 40px),
    linear-gradient(135deg, rgba(20,0,50,.25), rgba(0,0,0,.0) 60%);
  opacity: 0.8;
  mix-blend-mode: overlay;
  /* subtle grain/lines */
  background-size: 120px 120px, 120px 120px, 100% 100%;
  background-repeat: repeat, repeat, no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

*, *::before, *::after { box-sizing: border-box; }

.container,
header, main, footer, article, aside {
  max-width: clamp(320px, 92vw, 1100px);
  margin: 0 auto;
  padding: 0.75rem;
}

/* Glass panels (fallback if backdrop-filter unsupported) */
header,
main,
footer,
.article-glass,
section.product-ad,
section.sponsored-page,
aside {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, section.product-ad, section.sponsored-page {
    background: rgba(255,255,255,.12);
  }
}

/* Layout blocks */
header { padding-block: 1rem; }
main { padding-block: 1.25rem; }
footer { padding-block: 1rem; display: grid; gap: 1rem; }

/* Hero / Header typography */
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.4rem, 1rem + 2.2vw, 2.4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  font-size: 0.82rem;
  color: rgba(230,226,255,.85);
  margin: 0;
}

/* Article content styling */
article { padding: 0.5rem; }

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

h1 + p { margin-top: .5rem; }

/* Article heading hierarchy inside content */
article h1 {
  font-size: clamp(1.6rem, 1.2rem + 3vw, 3rem);
  line-height: 1.15;
  margin: .75rem 0 0.5rem;
  color: var(--text);
}

p, li { color: rgba(230,226,255,.95); }
ul, ol { padding-left: 1.25rem; margin-top: .25rem; margin-bottom: .75rem; }
li { margin: .25rem 0; }

/* Image frame helper class for potential alternate markup */
.image-frame { border-radius: 12px; }

/* Content container helper (optional) */
.content { padding: 0.75rem; }

/* Utility: grid, card, tag */
.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,.25);
  border-radius: .75rem;
  padding: .75rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #fff;
  background: linear-gradient(135deg, #ff3ecf 0%, #a64dff 100%);
}

/* Links, buttons, CTAs, focus states with high contrast */
a,
button,
.btn,
.cta {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  outline: none;
  transition: opacity .2s ease, transform .15s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
button,
.btn,
.cta {
  display: inline-block;
  padding: .55em .9em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.45);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.6);
}
.btn:active,
.cta:active { transform: translateY(1px); }

/* Footer panels (ad + sponsor) styling consistency */
.product-ad,
.sponsored-page {
  display: block;
  text-align: center;
}
.product-ad a,
.sponsored-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: .5em .75em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.25);
  color: #fff;
}
.product-ad p,
.sponsored-page p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.2;
}

/* Print styles for basic readability */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
@media (min-width: 860px) {
  /* Slightly denser layout on wide screens */
  .container { padding: 0 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
