html, body, header, nav, main, article, footer, aside { box-sizing: border-box; }

:root {
  /* Palette derived from maroon sunset + violet accents */
  --bg: #0b0b0f;
  --bg-2: #1a001a;
  --text: #e9e1f7;
  --muted: #c9b9d9;
  --accent: #7a3fbb;
  --accent-2: #ff6f91;

  /* Glass/frosted panel tokens */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-border-strong: rgba(255, 255, 255, 0.4);

  /* Layout tokens */
  --radius: 12px;
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 14px rgba(122, 0, 180, 0.35);
}

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

html { height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  background: 
    /* gradient layer: maroon sunset to violet gloss */
    linear-gradient(135deg, #3a0a0f 0%, #2a0b1f 40%, #1b0030 100%),
    /* subtle violet glow accents */
    radial-gradient(circle at 20% 10%, rgba(122, 0, 180, 0.25), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(138, 54, 255, 0.20), transparent 40%);
  background-blend-mode: normal, overlay, overlay;
  position: relative;
  /* Noise/scanline overlay (pure CSS) via layered patterns in a pseudo-element below content */
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* fine scanlines + subtle noise feel */
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Layout helpers */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #000;
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0); /* GPU hint for smoother transforms */
}
.content {
  padding: 0;
  margin: 0;
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(122, 0, 180, 0.25);
  color: #f9f2ff;
  border: 1px solid rgba(122, 0, 180, 0.6);
}
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  border: none;
  background: transparent;
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .65rem 1.15rem;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  letter-spacing: .2px;
  transition: transform .15s ease, background .2s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); background: #6b2cc8; }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  color: var(--text);
}
.cta {
  font-weight: 700;
  letter-spacing: .2px;
}
a.btn, button.btn { text-decoration: none; }

/* Typography & headings */
header {
  padding: 2rem 1rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw + 0.5rem, 3.2rem);
  line-height: 1.15;
  letter-spacing: .2px;
  color: #f9f6ff;
  text-shadow: 0 0 10px rgba(138, 54, 255, 0.8);
}
main {
  display: grid;
  place-items: center;
  padding: 1rem 0 2rem;
}
section { display: block; }

/* Footer / product ad blocks */
.product-ad, .sponsored-page {
  display: block;
  padding: .8rem;
  margin: .5rem 0;
  text-align: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.product-ad p, .sponsored-page p { margin: 0; font-size: 1rem; }
footer { padding: 1.5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }

/* Navigation (presentational if used) */
nav { display: none; }

/* Accessibility helpers */
ul { padding-left: 0; margin: 0; list-style: none; }
li { margin: 0; }

/* Print styles (readable) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
}
@media (prefers-color-scheme: light) {
  :root {
    --text: #0b0b0f;
    --muted: #4b4b4b;
    --glass: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0,0,0,.15);
  }
  body {
    background: linear-gradient(135deg, #f7f5fb 0%, #eef6ff 100%);
  }
  header h1 {
    color: #1a1a1a;
    text-shadow: 0 0 6px rgba(0,0,0,.15);
  }
  .product-ad, .sponsored-page { background: rgba(255,255,255,.95); border-color: rgba(0,0,0,.15); }
  .image-frame { border-color: rgba(0,0,0,.15); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}