/* Base & Palette */
:root{
  --bg: #1a0a3f;
  --bg-2: #2a0a3f;
  --text: #e9e0ff;
  --muted: #c6b5ff;
  --accent: #a55cff;
  --accent-2: #d4a373;
  --glass: rgba(18, 12, 34, 0.28);
  --glass-2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.28);
  --focus: 2px solid rgba(214, 206, 255, 0.8);
  --ring: 0 0 0 3px rgba(214, 206, 255, 0.6);
}

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

/* Layered background: gradient + subtle noise/scanline */
html, body { height: 100%; }
html { color-scheme: dark; }
body{
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #2a0058 0%, #1b0a3d 40%, #281a55 70%, #2a1444 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100%;
}
body::before{
  content: "";
  position: fixed;
  inset: 0;
  /* subtle glow shapes */
  background-image:
    radial-gradient(circle at 20% 20%, rgba(214, 206, 255, 0.10), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(212, 163, 108, 0.08), transparent 40%),
    linear-gradient(0deg, rgba(255,255,255,0.04) 0 2px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 0 2px, transparent 2px);
  background-size: 100% 100%, 100% 100%, 4px 4px, 4px 4px;
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: overlay;
  border: 0;
}
@media (prefers-reduced-motion: reduce){
  body::before{ display: none; }
}
@supports not (backdrop-filter: blur(12px)){
  body { background: linear-gradient(135deg, #2a0058 0%, #1b0a3d 100%); }
}

/* Layout primitives */
.container{ max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Header / Typography */
header{ padding: 1rem 0; text-align: center; }
header h1{ font-size: clamp(1.6rem, 2.4vw + 1rem, 2.6rem); margin: .25rem 0 0.5rem; letter-spacing: .2px; }
nav{ display: flex; justify-content: center; gap: .5rem; }
nav a{ padding: .4rem .75rem; border-radius: 999px; text-decoration: none; color: var(--text); border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.25); }

/* Main content & glass panels */
main{ display: grid; justify-items: center; padding: 1rem 0 2rem; }
.article{ width: 100%; }

/* Image frame with aspect ratio + glow */
.image-frame{
  width: min(100%, 860px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.25);
  box-shadow: 0 10px 25px rgba(0,0,0,.28);
  display: block;
}
.image-frame img{
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.image-frame:hover img{ transform: scale(1.02); }

/* Glass panel styling (fallback if backdrop-filter unavailable) */
.product-ad,
.sponsored-page{
  width: min(100%, 860px);
  padding: .8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  text-align: center;
}
@supports not (backdrop-filter: blur(12px)) {
  .product-ad, .sponsored-page{ background: rgba(18,12,34,0.75); }
}
.product-ad a, .sponsored-page a{
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(122, 65, 238, 0.25);
}
.product-ad a:hover, .sponsored-page a:hover{ text-decoration: underline; }

/* Link & button treatments */
a, button, .btn, .cta{
  color: var(--text);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, transform .2s ease, border-color .2s ease;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cta:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  outline-offset: 2px;
}
a:hover, button:hover, .btn:hover, .cta:hover{
  text-decoration: underline;
  color: var(--accent-2);
}
.btn, .cta{ display:inline-block; padding:.55rem 1rem; border-radius:8px; border:1px solid rgba(255,255,255,.32); background: rgba(162,110,255,.75); color: #fff; }

/* Content helpers */
.content{ padding: .75rem 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
ul, li{ margin:0; padding:0; list-style: none; }

/* Grid & Cards utilities */
.grid{ display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card{ background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Tag */
.tag{ display:inline-block; padding:.25rem .5rem; border-radius:999px; font-size:.75rem; background: rgba(255,255,255,.15); color: var(--text); }

/* Aside (if present) */
aside{ display: block; }

/* Footer tweaks */
footer{ padding: 1rem 0; text-align: center; color: var(--muted); }

/* Print styles */
@media print{
  body{ background: white; color: black; }
  a{ color: black; text-decoration: underline; }
}
  
/* Accessibility helpers for motion */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
