/* TOKENS: COLOR PALETTE */
:root {
  --bg: #0a0b22;            /* deep indigo base */
  --bg-2: #141a3a;          /* cosmic blue */
  --text: #e9f0ff;           /* high-contrast light text */
  --muted: #a5b4fc;          /* muted accent text */
  --accent: #4f6aff;         /* primary cosmic blue */
  --accent-2: #86e3ff;       /* secondary glow blue */
  --card: rgba(255,255,255,0.08);
  --card-strong: rgba(255,255,255,0.18);
  --frame: rgba(255,255,255,0.25);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --glow: 0 0 40px rgba(79,106,255,.40);
}

/* LAYERS: BACKGROUND AND HARDENED UI */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  /* Layered background: gradient + scanlines + subtle glow */
  background:
    radial-gradient( circle at 20% -10%, rgba(130,160,255,.20), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(60,0,120,.25), transparent 40%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, #000 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 2px, transparent 2px 4px);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* GLASS: FROSTED PANELS (WITH FALLBACK) */
.card, header, section.product-ad, section.sponsored-page {
  background: var(--card);
  border: 1px solid var(--frame);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .card, header, section.product-ad, section.sponsored-page {
    background: rgba(255,255,255,0.14);
  }
}
a, button, .btn, .cta {
  text-decoration-skip-ink: auto;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* STRUCTURE: TYPOGRAPHY AND HEADINGS */
body, h1, h2, h3, p { margin: 0; }
header {
  padding: 1rem;
  text-align: center;
  margin: 0.5rem auto;
  max-width: 1100px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw + 1rem, 3rem);
  letter-spacing: .5px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.6vw + 0.7rem, 1rem);
  margin-top: .25rem;
}
nav {
  margin-top: .5rem;
}
nav a {
  display: inline-block;
  padding: .5rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  text-decoration: none;
  transition: transform .2s ease;
}
nav a:hover { transform: translateY(-1px); text-decoration: underline; text-underline-offset: 3px; }

/* LAYOUT UTILITIES */
.container {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: 12px;
}
.tag {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(79,106,255,.25);
  color: var(--text);
  border: 1px solid rgba(79,106,255,.5);
}
.image-frame, .image-frame img {
  display: block;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.15);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.002);
}
.featured-image {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}

/* MAIN CONTENT AREAS */
main {
  padding: 1.25rem;
}
article {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.25);
}
article h2 {
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2.2rem);
  margin: 0.75rem 0 0.5rem;
  color: #eaf2ff;
}
article p { color: #e8f0ff; opacity: .95; margin: 0.75rem 0; }
article ul { padding-left: 1.25rem; margin: 0.75rem 0; }
article li { margin: .35rem 0; }

/* FOOTER: AD CARDS / LINKS */
footer {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: stretch;
  background: rgba(0,0,0,.15);
  border-top: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem;
  border-radius: 12px;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a:hover, .sponsored-page a:hover { background: rgba(255,255,255,.12); text-decoration: underline; text-underline-offset: 3px; }
footer p { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .95rem; }

/* FORMS: (IF PRESENT) */
input, button, textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: .5rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
button { cursor: pointer; }
button:hover, a.btn:hover { filter: brightness(1.05); }

/* VARIANTS: SOLID and OUTLINE BUTTONS */
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(79,106,255,.9);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: rgba(79,106,255,.95); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.75);
  color: var(--text);
}
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* FOCUS STATES FOR ACCESSIBILITY */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* RESPONSIVE: FLUID TYPOGRAPHY + STACKS */
@media (max-width: 860px) {
  header { padding: 0.75rem; }
  article { padding: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}
@media print {
  html, body { background: #fff; color: #000; }
  header, nav, footer { display: none; }
  article { display: block; width: 100%; padding: 0; margin: 0; }
}
