:root{
  --bg: #0a002b;
  --bg-2: #160033;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.12);
  --text: #f8f4ff;
  --muted: #c8b3e6;
  --accent: #ff7a00;
  --accent-2: #ffd08a;
  --glass-border: rgba(255,255,255,0.28);
  --radius: 14px;
  --shadow: 0 6px 20px rgba(0,0,0,.28);
  --focus: 2px solid var(--accent);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(12,0,40,.25) 0%, rgba(12,0,40,.15) 40%, rgba(0,0,0,0) 60%),
    linear-gradient(135deg, var(--bg) 0%, #210043 50%, #120033 100%);
  background-image:
    linear-gradient(135deg, rgba(0,0,0,.15), rgba(0,0,0,.0) 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 1px, transparent 1px, transparent 2px),
    linear-gradient(135deg, var(--bg) 0%, #260043 60%, #120022 100%);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
}
/* Section: Base + Theme */
header, main, footer, aside, nav, article { display: block; }

/* Layout & Containers */
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* 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: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.no-backdrop {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  padding: 1rem;
}

/* Typography & hero */
header { padding: 1.25rem 1rem; text-align: center; }
header h1 {
  font-size: clamp(1.6rem, 3.5vw + 0.5rem, 2.8rem);
  margin: 0;
  line-height: 1.15;
  letter-spacing: .3px;
  text-wrap: balance;
}
main { padding: 1rem; display: block; }
main article { display: block; }

/* Image frame styling */
.image-frame { aspect-ratio: 16/9; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); background:#000; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content helpers */
.content { padding: 0; margin: 0; }
ul, li { margin: 0; padding: 0; list-style: none; }

/* Links & buttons */
a, button, .btn, .cta { color: var(--text); text-decoration: none; border: none; outline: none; cursor: pointer; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255,255,255,.18), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.32);
  color: var(--text);
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff4a00);
  border: none;
  color: #fff;
}
.btn.secondary {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,.4);
}
.btn:active, .cta:active { transform: translateY(0); }

/* Utility & components */
.tag { display:inline-block; padding:.25rem .5rem; border-radius:999px; font-size:.75rem; color:#111; background: #ffd08a; }

/* Product ad panels */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .85rem;
  margin: .75rem 0;
}
.product-ad a, .sponsored-page a { color: inherit; text-decoration: none; display: inline-block; width: 100%; }

/* Footer styling */
footer { padding: 1rem; text-align: center; color: var(--muted); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .no-print { display: none; }
}

/* Accessibility + motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  header h1 { animation: fadeIn 600ms ease-out; }
}

/* Focus + contrast tweaks for high accessibility on glass */
@media (prefers-reduced-motion: reduce) {
  :focus { outline: none; }
}
a, button, .btn, .cta { color-scheme: dark; }

/* Navigation and layout placeholders (safe fallbacks) */
nav { display: block; }
aside { display: block; }

/* Small screens adjustments */
@media (max-width: 640px) {
  .image-frame { border-radius: 10px; }
  .container { padding: 0 0.75rem; }
}
