:root {
  --bg: #0b0b0b;
  --bg-2: #141414;
  --surface: rgba(0, 0, 0, 0.42);
  --text: #e9e9e9;
  --muted: #b5b5b5;
  --accent: #ff3737;
  --accent-2: #ff6b6b;
  --card-border: rgba(255, 255, 255, 0.20);
  --glass: rgba(14, 0, 0, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 14px;
  --radius-sm: 10px;

  /* Responsive typography */
  --text-size: clamp(0.88rem, 0.8rem + 0.8vw, 1.125rem);
  --h1-size: clamp(1.8rem, 1.2rem + 3vw, 3rem);
}

:root, html, body {
  height: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1a0000 0%, #360000 40%, #0b0000 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Subtle red sunset scanlines + soft grain feel */
  background-image:
    repeating-linear-gradient(-45deg, rgba(255, 60, 60, 0.08) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.08) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.25;
  z-index: 0;
  filter: saturate(110%);
}

/* Layout helpers */
.container {
  width: min(92%, 1200px);
  margin: 0 auto;
  padding: 0 0.5rem;
  position: relative;
  z-index: 1;
}

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

/* Core sections */
header, main, footer, aside {
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  padding: 2rem 0 1rem;
}

header h1 {
  font-size: var(--h1-size);
  margin: 0.25rem 0;
  line-height: 1.08;
  letter-spacing: .4px;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}

header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.6rem + 0.8vw, 1rem);
  margin-top: .25rem;
}

main {
  padding: 1rem 0 2rem;
}

article {
  display: block;
  padding: 0;
  margin: 0;
}

.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #000;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  margin: 0 auto 1rem;
  position: relative;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform .5s ease;
}
.image-frame:hover img { transform: scale(1.05); }

/* Glass panel utility (modern + graceful fallback) */
.glass {
  background: rgba(8, 0, 0, 0.32);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.no-backdrop .glass { background: rgba(8,0,0,0.55); }

/* Cards and content blocks */
.content { padding: 0.25rem 0 0.25rem; }

/* Simple typography scale for article sections */
h2, h3 {
  margin: .75rem 0 .25rem;
  color: #fff;
}
h2 { font-size: clamp(1.4rem, 0.8rem + 2vw, 2rem); }
h3 { font-size: clamp(1.1rem, 0.6rem + 1.6vw, 1.6rem); }

/* Paragraphs and lists */
p { color: #e9e9e9; font-size: var(--text-size); margin: 0 0 1rem; }
ul { margin: 0 0 1rem 1.25rem; padding: 0; color: var(--text); }
li { margin: .25rem 0; }

/* Ad / aside blocks treated as glass panels */
.product-ad, .sponsored-page, aside {
  display: block;
}
.product-ad, .sponsored-page {
  padding: .75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  text-align: center;
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  width: 100%;
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
.product-ad:hover, .sponsored-page:hover {
  background: rgba(255,0,0,0.28);
}
.product-ad:focus-visible, .sponsored-page:focus-visible {
  outline: 2px solid #ffea00;
  outline-offset: 3px;
  border-radius: 8px;
}

/* Link and button treatments */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, opacity .2s ease;
}
a:hover, a:focus-visible {
  text-decoration: underline;
  outline: none;
}
button, .btn, .cta {
  display: inline-block;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: .65rem 1rem;
  font-size: 0.95rem;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.55), rgba(140,0,0,0.85));
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.btn.primary {
  background: linear-gradient(135deg, #ff3b3b 0%, #b30000 100%);
  border-color: rgba(255,255,255,.55);
}
.btn.secondary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,.45);
  color: #fff;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  filter: saturate(110%);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #ffea00;
  outline-offset: 2px;
  border-radius: 999px;
}

/* Utility classes */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

/* Card and tag helpers */
.card {
  background: rgba(8, 0, 0, 0.42);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(255, 64, 64, 0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}

/* Media responsiveness */
@media (min-width: 768px) {
  .container { padding-inline: 0; }
  main { padding: 1.25rem 0 2rem; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f7;
    --bg-2: #ffffff;
    --text: #111;
    --muted: #555;
    --surface: rgba(255,255,255,0.72);
    --card-border: rgba(0,0,0,0.15);
    --glass: rgba(255,255,255,0.6);
    --shadow: 0 6px 18px rgba(0,0,0,.08);
  }
  body {
    background: linear-gradient(135deg, #f5f5f5 0%, #e6e6e6 40%, #f7f7f7 100%);
    color: var(--text);
  }
  body::before { opacity: .18; }
  .glass, .product-ad, .sponsored-page {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.08);
  }
  a, button { color: #111; }
  button, .btn { border: 1px solid rgba(0,0,0,0.15); }
}

/* Accessibility: print-friendly */
@media print {
  body { background: #fff; color: #000; }
  .glass { background: #fff !important; color: #000; }
  a, button { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
