:root {
  /* Palette: midnight blue foundation with neon blue accents */
  --bg: #0a1020;
  --bg-2: #0b1a32;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #eaf4ff;
  --muted: #a6c4ff;
  --accent: #4af0ff;
  --accent-2: #7afaff;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  --radius: 14px;
  --focus: 2px solid var(--accent-2);
}

html, body {
  height: 100%;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 2vw, 18px);
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--text);
  background-color: #000;
  /* Layered background: gradient + scanlines + subtle glow/noise */
  background-image:
    linear-gradient(135deg, rgba(6,12,30,.96), rgba(10,14,38,.96)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 15%, rgba(0,180,255,.08), transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(0,100,180,.06), transparent 35%);
  background-blend-mode: overlay, overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  padding: 1rem;
  box-sizing: border-box;
  overflow-x: hidden;
  letter-spacing: .2px;
}

/* 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 {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

/* Glass panels (frosted) for structural sections */
header, nav, main, article, aside, footer {
  background: rgba(12, 18, 40, 0.6);
  border: 1px solid rgba(80, 160, 255, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@supports not (backdrop-filter: blur(12px)) {
  header, nav, main, article, aside, footer {
    background: rgba(12, 18, 40, 0.8);
  }
}

/* Section-specific tweaks for layout consistency */
header {
  display: grid;
  gap: .5rem;
  align-items: start;
  justify-items: start;
  margin: 1rem auto;
  max-width: clamp(320px, 90vw, 1100px);
}
header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}
nav {
  display: flex;
  gap: .6rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 8px;
  border: 1px solid rgba(74,240,255,.45);
  font-weight: 600;
}
nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  color: var(--accent-2);
  outline: none;
}

/* Main content layout */
main {
  display: grid;
  place-items: start center;
  padding: 1rem 0;
}
article {
  width: 100%;
  max-width: clamp(320px, 90vw, 900px);
  padding: 0;
  margin: 0;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  background: #0a0a0a;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
@media (prefers-reduced-motion: reduce) {
  .image-frame, header, main, footer { transition: none; animation: none; }
}

/* Footer and product ads / content blocks */
footer {
  padding: 1rem 0;
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
  max-width: clamp(320px, 90vw, 1100px);
  margin: 1rem auto 0;
}
.product-ad, .sponsored-page {
  padding: .75rem;
  display: block;
  text-align: center;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .9rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 240, 255, .5);
  background: rgba(0, 180, 255, 0.25);
  color: #001018;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover,
.product-ad a:focus-visible, .sponsored-page a:focus-visible {
  text-decoration: underline;
  background: rgba(0, 180, 255, 0.38);
  transform: translateY(-1px);
}
footer p {
  text-align: center;
  color: var(--muted);
  margin: .5rem 0 0;
}
@media (min-width: 720px) {
  footer {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .sponsored-page { text-align: right; }
}

/* Utility tokens */
.content { padding: .5rem 0; color: var(--text); }
ul, li { margin: 0; padding: 0; list-style: none; }

/* Modern interaction helpers for links and buttons */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  font: inherit;
  cursor: pointer;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Buttons (solid and outline) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: #021018;
  font-weight: 700;
  text-shadow: none;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: #2beaff; }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(74,240,255,.6);
}
.btn--outline:hover { background: rgba(74,240,255,.15); }

/* Image frame helper class for potential multiple images */
.image-frame--small { aspect-ratio: 4/3; }

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