:root {
  --bg: #0b0a14;
  --bg-2: #1a0f2a;
  --surface: rgba(255, 255, 255, 0.14);
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: #f8f4ff;
  --muted: #c7b6d8;
  --accent: #8a5cff;
  --accent-2: #ff6bd6;
  --ring: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.28);
}

/* Base / reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 25% 20%, rgba(138, 92, 255, .28) 0 180px, transparent 180px),
    radial-gradient(circle at 75% 60%, rgba(255, 110, 210, .25) 0 220px, transparent 220px),
    linear-gradient(135deg, #0a0720 0%, #140b24 40%, #0a0a14 100%);
  background-blend-mode: screen, screen, normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}
body::before,
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; }

/* Subtle orbital ring texture (soft noise/scan) */
body::before {
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.05) 0 2px, transparent 2px) 0 0 / 60px 60px;
  opacity: .45;
  mix-blend-mode: overlay;
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  body::before { opacity: .75; }
}
body::after {
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0, rgba(0,0,0,.04) 1px, transparent 1px, transparent 2px);
  opacity: .25;
  mix-blend-mode: overlay;
  filter: saturate(120%);
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(138,92,255,.18);
  color: #f6eaff;
  border: 1px solid rgba(138,92,255,.45);
}

/* Global typography tweaks for responsiveness */
h1, h2, h3 { margin: 0 0 .5rem 0; font-weight: 700; }
h1 {
  font-size: clamp(2rem, 4vw + 0.5rem, 4rem);
  line-height: 1.04;
  letter-spacing: .2px;
}
h2 { font-size: clamp(1.25rem, 1.5vw + 1rem, 2.25rem); }
h3 { font-size: clamp(1rem, 1vw + .9rem, 1.25rem); }
p { color: var(--muted); margin: 0 0 1rem 0; }

/* Header / hero styling (glass panel feel) */
header {
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
  padding: 1.75rem 0;
  margin: 0 auto 1rem;
  width: min(1100px, 92%);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  header {
    background: rgba(255,255,255,.88);
    color: #0a0a0a;
  }
}
header h1 { margin-top: .25rem; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
header .meta { font-size: .92rem; color: #e7d8ff; opacity: .95; }

/* Navigation */
nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
nav a:hover, nav a:focus { text-decoration: underline; outline: none; }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Main content & article */
main { padding: 1rem 0; }
article { display: grid; gap: 1rem; }

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

/* Content container within article (content class) */
.content { padding: 0; }

/* Sectioned content / common blocks styling */
section { padding: .75rem; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.22); }
section + section { margin-top: .5rem; }

/* Ordered list groups for steps */
ol { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Glass panels (fallback for non-backdrop-support) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(255,255,255,.88); border-color: rgba(255,255,255,.95); }
}

/* Product ad in footer */
.product-ad {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  margin: .25rem;
  text-align: center;
}
.product-ad a { color: var(--text); text-decoration: none; display: block; }
.product-ad a:hover, .product-ad a:focus { text-decoration: underline; }

/* Footer styling */
footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.20);
  background: rgba(0,0,0,.15);
}
footer p { margin: .5rem 0; color: var(--muted); }

/* Sponsored / extra footer sections */
footer .sponsored-page { display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); }
footer .sponsored-page a { color: var(--text); text-decoration: none; }

/* Forms (basic controls) */
input, textarea, select, button {
  font: inherit;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  padding: .5rem .75rem;
}
button, .btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: .5rem;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: #7a4aff; }
.btn:active, .cta:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* Focus states for interactive elements (accessible) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-color: rgba(255,255,255,.9);
  border-radius: 6px;
}

/* Accessibility helpers for contrasts on glass text over blur */
@media (prefers-contrast: more) {
  :root { --text: #fff; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, footer { display: block; }
  a { text-decoration: underline; color: #000; }
}
