:root {
  --bg: #0b0f14;
  --bg-2: #0b1e1f;
  --text: #e8ffff;
  --muted: #a8d7d7;
  --accent: #00e6c4;
  --accent-2: #ff2f97;
  --glass: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.25);
  --ring: #7fffd4;
  --shadow: 0 8px 20px rgba(0,0,0,.45);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7fbfd;
    --bg-2: #eef7f7;
    --text: #0b1a1a;
    --muted: #526868;
    --glass: rgba(255,255,255,.88);
    --glass-border: rgba(0,0,0,.15);
    --shadow: 0 6px 16px rgba(0,0,0,.08);
  }
}

html, body {
  height: 100%;
}
html, body, header, nav, main, article, footer, aside {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: clamp(14px, 1.2vw + 12px, 18px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}

/* Layered background: teal crosshatch + magenta accents + subtle scanlines */
html {
  background-image:
    linear-gradient(135deg, rgba(0,230,196,.08) 25%, transparent 25%),
    linear-gradient(225deg, rgba(0,230,196,.08) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,47,151,.08) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,47,151,.08) 25%, transparent 25%),
    linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,.9) 70%, rgba(0,0,0,.95));
  background-size: 40px 40px;
  background-position: 0 0, 20px 0, 0 20px, 20px 20px, 0 0;
}
html::after {
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle noise-like overlay and scanlines (pure CSS) */
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  opacity: .25;
  mix-blend-mode: overlay;
  z-index: 0;
}
:focus { outline: none; }

/* Layout helpers */
.container {
  max-width: clamp(320px, 82vw, 1100px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  grid-gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tag {
  display:inline-block;
  padding:.25rem .6rem;
  border-radius:999px;
  font-size:.75rem;
  border:1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: var(--text);
}
ul { margin: 0; padding: 0; list-style: none; }
li { margin: .25rem 0; }

/* Global typography refinements */
h1, h2, h3 {
  margin: 0 0 .6rem;
  line-height: 1.1;
}
h1 {
  font-size: clamp(1.8rem, 2.4vw + 1rem, 2.8rem);
}
p { margin: 0 0 1rem; color: var(--muted); }

/* Header / hero */
header {
  padding: 1.25rem 1rem;
  text-align: center;
}
header h1 {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw + 1rem, 2.6rem);
  letter-spacing: .2px;
  margin: .25rem 0 0;
  color: var(--text);
}
header .subtitle {
  font-size: clamp(.95rem, 0.8vw + .9rem, 1.15rem);
  color: var(--muted);
  margin-top: .25rem;
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(0,0,0,.25);
  display: block;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.002);
}
.image-frame::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: linear-gradient(to right, rgba(0,255,255,.0), rgba(0,255,255,.25), rgba(0,255,255,.0));
  mix-blend-mode: overlay;
  pointer-events: none;
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .glass {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
} 

/* Content area */
.main {
  padding: 1rem 1rem 2rem;
}
.content { display: grid; gap: .75rem; }

/* Product ad / footer-like panels (glass panels) */
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  text-align: left;
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }
.product-ad a, .sponsored-page a { color: inherit; text-decoration: none; display: block; }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* CTA / links / buttons */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: .6rem 0.9rem;
  border-radius: 8px;
  transition: transform .2s ease, color .2s ease, background .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; }

/* Variants */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, rgba(0,230,196,.95), rgba(0,230,196,.75));
  color: #041414;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.15);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

/* Outlined action */
.outline {
  background: transparent;
  border: 1px solid rgba(0,230,196,.85);
  color: var(--text);
}
.outline:hover { background: rgba(0,230,196,.12); }

/* Utility spacing helpers (compact) */
.mt-0 { margin-top: 0; }
.mt { margin-top: .5rem; }
.mb { margin-bottom: .5rem; }

/* Footer / Aside */
footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}
footer .product-ad, footer .sponsored-page { display: inline-block; width: auto; margin: .25rem; }

/* Accessibility + readability tweaks for dark mode */
@media (prefers-color-scheme: light) {
  html, body { background: var(--bg); }
  header, main, footer { color: var(--text); }
  .image-frame { border-color: rgba(0,0,0,.25); }
  .product-ad, .sponsored-page { background: rgba(255,255,255,.8); color: #062028; border-color: rgba(0,0,0,.15); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print styles (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  .image-frame { page-break-inside: avoid; }
  a, .btn { color: #000; }
}
