:root {
  --bg: #2b0000;
  --bg-2: #3a0000;
  --text: #ffffff;
  --muted: #d9d9d9;
  --accent: #00e5ff;
  --accent-2: #66ffcc;
  --card-bg: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.28);
  --card-glow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --gap: 1rem;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: #000;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  font-size: clamp(14px, 1.2vw + 8px, 18px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered background: gradient + subtle scanlines/noise (pure CSS) */
  background-image:
    linear-gradient(135deg, #4b0000 0%, #1b0000 60%, #0b0000 100%),
    linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.28)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px);
  background-blend-mode: normal, overlay, overlay;
  background-color: var(--bg);
}

* { box-sizing: border-box; }

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

header, main, footer {
  padding: 1rem;
}

header {
  display: block;
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
}

header h1 {
  font-size: clamp(1.75rem, 1.2rem + 3.5vw, 3.5rem);
  line-height: 1.04;
  margin: 0 0 0.5rem;
  letter-spacing: .5px;
}

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

main {
  display: block;
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--radius) * 0.8);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: inset 0 0 0 rgba(0,0,0,0.0), 0 6px 20px rgba(0,0,0,.25);
  background: #0a0a0a;
  position: relative;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}
.image-frame img:hover {
  transform: scale(1.01);
  transition: transform .4s ease;
}

.content { padding: 1rem; }

.product-ad {
  display: block;
  text-align: center;
  padding: .75rem;
  margin: 0.5rem 0;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: var(--card-glow);
}
.product-ad:hover { background: rgba(0,0,0,0.28); text-decoration: none; }
.product-ad p { margin: 0; font-weight: 600; }

.sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  margin: 0.25rem 0 0;
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.28);
}
.sponsored-page p { margin: 0; font-weight: 600; }

a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, opacity .2s ease;
}

a { color: var(--accent); }

a:hover { text-decoration: underline; }

button, .btn, .cta {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
}

/* Glass panels (frosted glass) with fallback for browsers without backdrop-filter */
.glass {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  padding: 1rem;
  backdrop-filter: saturate(1.1) blur(12px);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.22); }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(340px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--card-glow);
}
.tag {
  display: inline-block;
  padding: .25em .5em;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,.18);
  color: #eafaff;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Typography helpers */
h1, h2, h3 {
  line-height: 1.04;
  margin: 0 0 .5rem;
}
p { margin: 0 0 1rem; color: var(--muted); }

ul { margin: 0 0 1rem 1.25rem; padding: 0; color: var(--muted); }
li { margin: .25rem 0; }

/* CTA styling */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .2px;
  text-decoration: none;
}
.btn {
  background: var(--accent);
  color: #001014;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); background: #00d9ff; }
.btn:active { transform: translateY(0); opacity: 0.95; }
.btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.cta {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.4);
}
.cta:hover {
  color: var(--accent);
  border-color: rgba(0, 230, 255, 0.8);
}
a, button, .btn, .cta:focus-visible { outline: none; }

/* Accessibility: high-contrast focus for links in glass regions */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Print styles (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  nav, .image-frame, .glass { display: none; }
  .container { padding: 0; }
}
