/* Base System & Tokens */
:root {
  --bg: #0b0f14;            /* base dark cockpit */
  --bg-2: #111821;           /* layered dark panel */
  --text: #eafbff;            /* high-contrast on glass */
  --muted: #9bd9e0;           /* secondary text */
  --accent: #00e5ff;           /* cyan cyber accents */
  --accent-2: #ff6f61;         /* coral accent for contrast */
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 14px;
  --gap: 1rem;
  --focus: 2px solid #fff;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f7;
    --bg-2: #ffffff;
    --text: #0a1b2a;
    --muted: #334e68;
    --accent: #006e8d;
    --accent-2: #b23a3a;
    --card: rgba(255,255,255,0.92);
    --card-border: rgba(0,0,0,0.08);
    --shadow: 0 6px 18px rgba(0,0,0,.12);
  }
}
html, body, header, nav, main, article, footer, aside {
  height: 100%;
}

/* Reset & Layout Helpers */
* { box-sizing: border-box; }
html { font-size: 16px; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + coral/cyan vibe + subtle scanlines */
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    radial-gradient(circle at 20% 0, rgba(0,214,255,.12), transparent 40%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.06) 0 2px, transparent 2px 4px),
    linear-gradient(to bottom right, rgba(0,0,0,.75), rgba(0,0,0,.92));
  background-blend-mode: overlay, overlay, normal, normal;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

/* Core Sections */
header, nav, main, article, aside, footer {
  display: block;
}
header { padding: clamp(1.25rem, 4vw, 2.5rem) 0; text-align: left; position: relative; z-index: 2; }
header h1 { margin: 0 0 .25rem; font-size: clamp(1.8rem, 4vw + 1rem, 3.2rem); line-height: 1.04; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: clamp(0.9rem, 1.6vw, 1.05rem); margin: 0; }

/* Container & Grid Utilities */
.container { width: 100%; max-width: clamp(320px, 90vw, 1100px); padding: 0 1rem; margin: 0 auto; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Glass Panels (with graceful fallback) */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(8px)) {
  .glass {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.40);
  }
}

/* Core Content Styling */
.content { padding: 1rem; color: var(--text); }

/* Image Frame */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 22px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04) inset;
  background: #111;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Card & Tag Utilities */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  font-size: .75rem;
  color: #062029;
  background: rgba(0, 229, 255, 0.18);
  border: 1px solid rgba(0, 229, 255, 0.45);
}

/* Product Ad & Sponsored Sections */
.product-ad, .sponsored-page {
  display: block;
  padding: .9rem;
  margin: .5rem 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,229,255,.25), rgba(0,0,0,.15));
  border: 1px solid rgba(0,229,255,.5);
  transition: transform .15s ease, background .25s ease;
}
.product-ad a:hover, .sponsored-page a:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(0,229,255,.40), rgba(0,0,0,.20));
}
.product-ad a:focus-visible, .sponsored-page a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* CTA & Buttons */
.btn, button, .cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.1rem; border-radius: 999px;
  border: 1px solid rgba(0,0,0,.0);
  cursor: pointer; user-select: none;
  transition: transform .15s ease, background .25s ease, color .25s ease;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
}
.btn { background: var(--accent); color: #00191c; }
.btn:hover { transform: translateY(-1px); background: #00d4f0; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn.secondary {
  background: transparent; color: var(--accent); border: 1px solid rgba(0, 230, 255, 0.5);
}
.btn.secondary:hover { background: rgba(0, 230, 255, 0.15); }

/* Typography: Headings & Paragraphs */
h2 { font-size: clamp(1.25rem, 3vw + .5rem, 2rem); margin: .75rem 0 .5rem; color: var(--text); }
p { color: var(--muted); margin: .5rem 0 1rem; }
blockquote {
  margin: .5rem 0 1rem; padding: .75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  color: #eaffff;
}

/* Layout Examples For Content Structure */
main { padding: 1rem; }
section { margin: 1rem 0; }

/* Lists */
ul { padding-left: 1.25rem; margin: .75rem 0; color: var(--muted); }
li { margin: .25rem 0; }

/* Utilities for responsive layout */
@media (min-width: 720px) {
  .container { padding: 0 1.25rem; }
  header { padding-top: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print Styles */
@media print {
  body { background: white; color: black; }
  header, nav, footer { display: block; }
  .image-frame { page-break-inside: avoid; }
}

/* Dark-mode Friendly Focus & Accessibility */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Content-Specific Helpers (touch-friendly) */
@media (hover: hover) and (pointer: coarse) {
  .btn, .cta { padding: .9rem 1.25rem; }
}
