/* Section: Global Theme & Layered Background */
:root {
  --bg: #1b0a1b;
  --bg-2: #2a0f3a;
  --text: #e9f4ff;
  --muted: #a9b4cc;
  --accent: #39ff14;
  --accent-2: #0ff07a;
  --glass: rgba(16, 0, 40, 0.22);
  --glass-border: rgba(120, 0, 120, 0.4);
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 70%);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Layered background: subtle noise/scanlines via gradients */
  background-image:
    radial-gradient(circle at 20% -10%, rgba(0,255,120,.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(0,255,120,.06), transparent 40%),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08) 2px, transparent 2px, transparent 4px);
  background-size: cover;
  background-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  opacity: .9;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Section: Layout Utilities */
.container {
  width: 100%;
  max-width: clamp(640px, 85vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}

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

.card { /* reusable glassy card */
  background: rgba(16, 0, 40, 0.28);
  border: 1px solid rgba(120, 0, 120, 0.4);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(16,0,40,0.58); }
}

.image-frame, .featured-image { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); background: #000; }

.image-frame { aspect-ratio: 16 / 9; }
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.content { padding: 0.75rem 0; }

/* Section: Core Elements */
header, nav, main, article, aside, footer {
  display: block;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  background: rgba(16, 0, 40, 0.28);
  border: 1px solid rgba(120, 0, 120, 0.4);
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

header h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}

header .meta {
  font-size: clamp(0.75rem, 2.5vw, 0.95rem);
  color: var(--muted);
}

nav {
  margin-top: .5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  border-color: rgba(57,255,20,.6);
}

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

/* Typography & content structure */
h2, h3 { color: var(--text); margin: .75rem 0 .5rem; }
p { margin: 0 0 1rem; color: var(--text); }
ul, li { color: var(--text); }
blockquote {
  margin: .5rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: rgba(0,0,0,.1);
  border-radius: 6px;
}
ol { padding-left: 1.25rem; }

/* Lists and inline helpers */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(57,255,20,.15);
  color: var(--text);
  border: 1px solid rgba(57,255,20,.4);
  margin-right: .25rem;
}

/* Section: CTAs & Interaction */
a, button, .btn, .cta {
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
a { color: #eafff0; text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { text-decoration: underline; }

/* Primary & secondary CTAs */
.btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: var(--accent);
  color: #041f0a;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn.outline:hover { background: rgba(255,255,255,.08); }

/* Focus treatment for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Structural panels as glassy blocks (used by header/footer/product-ad) */
header, footer, .card, .product-ad {
  background: rgba(16, 0, 40, 0.28);
  border: 1px solid rgba(120, 0, 120, 0.4);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Product ad section in footer (additional styling if needed) */
.product-ad {
  text-align: center;
  padding: .75rem 1rem;
  margin: .5rem 0;
  border-radius: 12px;
}

/* Print accessibility */
@media print {
  body { background: #fff; color: #000; }
  a, .btn { text-decoration: none; color: inherit; }
  .container { max-width: 100%; padding: 0; }
}