:root {
  --bg: #0a0f24;
  --bg-2: #0b1a38;
  --text: #e8f0ff;
  --muted: #a6b8d4;
  --accent: #7b6aff;
  --accent-2: #00e5ff;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(180, 210, 255, 0.25);
  --shadow: 0 8px 22px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(123, 110, 255, 0.55);
  --radius: 12px;
  --gap: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

html {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(7,12,28,.98) 0%, rgba(3,7,20,.98) 60%, rgba(6,9,22,.98) 100%),
    radial-gradient(circle at 20% -10%, rgba(0, 160, 255, .15), transparent 25%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  background-color: #060b18;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

/* Layout helpers (utilities) */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  gap: var(--gap);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(1.1) blur(12px);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  color: var(--text);
}

.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(123, 110, 255, 0.25);
  color: #eaf0ff;
  border: 1px solid rgba(123, 110, 255, 0.5);
}

/* Core sections */
html, body, header, nav, main, article, footer, aside {
  scroll-behavior: smooth;
}

/* Header / hero styling with glassy panel feel */
header {
  width: 100%;
  padding: 1.75rem 1rem;
  display: grid;
  place-items: center;
  text-align: center;
  margin: 0 auto;
  background: rgba(16, 20, 40, 0.55);
  border: 1px solid rgba(123, 110, 255, 0.4);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}

header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.9rem, 4vw + 0.5rem, 3.25rem);
  line-height: 1.05;
  letter-spacing: .3px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 14px rgba(123,110,255,.6);
}

header .meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
}

/* Main content area */
main {
  padding: 1.25rem 1rem 2rem;
  display: grid;
  place-items: center;
}

.featured-image {
  width: 100%;
  max-width: clamp(420px, 90vw, 860px);
  margin: 0.75rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

.featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  filter: saturate(1.05);
}

/* Content area inside main */
.content {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: min(860px, 92vw);
}

.content h2 {
  margin-top: 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #eaf0ff;
}

.content p {
  color: var(--text);
  margin: 0.5rem 0;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.6;
}

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

/* Image frame helper */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.image-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Product ad / sponsor blocks (footer) */
.product-ad, .sponsored-page {
  width: 100%;
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: 12px;
  background: rgba(123, 110, 255, .18);
  border: 1px solid rgba(123, 110, 255, .4);
  text-decoration: none;
  color: var(--text);
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
.product-ad:hover, .sponsored-page:hover {
  transform: translateY(-1px);
  transition: transform .2s ease;
}
footer {
  padding: 1rem;
  display: grid;
  gap: .75rem;
  justify-items: center;
  background: rgba(4,6,20,.5);
  border-top: 1px solid rgba(255,255,255,.15);
}
footer p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Link and button treatments */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
  position: relative;
}

.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(123, 110, 255, 0.7);
  background: linear-gradient(135deg, rgba(123,110,255,.95), rgba(0, 229, 255, .95));
  color: #fff;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(123,110,255,.95), rgba(0, 210, 255, .95)); }
.btn:active { transform: translateY(0); opacity: .95; }

.btn--outline {
  background: transparent;
  border: 1px solid rgba(123, 110, 255, 0.8);
  color: var(--text);
}
.btn--outline:hover {
  background: rgba(123, 110, 255, 0.15);
}

/* Typography helpers */
h1, h2, h3 { line-height: 1.15; }
p { margin: 0.5rem 0; }

/* Responsive utilities */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .featured-image { margin: 1rem 0 0; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8ff;
    --bg-2: #e9eaff;
    --text: #0b1130;
    --muted: #495c83;
    --accent: #3b5bff;
    --accent-2: #0066ff;
    --surface: rgba(255,255,255,.85);
    --surface-2: rgba(255,255,255,.95);
    --border: rgba(0,0,0,.08);
    --shadow: 0 6px 18px rgba(0,0,0,.08);
  }
  body {
    background: linear-gradient(135deg, #f7f8ff 0%, #f0f2ff 60%, #e7eaff 100%);
    color-scheme: light;
  }
  header {
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(0,0,0,.08);
  }
  .product-ad, .sponsored-page {
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(0,0,0,.08);
  }
  .image-frame { border-color: rgba(0,0,0,.08); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { color: #000; background: #fff; }
  a { text-decoration: underline; }
}
