:root {
  --bg: #0b0033;
  --bg-2: #2a0050;
  --bg-3: #4b2c8f;
  --text: #ffffff;
  --muted: #cbd5e1;
  --accent: #7e5aff;
  --accent-2: #a78bfa;
  --glass: rgba(255,255,255,0.08);
  --glass-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
}

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

html, body { height: 100%; }

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-3), var(--bg), rgba(0,0,0,.25));
  background-blend-mode: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle scanlines (CSS-only) */
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* soft grain via CSS noise-like overlays */
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.04) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.03) 0 2px, transparent 2px);
  background-size: 60px 60px, 80px 80px;
  mix-blend-mode: overlay;
  opacity: 0.25;
}

.container {
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}

header, main, footer { position: relative; z-index: 1; }

/* Glass panels */
.card,
.content,
.product-ad,
header,
aside {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.backdrop { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Layout primitives */
.grid { display: grid; gap: 1rem; }

/* Typography */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; color: #fff; }
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3rem); letter-spacing: .4px; }
h2 { font-size: clamp(1.25rem, 1.8vw + .8rem, 2rem); }

/* Header styling */
header {
  padding: 1.25rem;
  text-align: center;
  margin: .75rem auto;
}
header h1 { color: #fff; margin-bottom: .25rem; font-size: clamp(1.75rem, 3vw + 0.5rem, 3rem); }
header .meta { color: var(--muted); font-size: .92rem; }

/* Featured image area */
.featured-image { margin: 1rem 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.featured-image img { width: 100%; height: auto; display: block; }

/* Article content */
article { padding: 1rem; }
article p { margin: .75rem 0; color: #f8faff; }
article ul { padding-left: 1.25rem; margin: .5rem 0; }
article li { margin: .25rem 0; }

/* Optional image frame (for future usage) */
.image-frame { aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* Content wrapper for sections (if used) */
.content { padding: 1rem; }

/* Product ad styling in footer */
.product-ad { padding: .75rem; margin: .5rem 0; text-align: center; }
.product-ad a { display: block; padding: .75rem; border-radius: 10px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(168,85,247,.9));
}
.product-ad a:hover { filter: brightness(1.05); }

/* Utility classes */
.card { padding: .75rem; }

/* Links and buttons */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  font: inherit;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}
a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Buttons variants */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, box-shadow .2s;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 0;
  box-shadow: 0 6px 16px rgba(124,58,237,.5);
}
.btn.primary:hover { transform: translateY(-1px); }
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}

/* Small helpers */
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  header { padding: .9rem; }
  .product-ad { padding: .5rem; }
}

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

@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; }
  a { text-decoration: underline; }
}