/* 1. Palette & Layered Background
   Fuchsia + royal blue with glassy, high-contrast UI on a spacey backdrop. */
:root {
  --bg: #0b0014;
  --bg-2: #160033;
  --bg-3: #0a0a1a;
  --text: #eaf0ff;
  --muted: #c5cbff;
  --accent: #4169e1;      /* Royal blue */
  --accent-2: #ff00ff;    /* Fuchsia */
  --card: rgba(255,255,255,0.08);
  --card-strong: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --radius: 14px;
  --gap: 1.25rem;
}

html, body {
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(65,105,225,0.18), rgba(255,0,255,0.15) 60%, rgba(0,0,0,0.5) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.2) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.03) 0 1px, transparent 1px 2px);
  color: var(--text);
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-attachment: fixed;
  background-size: cover;
}

/* 2. Layout Helpers */
* { box-sizing: border-box; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }

/* Container & grids */
.container { width: min(100%, clamp(320px, 90vw, 1200px)); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: var(--gap); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; background: rgba(65,105,225,.25); color: #fff; }

/* 3. Glass Panels (with fallback) */
.glass { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius); padding: 1rem; box-shadow: 0 6px 20px rgba(0,0,0,.35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255,255,255,0.45); }
}

/* 4. Typography & Accessibility */
h1, h2, h3 { margin: 0 0 .25rem 0; line-height: 1.2; font-weight: 700; color: #fff; }
h1 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.75rem); letter-spacing: .2px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
p { margin: 0 0 0.75rem 0; color: var(--muted); }
.small { font-size: .875rem; color: var(--muted); }

/* 5. Interactive States (buttons, links) */
button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(65,105,225,.6);
  border-radius: 999px;
  padding: .65rem 1.05rem;
  color: #fff;
  background: rgba(65,105,225,.22);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(65,105,225,.28); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(65,105,225,.15);
}
.btn.primary { background: var(--accent); border-color: rgba(65,105,225,.9); }
.btn.primary:hover { background: #355bdc; }

/* Focus management for links */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* 6. Image Frame Styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  background: linear-gradient(to bottom right, rgba(0,0,0,.25), rgba(255,255,255,.05));
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; filter: saturate(1.04);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* 7. Element Defaults (html, body, header, nav, main, article, aside, footer) */
html { scroll-behavior: smooth; }
header { padding: 1.5rem 0 1rem; text-align: center; }
header h1 { color: #fff; }

/* Main content flow */
main { padding: 1rem 0 2rem; display: grid; place-items: center; }
article { width: 100%; display: grid; place-items: center; }

/* Footer & sections within footer (product-ad, etc.) */
footer { padding: 1.5rem 0 2rem; display: grid; gap: 1rem; justify-items: center; }

/* Section-specific glass panels in footer */
.product-ad, .sponsored-page { width: min(100%, 720px); display: grid; gap: .5rem; justify-items: center; padding: .75rem; }

/* Explicit list styling if used */
ul { margin: 0; padding: 0; list-style: none; display: flex; gap: .5rem; flex-wrap: wrap; }
li { margin: 0; }

/* 8. Print Styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; }
  .glass { background: transparent; border: 1px solid #ccc; box-shadow: none; }
}
  
/* 9. Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}