:root {
  --bg: #031e1f;
  --bg-2: #041f22;
  --text: #eafff7;
  --muted: #a6f0e0;
  --accent: #1ffbd6;      /* bright turquoise */
  --accent-2: #2bdc86;    /* emerald green */
  --panel: rgba(3, 18, 20, 0.55);
  --panel-2: rgba(3, 18, 20, 0.40);
  --glow: 0 8px 28px rgba(0, 255, 230, 0.25);
  --border: rgba(0, 255, 235, 0.45);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 14px;
  --focus: 2px solid var(--accent);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100%;
  background: 
    radial-gradient(circle at 20% 0%, rgba(0, 255, 235, 0.25), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(0, 255, 214, 0.20), transparent 40%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, #04191b 100%);
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle layered background: noise/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* soft turquoise glow over gradient */
  background: radial-gradient(circle at 15% 10%, rgba(0, 255, 235, 0.25), transparent 30%),
              radial-gradient(circle at 85% 0%, rgba(0, 255, 200, 0.18), transparent 40%);
  mix-blend-mode: screen;
  filter: saturate(1.15);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* faint scanlines for cyberpunk texture */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,0.04) 0 1px, transparent 1px 2px);
  opacity: 0.25;
  mix-blend-mode: overlay;
  /* keeps CPU usage low; no heavy filters */
}

/* Layout helpers */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  line-height: 1;
  border: 1px solid rgba(0, 255, 235, 0.5);
  background: rgba(0, 255, 235, 0.15);
  color: var(--text);
}

/* Typography: fluid and accessible */
h1, h2, h3 { margin: 0.5rem 0 0.25rem; line-height: 1.15; font-weight: 700; }
p { margin: 0.25rem 0 0.7rem; color: rgba(234, 255, 248, 0.92); }
ol, ul { margin: 0.75rem 0 1rem 1.25rem; color: rgba(234,255,248,.92); }
li { margin: 0.25rem 0; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* Accessibility: focus visibility */
:focus-visible {
  outline: var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}
button, [type="button"], [type="submit"] {
  font: inherit;
  cursor: pointer;
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border: 1px solid rgba(0, 255, 235, 0.5);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
button:hover, [type="button"]:hover { transform: translateY(-1px); background: rgba(0,0,0,0.32); }
button:active, [type="button"]:active { transform: translateY(0); }
.btn, .cta { display: inline-block; text-align: center; text-decoration: none; }

/* Primary/secondary button variants */
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: 0;
  color: #001a15;
  padding: 0.6rem 1.15rem;
}
.btn.secondary {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(0,255,235,.5);
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(0,255,235,.5);
}
.btn:hover { filter: brightness(1.05); }

/* Glass panels: main sections use frosted glass look with graceful fallbacks */
header, main, footer, aside, article {
  background: rgba(3, 18, 20, 0.42);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 255, 235, 0.45);
  box-shadow: var(--glow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem;
  position: relative;
  overflow: clip;
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article {
    background: rgba(3, 18, 20, 0.72);
  }
}
header { margin: 1rem auto; padding: 1.25rem; }
header h1 { font-size: clamp(1.5rem, 2.5vw + 1rem, 2.25rem); line-height: 1.15; letter-spacing: .2px; }
header .meta { font-size: 0.9rem; color: rgba(234,255,248,.85); margin-top: .25rem; }
nav { margin-top: .5rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
nav a { color: var(--accent); padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(0,255,235,.5); text-decoration: none; }
nav a:hover { background: rgba(0,255,235,.15); text-decoration: underline; }

/* Main content layout and typography */
main { padding: 1rem; }
article { display: block; padding: 1rem; }

/* Featured image frame with aspect-ratio, frame glow, and inner glow */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 235, 0.5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  margin: 0.75rem 0 1rem;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform 0.25s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Content helpers */
.content { padding: 0.25rem 0 0.5rem; color: rgba(234,255,248,.92); }
p { color: rgba(234,255,248,.92); }
blockquote {
  margin: .75rem 0; padding: .5rem 1rem;
  border-left: .25rem solid var(--accent);
  background: rgba(0,0,0,.25);
  border-radius: 6px;
}
footer { padding: 1rem; margin-top: 1rem; display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
.product-ad, .sponsored-page { display: block; padding: .5rem; text-align: center; text-decoration: none; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(0,255,235,.5); }
.product-ad a, .sponsored-page a { text-decoration: none; color: var(--text); }
.footer-note { text-align: center; color: rgba(234,255,248,.8); font-size: .9rem; }

/* Lists and items: high contrast on glass */
ul, ol { padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* Print styles: readability */
@media print {
  html, body { background: white; color: #000; }
  header, main, footer { background: #fff; border: none; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
  :focus-visible { outline: 2px solid #000; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  body::before { opacity: 0.15; }
  body::after { opacity: 0.15; }
}
