/* Palette & Theme */
:root {
  --bg: #0b0a1a;
  --bg-2: #141028;
  --text: #e9e6ff;
  --muted: #b6a6d9;
  --accent: #7c3aed;
  --accent-2: #4f46e5;
  --glass: rgba(15, 12, 34, 0.22);
  --glass-2: rgba(15, 12, 34, 0.28);
  --border: rgba(124, 58, 237, 0.45);
  --shadow: 0 8px 26px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f3ff;
    --bg-2: #ece7ff;
    --text: #0b0a1a;
    --muted: #55536b;
    --accent: #6d28d9;
    --accent-2: #2563eb;
    --glass: rgba(255,255,255,0.72);
    --glass-2: rgba(255,255,255,0.86);
    --border: rgba(99, 102, 241, 0.4);
    --shadow: 0 6px 18px rgba(0,0,0,.08);
  }
}

/* Global & Layered Background (gradient + subtle scanlines/noise) */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
}
body {
  margin: 0;
  color: var(--text);
  min-height: 100svh;
  background-color: var(--bg);
  background-image:
    /* subtle scanlines / noise */
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    /* violet-indigo gradient layer */
    linear-gradient(135deg, rgba(87, 19, 110, 0.95), rgba(18, 12, 60, 0.92) 60%, rgba(12, 9, 32, 0.95));
  background-blend-mode: normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* Layout primitives */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tag {
  display: inline-block;
  padding: .25em .5em;
  font-size: .75rem;
  border-radius: 999px;
  color: #eaffff;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(124, 58, 237, 0.55);
}
header, nav, main, article, aside, footer {
  display: block;
  width: 100%;
}
header, main, footer, aside, article {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin: .75rem 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.image-frame {
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16/9;
  margin: 1rem auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.6);
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.product-ad a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.6);
  background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(79,70,229,0.9));
  color: #fff;
  text-decoration: none;
  gap: .5rem;
}
.product-ad {
  display: grid;
  place-items: center;
  padding: .75rem;
}
.sponsored-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, rgba(59,130,246,0.85), rgba(99,102,241,0.85));
  color: #fff;
  text-decoration: none;
  gap: .5rem;
}
.sponsored-page { text-align: center; padding: .75rem; }

/* Typography & hero */
h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw + 0.5rem, 2.6rem);
  line-height: 1.08;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
header { padding: 1.25rem; text-align: center; }

/* Interactive elements */
.btn, button, .cta {
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.6);
  color: #fff;
  background: linear-gradient(135deg, rgba(124,58,237,0.95), rgba(67,56,202,0.95));
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover, button:hover, .cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(124,58,237,0.5);
}
.btn:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* Form controls (presentational) */
input, select, textarea {
  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;
}

/* Lists & utilities */
ul { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Content panel scaffolding (kept for spec compatibility) */
.content { padding: 0.75rem; }

/* Decorative elements with glass look applied to main regions as needed */
main { padding: 1rem; }

/* Responsive behavior */
@media (max-width: 720px) {
  .image-frame { border-radius: 10px; }
  header, main, footer, aside, article { padding: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer, aside, article { background: transparent; border: none; box-shadow: none; }
}
