html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background-image:
    radial-gradient(circle at 20% 0, rgba(123,0,255,0.25), transparent 40%),
    linear-gradient(135deg, rgba(60,0,100,0.78) 0%, rgba(6,0,20,0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  background-size: 100% 100%, cover, 2px 2px;
  background-blend-mode: overlay;
}

:root {
  --bg: #0b0039;
  --bg-2: #1a0038;
  --text: #e9e0ff;
  --muted: #c6b4ff;
  --accent: #7c3aed;    /* neon purple */
  --accent-2: #b388ff;  /* lighter accent for focus */
}

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

.container {
  max-width: clamp(520px, 86vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}

header, footer, main, article, aside {
  width: 100%;
}

/* Glass/frosted panels with graceful fallbacks */
:where(header, main, footer, article, aside, .card, .product-ad) {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  -webkit-backdrop-filter: blur(12px);
}

header {
  text-align: center;
  padding: 1.25rem 1rem;
  margin: 1rem auto;
  background: rgba(20, 0, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

header h1 {
  font-size: clamp(1.6rem, 1.8rem + 1.2vw, 2.8rem);
  line-height: 1.15;
  margin: 0.25rem 0 0.5rem;
  color: var(--text);
}

header .meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

nav {
  margin-top: 0.5rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  border-color: rgba(255,255,255,0.4);
}

main {
  padding: 0;
  margin: 0 auto;
}

.featured-image {
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* content helpers */
.content { padding: 0.75rem 0 1rem; color: var(--muted); }

h2, h3 { color: var(--text); margin-top: 1rem; }
p { color: var(--text); margin: 0.5rem 0 1rem; }

ul, ol { padding-inline-start: 1.25rem; margin: 0.75rem 0 1rem; color: var(--text); }
li { margin: 0.25rem 0; }

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

.card {
  padding: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  color: var(--text);
}

.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #fff;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(124, 58, 237, 0.55);
}

/* content blocks in article */
.product-ad, .sponsored-page {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  width: 100%;
}
footer {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
  margin: 1rem auto;
}

/* links and controls */
a, button, .btn, .cta {
  cursor: pointer;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

/* button styles (solid and outline variants) */
.btn {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(124,58,237,0.8);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(124,58,237,0.8);
}
.btn--outline:hover {
  background: rgba(124,58,237,0.12);
}

/* forms (basic) */
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-color: rgba(124,58,237,0.8);
}

/* responsive typography elsewhere */
main { padding: 0; }

/* print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
}

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (min-width: 0) {
  /* Small screens layout tweaks if needed in future */
}
aside { display: none; }

/* base layout tweaks for structure on narrow viewports */
@media (min-width: 700px) {
  header { padding: 1.5rem 1.25rem; }
  .container { padding-inline: 0; }
}
