:root {
  --bg: #0a0f1a;
  --bg-2: #11172a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #eaf6ff;
  --muted: #b6c6d9;
  --accent: #8a2130;        /* burgundy */
  --accent-2: #5dc6ff;       /* pastel blue */
  --card: rgba(255, 255, 255, 0.08);
  --focus: rgba(93, 198, 255, 0.9);
  --radius: 14px;
  --shadow: 0 8px 26px rgba(0,0,0,.25);
  --shadow-soft: 0 4px 14px rgba(0,0,0,.20);
}

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

html, body {
  height: 100%;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  padding: 0;
}

/* Layered background: gradient + pastel lens-flare scatter + subtle scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(97,198,255,.28) 0 8px, transparent 8px),
    radial-gradient(circle at 68% 22%, rgba(180,210,255,.22) 0 10px, transparent 10px),
    radial-gradient(circle at 32% 72%, rgba(180,120,255,.18) 0 12px, transparent 12px),
    radial-gradient(circle at 88% 60%, rgba(110,220,255,.15) 0 14px, transparent 14px);
  background-size: 40px 40px, 50px 50px, 70px 70px, 90px 90px;
  mix-blend-mode: screen;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 1px, rgba(0,0,0,0.03) 1px 2px);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
  opacity: 0.25;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 72ch, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: var(--shadow-soft);
}

/* Typography scale (fluid) */
h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: .2px;
  margin: .25rem 0;
}
h1 {
  font-size: clamp(2rem, 2.2vw + 1rem, 3.5rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.25rem, 1.2vw + .9rem, 2rem);
  font-weight: 700;
}
h3 {
  font-size: clamp(1rem, 1vw + .6rem, 1.25rem);
  font-weight: 600;
}
p {
  font-size: clamp(0.95rem, 0.9vw + 0.8rem, 1.125rem);
  line-height: 1.6;
  color: var(--text);
  margin: 0.75rem 0;
}
ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  padding: 0;
}
li {
  margin: 0.25rem 0;
  color: var(--text);
}
blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid rgba(109, 196, 255, 0.6);
  background: rgba(9, 12, 28, 0.28);
  border-radius: 8px;
  color: var(--text);
}

/* Glassy surfaces (fallback supported) */
header, main, aside, footer {
  background: rgba(10, 12, 28, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  backdrop-filter: saturate(1.1) blur(12px);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  padding: 1rem;
  margin: 1rem auto;
}
header { text-align: center; padding: 1.75rem 1rem; }
main { padding: 1rem 1rem 2rem; }
footer { padding: 1rem; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Fallback for non-supporting browsers (no backdrop-filter) */
@supports not (backdrop-filter: blur(1px)) {
  header, main, aside, footer {
    background: rgba(14, 16, 38, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.40);
  }
}

/* Header content alignment and navigation */
header h1 { margin: 0 0 .25rem; font-weight: 800; color: var(--text); }
header .meta { margin: 0; font-size: .9rem; color: var(--muted); }

/* Navigation links appearance */
nav a {
  color: var(--accent-2);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  display: inline-block;
}
nav a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Image frame styles */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: rgba(255,255,255,.08);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Content layout helpers */
.content { color: var(--text); }

/* Buttons and links in theme */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  outline: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: linear-gradient(135deg, rgba(140, 33, 48, 0.95), rgba(120, 14, 28, 0.95));
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(160, 40, 60, 0.95), rgba(110, 12, 28, 0.95)); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 999px; }

/* Outline variant for buttons/cta */
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: var(--text);
}
.btn--outline:hover {
  background: rgba(255,255,255,.08);
}

/* Link emphasis states */
a:focus-visible, a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  outline-offset: 2px;
}

/* Utility elements */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(138,33,48,.75);
  border: 1px solid rgba(255,255,255,.25);
}

ul { padding-left: 1.25rem; }

/* Product ad styling (footer sections) */
.product-ad, .sponsored-page {
  display: block;
  padding: .85rem;
  border-radius: 12px;
  background: rgba(9,12,28,.34);
  border: 1px solid rgba(255,255,255,.28);
  text-align: center;
}
.product-ad a, .sponsored-page a { color: #fff; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Print-friendly adjustments */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; border: none; }
  a { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  body::before { opacity: 0.65; }
}

/* Minor container content animation (GPU-friendly) */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
main article { animation: fadeInUp .32s ease both; }

/* Structural element defaults (to satisfy selector requirements) */
aside { display: block; }

/* Ensure core sections get a readable baseline on small screens */
@media (min-width: 0px) {
  header, main, footer { padding: 1rem; }
}
