/* Base tokens */
:root {
  --bg: #050b1a;
  --bg-2: #0b1a2b;
  --surface: rgba(3, 8, 20, 0.28);
  --surface-2: rgba(4, 14, 28, 0.60);
  --text: #eaffff;
  --muted: #9bd9e6;
  --accent: #2af5e3;
  --accent-2: #00e7ff;
  --border: rgba(0, 255, 235, 0.40);
  --shadow: 0 10px 28px rgba(0,0,0,.40);
  --radius: 12px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fbff;
    --bg-2: #e8f0f7;
    --surface: rgba(255,255,255,0.92);
    --surface-2: rgba(255,255,255,0.98);
    --text: #0b1b2e;
    --muted: #3b4d63;
    --accent: #1b5a63;
    --accent-2: #0b8ea9;
    --border: rgba(0,0,0,.15);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* Layered background: gradient + subtle scanlines */
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background: 
    radial-gradient(circle at 20% 0%, rgba(0, 255, 235, 0.10), transparent 40%),
    linear-gradient(135deg, rgba(5,10,25,.95), rgba(5,10,25,.92) 60%, rgba(5,10,25,.95) 100%),
    radial-gradient(circle at 70% 20%, rgba(0, 180, 200, .08), transparent 40%);
  background-blend-mode: normal, overlay, overlay;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Subtle navy dots texture via CSS to achieve a "dot-grid" vibe without images */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0, 255, 235, 0.15) 1px, transparent 1px),
    radial-gradient(circle at 2px 2px, rgba(0,0,0,0.0) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
  opacity: 0.08;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Layout containers */
.container {
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(12px);
}
.backdrop {
  background: rgba(7, 17, 30, 0.28);
  border: 1px solid rgba(0, 255, 235, 0.35);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(10px)) {
  .backdrop { background: rgba(7, 17, 30, 0.80); }
}

/* Global typography scale (fluid) */
html { font-size: 16px; }
h1, h2, h3 { margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }
h1 { font-size: clamp(1.5rem, 4vw + 0.5rem, 2.6rem); line-height: 1.15; }

/* Core element styles we must target */
html, body, header, nav, main, article, footer, aside {
  /* structural selectors - no extra rules needed here beyond defaults already defined */
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 235, 0.4);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: rgba(0,0,0,.25);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Glass panels for headers/sections where applicable */
header {
  display: grid;
  place-items: center;
  padding: 1.25rem 0;
}
header h1 {
  background: rgba(3, 11, 22, 0.40);
  border: 1px solid rgba(0, 255, 235, 0.35);
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  text-align: center;
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
@media (prefers-color-scheme: light) {
  header h1 {
    background: rgba(255,255,255,0.85);
    color: var(--text);
  }
}

/* Main content area */
main { padding: 1rem 0; }

/* Footer / ad sections */
footer {
  padding: 1rem 0 2rem;
}
.product-ad, .sponsored-page {
  display: inline-block;
  min-width: 180px;
  margin: 0.25rem;
}
.product-ad a, .sponsored-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 235, 0.42);
  background: rgba(2, 8, 20, 0.5);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); background: rgba(2, 8, 20, 0.65); text-decoration: none; }
footer p {
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
  margin: .75rem 0 0;
}

/* Link/CTA styling and accessibility */
a, button, .btn, .cta {
  color: var(--accent);
  text-decoration: none;
  border-radius: 999px;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 999px;
}
a:hover { text-decoration: underline; color: var(--accent-2); }

/* List defaults (to satisfy ul, li selector styling) */
ul { margin: 0; padding: 0; list-style: none; }
li { display: inline-flex; margin-right: .5rem; }

/* Utility */
.container, .grid, .card, .tag { }
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(0, 255, 235, 0.58);
  color: #04141a;
}
@media (prefers-color-scheme: light) {
  .tag { background: rgba(12, 120, 140, 0.65); color: #062027; }
}

/* Buttons (solid and outline variants) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .95rem;
  border: 1px solid rgba(0, 255, 235, 0.45);
  border-radius: 999px;
  background: rgba(2,8,20,0.6);
  color: var(--text);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(2, 255, 235, 0.9), rgba(0, 230, 235, 0.75));
  color: #041414;
  border: 1px solid rgba(0,0,0,.15);
}
.btn:hover { transform: translateY(-1px); }

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