:root {
  --bg: #0a0f1a;
  --bg-2: #0b1220;
  --text: #e6f3ff;
  --muted: #a8b8d9;
  --accent: #00e5ff;      /* Neon blue / cyan */
  --accent-2: #ff2bd8;    /* Neon magenta */
  --glass: rgba(14, 18, 32, 0.28);
  --glass-2: rgba(20, 28, 52, 0.38);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    linear-gradient(135deg, rgba(0, 230, 255, 0.08), rgba(255, 0, 216, 0.08)),
    radial-gradient(circle at 15% 10%, rgba(0, 230, 255, 0.12), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(255, 0, 216, 0.15), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, overlay, normal;
}
body { min-height: 100vh; }

/* Layout primitives */
.container, .grid, .card, .tag {
  /* utility defaults (can be overridden) */
}

.container {
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
}

/* Glass panels with fallbacks */
header, main, footer, aside {
  display: block;
  margin: 0 auto;
  padding: 0.75rem;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid rgba(180, 210, 255, 0.25);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside {
    background: rgba(12, 14, 28, 0.72);
  }
}
header { margin-top: 1rem; padding: 1rem; }
header h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: var(--text);
}
nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}
main { padding: 1rem 0; }
article { display: block; }

/* Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 10px 22px rgba(0,0,0,0.25), 0 0 0 3px rgba(0, 230, 255, 0.14) inset;
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.content {
  padding: 0.75rem 0 0;
  color: var(--text);
}
.product-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(8,12,28,0.28);
  border: 1px solid rgba(120,170,255,0.4);
  margin: 0.75rem 0;
  transition: transform 0.2s ease;
}
.product-ad a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.product-ad:hover { transform: translateY(-2px); }
.sponsored-page { margin-top: 0.25rem; }

/* Links, buttons, CTAs */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6rem 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; }

.btn {
  background: var(--accent);
  color: #041019;
  border: 1px solid rgba(0,0,0,0.15);
}
.btn[aria-pressed="true"] { filter: brightness(0.95); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.6);
}
.btn:active, .cta:active { transform: translateY(1px) scale(0.99); }

/* Simple typographic rhythm helpers */
h1, h2, h3 { margin: 0 0 .25rem; font-weight: 700; }
p { margin: 0 0 0.75rem; color: var(--muted); }

/* Lists */
ul { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

/* Print styles for readability */
@media print {
  body { background: white; color: black; }
  header, main, footer { background: none; box-shadow: none; border: none; }
  a { color: black; text-decoration: underline; }
}

/* Responsiveness helpers (mobile-first) */
@media (min-width: 640px) {
  .container { padding-inline: 1.25rem; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

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