/* Base */
:root {
  --bg: #040b14;
  --bg-2: #0b1220;
  --text: #e8f7ff;
  --muted: #a8c7ff;
  --accent: #00e5ff;
  --accent-2: #ff2a5e;
  --glass: rgba(10,14,28,.28);
  --glass-2: rgba(10,14,28,.22);
  --border: rgba(255,255,255,.28);
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --shadow-soft: 0 4px 12px rgba(0,0,0,.18);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color-scheme: dark; }
body {
  min-height: 100%;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + blue/red scatter + subtle scanlines */
  background-image:
    radial-gradient(circle at 15% 25%, rgba(0,230,255,.25) 0 120px, transparent 120px),
    radial-gradient(circle at 75% 40%, rgba(255,40,100,.25) 0 140px, transparent 140px),
    linear-gradient(135deg, rgba(6,12,28,.92), rgba(0,0,0,.6) 60%, rgba(0,0,0,.75)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, screen, normal, overlay;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
header, main, footer, aside { padding: 1rem; }

/* Section headers (sectioned styling) */
header { text-align: center; padding: 1.5rem 1rem; }

/* Glass panels (fallback included) */
header, article, footer, aside {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8,14,28,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
  margin: .5rem auto;
  max-width: clamp(320px, 92%, 1100px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(0px)) {
  header, article, footer, aside { background: rgba(8,14,28,.18); }
}
@media (prefers-color-scheme: light) {
  :root { color-scheme: light dark; }
  body { background: #f5f7fb; color: #0b1220; }
  header, article, footer { border-color: rgba(0,0,0,.1); background: rgba(255,255,255,.65); }
}

/* Layout helpers */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; }

/* Typography */
h1 { font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.15; margin: .25rem 0 0.5rem; color: #eaffff; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin: .75rem 0 .5rem; color: #eaffff; }
p { font-size: clamp(0.95rem, 1.6vw, 1.125rem); line-height: 1.55; color: #eaffff; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Hero adjustments for header */
header { text-align: center; padding: 1.5rem 1rem; }

/* Featured image frame (also supports .featured-image) */
.image-frame { aspect-ratio: 16 / 9; width: 100%; display: block; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: var(--shadow-soft); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Alternate featured container if used */
.featured-image { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: var(--shadow); }
.featured-image img { width: 100%; height: auto; display: block; }

/* Utility content block */
.content { padding: 0.75rem; border-radius: 10px; }

/* Product ad / sections in footer */
.product-ad, .sponsored-page { display: inline-block; width: auto; padding: .5rem .75rem; margin: .25rem; border-radius: 8px; background: rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.25); }
.product-ad p, .sponsored-page p { margin: 0; }

/* Links and buttons */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
button, .btn, .cta { font-family: inherit; font-weight: 600; border-radius: 8px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.25); color: #fff; padding: .6rem .95rem; cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease; }
.btn--solid { background: linear-gradient(135deg, var(--accent), #00a3ff); border: none; color: #001018; }
.btn--outline { background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.4); color: #fff; }
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:active, .btn:active, .cta:active { transform: translateY(0); }

/* Focus visibility for accessibility */
:where(button, a, :is(input, textarea, select)):focus-visible, :focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* Grid utilities */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Card and tag utilities */
.card { background: rgba(6,10,28,.32); border: 1px solid rgba(255,255,255,.28); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow-soft); }

/* Tag pills */
.tag { display:inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; background: rgba(0, 229, 255, .14); color: #eaffff; border: 1px solid rgba(0,229,255,.4); }

/* Content sizing helpers for article/text density on mobile */
main { padding: 0.25rem; }

/* Print */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}
nav { margin-top: .25rem; }
nav a { color: var(--accent); padding: .25rem .5rem; border-radius: 6px; }

/* Ensure images scale nicely on small screens */
img { max-width: 100%; height: auto; display: block; }