/* Base */
:root {
  --bg: #0b0f14;
  --bg-2: #111b16;
  --text: #eafff1;
  --muted: #a8f5b0;
  --accent: #00ffa0;
  --accent-2: #1cff86;
  --panel: rgba(255,255,255,0.08);
  --panel-border: rgba(255,255,255,0.25);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 12px;
}
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(#0b0f14, #0b0f14 60%, #0a0e12 100%), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}
html, body { scroll-behavior: smooth; }

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.08) 0 120px, transparent 120px),
    radial-gradient(circle at 80% 40%, rgba(0,255,128,0.08) 0 140px, transparent 140px);
  background-size: 160px 160px, 180px 180px;
  mix-blend-mode: screen;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0,
    rgba(0,0,0,0) 1px,
    rgba(0,0,0,0.04) 2px
  );
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Layout helpers */
.container {
  max-width: clamp(320px, 90vw, 1120px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .card { background: rgba(255,255,255,0.12); }
}
.content { padding: 0.5rem 0 0.5rem; }

/* Header / Nav / Typography */
header {
  padding: 1rem;
  margin: 0.75rem auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
}
.meta {
  color: var(--muted);
  font-size: 0.88rem;
}
nav {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover, a:focus-visible {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 4px;
}
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame {
  aspect-ratio: 16 / 9;
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-image { width: 100%; }

/* Hero / content styling */
main {
  padding: 1rem 0;
}
h1, h2, h3 {
  color: var(--text);
  margin: 0.75rem 0 0.25rem;
}
p { margin: 0.25rem 0 0.75rem; color: #eafff1; }
blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--accent);
  color: #eafff1;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
}
ol, ul {
  margin: 0.5rem 0 1rem 1.1rem;
}
li { margin: 0.25rem 0; }

/* CTAs and controls */
.btn, .cta {
  font-family: inherit;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s;
  text-align: center;
  display: inline-block;
}
.btn { background: var(--accent); color: #021205; border-color: rgba(0,0,0,0.05); }
.btn:hover { transform: translateY(-1px); background: #00f79a; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cta {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.cta:hover { background: rgba(0,255,160,0.12); }

/* Utilities */
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #04200c;
  background: rgba(0,255,160,0.25);
  border: 1px solid rgba(0,255,160,0.5);
}
ul.inline { list-style: none; padding: 0; display:flex; gap:0.5rem; }

/* Image frame helper (for potential .image-frame usage) */
.image-frame, .image-frame img { will-change: transform; }

/* Forms (present/neutral styling) */
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 0.5rem;
  outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
::placeholder { color: rgba(232,255,241,.6); }

/* Footer/product-ad sections */
footer {
  padding: 1rem;
  margin: 1rem auto 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.product-ad, .sponsored-page {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
footer p { text-align: center; color: #c9fbd0; margin: 0; padding: 0.25rem 0 0; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .card { background: #fff; border: 1px solid #ddd; }
}

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