/* Section: Base Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: linear-gradient(135deg, #0a0f1e 0%, #0b1a2b 60%, #0b1020 100%); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; line-height: 1.55; }

/* Section: Color tokens (midnight blue + yellow) */
:root {
  --bg: #0a0f1e;
  --bg-2: #0b1a2b;
  --text: #e9f0ff;
  --muted: #b8c6f0;
  --accent: #ffd400;
  --accent-2: #ffea66;
  --glass: rgba(7, 12, 28, 0.28);
  --glass-2: rgba(7, 12, 28, 0.16);
  --surface: rgba(255, 255, 255, 0.05);
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0,0,0,.28);
  --focus: 0 0 0 3px rgba(255, 214, 0, 0.85);
  --text-on-glass: #fefde3;
  --btn-solid: #ffd400;
  --btn-solid-ink: #0b0b0b;
  --link: #ffd400;
  --link-underline: rgba(255,214,0,.8);
  --border: rgba(255,255,255,.25);
  --shadow-soft: 0 2px 12px rgba(0,0,0,.25);
}

/* Section: Layered background (gradient + pure CSS scanlines + radar sweep) */
:root { --bg-gradient: linear-gradient(135deg, #0a0f1e 0%, #0b1a2b 60%, #0b1020 100%); }

html, body { background: var(--bg-gradient); min-height: 100%; }
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 3px 3px, 3px 3px;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.6;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: conic-gradient(from 90deg at 50% 50%, rgba(255, 213, 0, 0.25), transparent 60%);
  animation: radar-sweep 12s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.25;
  pointer-events: none;
}
@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  html, body, body::after, body::before { animation: none !important; }
}

/* Section: Layout utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(7,12,28,0.75); border-color: rgba(255,255,255,.45); }
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #111;
  background: rgba(255, 212, 0, 0.25);
  border: 1px solid rgba(255, 214, 0, 0.6);
  margin-right: .25rem;
}

/* Section: Typography */
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body { color: var(--text); }
h1, h2, h3 { color: #fff; margin: 0.25rem 0; line-height: 1.15; font-weight: 800; }
h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3rem); letter-spacing: .2px; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-top: .75rem; }
p { margin: 0.55rem 0; color: var(--text); }

/* Section: Structure selectors styling */
html, body, header, nav, main, article, aside, footer {
  display: block;
}
header, nav, main, article, aside, footer {
  padding: 0;
  margin: 0;
}
header {
  padding: clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(255,255,255,.25);
  background: rgba(7,12,28,0.28);
  border-radius: 0 0 14px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .25rem 0 .25rem; color: #fff; text-shadow: 0 0 12px rgba(255, 212, 0, .6); }
header .meta { color: var(--muted); font-size: .92rem; }

nav { margin-top: .25rem; }

main { padding: 1rem 0 2rem; }
article { padding: 0; }

/* Section: Image frame styling (and fallback) */
.image-frame, .featured-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.image-frame { aspect-ratio: 16 / 9; }

/* Section: Content helpers (glass panels) */
.content { padding: 0; }

/* Section: Links & controls */
a, button, .btn, .cta {
  font: inherit;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
a { color: var(--link); text-decoration-color: transparent; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--link-underline); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .62rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn.primary, .cta.primary {
  background: var(--btn-solid);
  color: var(--btn-solid-ink);
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.15);
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn:focus-visible, .cta:focus-visible { outline: none; box-shadow: var(--focus); }

/* Section: Lists & definitions */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Section: Footer & ad blocks */
footer { padding: 1rem; text-align: center; display:flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; border-top: 1px solid rgba(255,255,255,.25); background: rgba(7,12,28,.22); }
.product-ad, .sponsored-page { min-width: 260px; }
.product-ad a, .sponsored-page a { display: block; padding: .75rem 1rem; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); color: #fff; }

/* Section: Print (basic readability) */
@media print {
  body { color: #000; background: #fff; }
  header, nav, main, article, aside, footer { background: transparent; padding: 0; }
  a { color: #000; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Accessibility helpers for contrast (text on glass) */
@media (prefers-color-scheme: light) {
  :root { --text: #0e1020; --muted: #4b4b4b; }
  body { background: #f8f9fb; }
  .card, header, footer { background: rgba(255,255,255,.8); border-color: rgba(0,0,0,.08); }
  a { color: #0b4; }
}
