:root {
  --bg: #0b002a;
  --bg-2: #140033;
  --text: #eef2ff;
  --muted: #c7c4e6;
  --accent: #7b5cff;       /* violet core */
  --accent-2: #cfe2ff;     /* holographic silver tint */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --radius: 12px;
  --focus: 2px solid var(--accent-2);
}

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

html, body { height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Layered background: violet gradient + subtle scanlines */
  background-image:
    linear-gradient(135deg, var(--bg-2) 0%, #120033 60%, #000 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-size: cover, 100% 2px;
  background-attachment: fixed;
  background-blend-mode: overlay;
  text-rendering: optimizeLegibility;
}

body:not(.no-tilt) {
  animation: drift 18s linear infinite;
}
@keyframes drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: -40px 0, 0 0; }
}

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

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

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.12); }

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

/* Header (hero) */
header {
  padding: 2rem 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  letter-spacing: .4px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(12px, 1.6vw, 14px);
  margin-top: 0.25rem;
}

/* Main/content area */
main { padding: 1rem 0 2rem; }
article { max-width: 760px; margin: 0 auto; }

/* Featured image frame style (including fallback for non-frame usage) */
.featured-image { display: block; width: 100%; margin: 0 auto 1rem; }
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.01);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Content typography tweaks */
.content { color: var(--text); font-size: clamp(15px, 2.2vw, 18px); line-height: 1.6; }
.content h2, .content h3 { line-height: 1.25; margin: .75rem 0 .5rem; }
.content p { margin: .5rem 0 1rem; }
.content ul { margin: .5rem 0 1rem; padding-left: 1.25rem; }
.content li { margin: .25rem 0; }

/* Inline elements and interactions */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

button, .btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5ch;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: .65em 1em;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  text-decoration: none;
  font: inherit;
  line-height: 1;
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #7a7aff 100%);
  border: none;
  color: #fff;
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  color: var(--text);
}
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .15em .5em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  color: var(--text);
}

/* Utility & layout helpers */
ul, li { margin: 0; padding: 0; list-style: none; }
.container-fluid { width: 100%; padding-inline: 1rem; }

/* Product/ad section in footer */
.product-ad {
  padding: 1rem;
  margin: 0 0 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .08);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.product-ad h3 { margin: 0; font-size: 1.1rem; }
.product-ad p { margin: 0; font-weight: 500; color: var(--text); }
.product-ad a { text-decoration: none; color: var(--text); }

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

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  a { color: #06c; text-decoration: underline; }
  .glass, .image-frame, .card { background: #fff; border: 0; box-shadow: none; }
}

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