/* Base tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #141a22;
  --surface: rgba(14, 22, 32, 0.22);
  --surface-2: rgba(17, 25, 38, 0.28);
  --text: #eaf6ff;
  --muted: #b7c8e6;
  --accent: #7bdfff;
  --accent-2: #9bd7ff;
  --card: rgba(12, 20, 30, 0.40);
  --border: rgba(255, 255, 255, 0.28);
  --focus: rgba(123, 223, 255, 0.85);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 12px;
  --gap: 1rem;
}

/* Global / Layout */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { position: relative; min-height: 100%; }
body { 
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  line-height: 1.5;
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  z-index: 1;
  padding: 1rem;
  display: block;
  min-height: 100%;
}

/* Layered background: gradient + pastel stars + scanlines (pure CSS) */
html::before,
html::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
html::before {
  background:
    radial-gradient(circle at 15% 20%, rgba(120,180,255,.18) 0 22%, transparent 22%),
    radial-gradient(circle at 70% 40%, rgba(100,160,255,.14) 0 18%, transparent 18%),
    radial-gradient(circle at 50% 75%, rgba(60,120,255,.12) 0 14%, transparent 14%),
    linear-gradient(135deg, #0b0f14 0%, #141a22 60%, #0b0f14 100%);
  background-blend-mode: screen, screen, screen, normal;
}
html::after {
  background-image: 
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  opacity: .25;
  mix-blend-mode: overlay;
}
@media (prefers-color-scheme: light) {
  html::before { opacity: .8; }
  html::after { opacity: .15; }
}
@media (prefers-reduced-motion: reduce) {
  html::before, html::after { animation: none; transition: none; }
}
body { background: transparent; }

/* Glass / frosted panels (fallback included) */
header, nav, main, article, aside, footer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  header, nav, main, article, aside, footer {
    background: rgba(8,12,20,.82);
  }
}
section { display: block; }

/* Containers & layout utilities */
.container {
  max-width: clamp(320px, 90vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .95rem;
  min-height: 0;
  display: block;
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(123,223,255,.42);
  background: rgba(0,0,0,.15);
  color: var(--text);
}
.content { padding-block: .5rem; }

/* Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 0 8px rgba(123,223,255,.25), 0 6px 18px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.00);
  transition: transform .25s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Typography & headings (responsive) */
h1, h2, h3, h4 { color: var(--text); margin: .25rem 0 .5rem; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 3.5vw, 3.0rem); line-height: 1.15; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h3 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }

/* Links & interactive elements */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1rem);
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.6em 1.0em;
  display: inline-block;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  text-align: center;
}
a:hover, .btn:hover, .cta:hover, button:hover { text-decoration: none; transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus);
  position: relative;
  z-index: 2;
}
a:focus, a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }

/* Button variants */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5ch; padding-inline: 1rem; padding-block: .6rem; border-radius: 999px; }
.btn--solid {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #062033;
  border-color: rgba(0,0,0,.25);
  font-weight: 600;
}
.btn--outline {
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(123,223,255,.65);
  color: var(--text);
}
.btn:focus-visible, .cta:focus-visible { outline: none; }

/* Content area defaults */
header { margin-bottom: 1rem; padding: 1rem 1rem; }
header h1 { margin: .25rem 0 .25rem; }

/* Footer / product ad blocks */
.product-ad, .sponsored-page {
  display: block;
  padding: .6rem;
  text-align: center;
  border-radius: 10px;
  margin: .5rem 0;
  background: rgba(8,12,20,.28);
  border: 1px solid rgba(123,223,255,.28);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; font-weight: 600; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Lists */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Accessibility helpers */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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