/* Tokens */
:root {
  --bg: #0a0f1a;
  --bg-2: #0a1120;
  --text: #e9f0ff;
  --muted: #aab6d9;
  --accent: #e4002b;       /* crimson */
  --accent-2: #2b6cff;      /* cosmic blue */
  --glass: rgba(255,255,255,.08);
  --glass-strong: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.25);
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(43, 108, 255, .6);
  --container-max: 1100px;
}

/* Layered, responsive, futuristic background (crimson polka + blue glow) */
html, body {
  height: 100%;
}
html {
  background: #000;
}
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20px 20px, rgba(228,0,64,.25) 2px, transparent 3px),
    radial-gradient(circle at 70px 70px, rgba(39,64,255,.18) 2px, transparent 3px),
    linear-gradient(135deg, rgba(9,0,40,.95) 0%, rgba(4,8,20,.95) 60%, rgba(0,0,0,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal, overlay;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Basic page structure */
html, body, header, nav, main, article, aside, footer {
  /* Keep layout predictable for accessibility and sanity */
}
header {
  padding: 1rem 1rem;
  text-align: center;
}
main {
  padding: 1rem 1rem 2rem;
}
article {
  margin: 0 auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  box-shadow: var(--shadow);
}
footer {
  padding: 1rem;
  margin-top: 2rem;
  text-align: center;
}
aside {
  padding: 0.5rem;
}
nav {
  margin-top: .25rem;
}
.container, .grid {
  width: min(1100px, 92vw);
  margin-left: auto;
  margin-right: auto;
}
.container { padding-inline: 0.5rem; }

/* Image frame styling (must-styles) */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,255,255,.35);
  background: #000;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}
.image-frame, .image-frame img { will-change: transform; }

/* Content area (text blocks) */
.content {
  padding: 1rem;
  color: var(--text);
}
h1, h2, h3, h4 {
  margin: .5rem 0;
  line-height: 1.15;
}
p {
  margin: .5rem 0 1rem;
  color: #eaf0ff;
}
ul {
  padding-left: 1.25rem;
  margin: .5rem 0 1rem;
}
li { margin: .25rem 0; }

/* Product ad / sponsor blocks (glass panels) */
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .6rem .9rem;
  margin: .25rem;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
}
.product-ad:hover, .sponsored-page:hover {
  background: rgba(255,255,255,.12);
}
footer p { color: var(--muted); }

/* Link, button, .btn, .cta styling */
a, button, .btn, .cta {
  font-family: inherit;
  color: #fff;
  text-decoration: none;
}
a { color: var(--accent-2); }
a:hover, a:focus { text-decoration: underline; color: #b9d2ff; }

/* Focus states for accessibility (focus-visible) */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
button, .btn, .cta {
  border: 0;
  cursor: pointer;
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  background: var(--accent-2);
  color: #fff;
  transition: transform .2s ease, background .2s ease;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: #214bdc;
}
.btn {
  background: var(--accent-2);
  border: 1px solid rgba(255,255,255,.25);
}
.btn:hover {
  background: #2a58f0;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: var(--text);
}
.btn--outline:hover {
  background: rgba(255,255,255,.08);
}
.cta { padding: .6rem 0.9rem; }

/* Layout helpers (grid + card + tag) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag {
  display: inline-block;
  padding: .15rem .4rem;
  border-radius: 999px;
  background: rgba(43,108,255,.25);
  color: #e6f0ff;
  font-size: .75rem;
  border: 1px solid rgba(43,108,255,.6);
}

/* Typographic scale (fluid typography) */
h1 { font-size: clamp(1.4rem, 2.5vw + 1rem, 2.6rem); }
h2 { font-size: clamp(1.2rem, 1.8vw + .6rem, 2rem); }
h3 { font-size: clamp(1rem, 1.4vw + .5rem, 1.5rem); }
h4 { font-size: clamp(.95rem, 1.2vw + .4rem, 1.15rem); }

/* Responsive refinements */
@media (min-width: 700px) {
  main { padding: 2rem 0; }
  article { padding: 1.25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print-friendly styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, article, aside, footer { background: transparent; box-shadow: none; }
  a { text-decoration: underline; color: #00f; }
}