:root {
  /* Palette tokens (royal blue CRT + neon pink accents) */
  --bg: #041a4a;
  --bg-2: #0b2a7a;
  --text: #eaf2ff;
  --muted: #b8c6ff;
  --accent: #ff3ebf;
  --accent-2: #ff6bd9;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --focus: 3px solid rgba(255,255,255,0.95);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(135deg, var(--bg) 0%, #0b1a4f 60%, #040b22 100%),
    linear-gradient(rgba(255,0,140,.08), rgba(0,0,0,.0)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.08) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

/* Layout primitives (mobile-first) */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,0.14); }
}

header, nav, main, article, aside, footer {
  display: block;
}

/* Glassy surfaces for structural regions (fallback if backdrop-filter unavailable) */
.header-or-glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

header {
  padding: 1rem 0.75rem;
  width: 100%;
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
}

header > h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw + 0.6rem, 2.4rem);
  line-height: 1.12;
  letter-spacing: .2px;
  font-weight: 700;
}

header .meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
}

/* Navigation */
nav {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  padding-top: .25rem;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 6px;
  transition: color .2s ease;
}
nav a:hover,
nav a:focus-visible {
  color: var(--accent-2);
  text-decoration: underline;
  outline: none;
}
nav a:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

/* Main content area */
main {
  padding: 1rem 0;
}

article {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  max-width: clamp(320px, 90vw, 900px);
  /* Glass panel for readability on the content block */
  background: rgba(0,0,0,0.0);
}

.featured-image {
  display: grid;
  place-items: center;
  padding: .75rem 0;
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* Typography scale (responsive) */
h2 { font-size: clamp(1.15rem, 1.4rem + 1.2vw, 1.75rem); margin: 1rem 0 .5rem; color: var(--text); }
h3 { font-size: clamp(1rem, 1.1rem + .8vw, 1.25rem); margin: .75rem 0 0.4rem; color: var(--text); }
p { margin: .75rem 0; color: #e9f0ff; }
ul { margin: .6rem 0 1rem 1.1rem; padding: 0; }
li { margin: .25rem 0; color: #e6edff; }

/* Blockquotes for emphasis */
blockquote {
  margin: .9rem 0;
  padding: .5rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(255,255,255,.04);
  border-radius: 6px;
  color: var(--text);
}

/* Content helper */
.content { color: var(--text); }

/* Glass panels for key sections (footer/ad blocks use this) */
.product-ad, .sponsored-page {
  display: grid;
  place-items: center;
  text-align: center;
  padding: .75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  width: 100%;
  transition: transform .2s ease;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }
.product-ad a, .sponsored-page a { text-decoration: none; color: var(--text); width: 100%; display: block; }

footer {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  place-items: center;
  width: 100%;
  margin-top: 1rem;
}

/* Utility elements */
ul, li { list-style: disc; }

.tag {
  display: inline-block;
  padding: .15em .5em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}

/* Buttons and links (solid and outline variants) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  display: inline-block;
  padding: .6rem .92rem;
  line-height: 1.2;
}
a { color: var(--accent); }
a.btn, a.cta, button.btn, button.cta { text-decoration: none; }

.btn {
  background: linear-gradient(135deg, var(--accent), #ff5bd7);
  color: white;
  box-shadow: 0 6px 16px rgba(255, 62, 191, 0.45);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn.outline:hover { background: rgba(255,255,255,.08); }

/* Link accessibility on focus/hover for all anchors */
a:focus-visible, a:hover {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}

/* Glassy sections fallback for non-backdrop environments */
@media (prefers-color-scheme: light) {
  :root { --surface: rgba(255,255,255,0.85); --text: #0b1020; --border: rgba(0,0,0,.15); }
  body { background: #f5f7ff; }
}

/* Responsiveness & grid helpers */
@media (min-width: 640px) {
  main { padding: 1.25rem 0; }
  .container { padding-left: 0; padding-right: 0; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media (min-width: 900px) {
  header { padding: 1.25rem 0; }
  footer { padding: 1.25rem 0; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .product-ad, .sponsored-page { padding: 1rem; }
}

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

/* Print styles for readability */
@media print {
  body { background: white; color: black; }
  nav, header, footer { display: none; }
  article { display: block; background: transparent; padding: 0; margin: 0; }
}
