/* ============ ONEDAY · Premium background ============ */

.premium-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate(var(--px, 0px), var(--py, 0px));
  will-change: transform;
}

.premium-bg .base {
  position: absolute;
  inset: 0;
}

/* Два слоя фона: тёмный ::before, светлый ::after */
.premium-bg .base::before,
.premium-bg .base::after {
  content: '';
  position: absolute;
  inset: 0;
  transition: opacity 0.8s ease;
}

/* ТЁМНЫЙ слой */
.premium-bg .base::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(79,107,255,0.22) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 100%, rgba(168,85,247,0.18) 0%, transparent 50%),
    linear-gradient(180deg, #0A0E14 0%, #06090D 100%);
  opacity: 1;
}

/* СВЕТЛЫЙ слой */
.premium-bg .base::after {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(79,107,255,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 100%, rgba(168,85,247,0.14) 0%, transparent 50%),
    linear-gradient(180deg, #FAFBFF 0%, #F1F3FA 100%);
  opacity: 0;
}

/* Переключение темы — меняем только прозрачность */
html[data-theme="light"] .premium-bg .base::before { opacity: 0; }
html[data-theme="light"] .premium-bg .base::after  { opacity: 1; }

/* ============ BLOBS ============ */
.premium-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform, opacity;
  transition: opacity 0.8s ease;
}
.premium-bg .blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(79,107,255,0.55) 0%, rgba(79,107,255,0) 60%);
  top: -20%; left: -15%;
  animation: blob-1 22s ease-in-out infinite;
}
.premium-bg .blob-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(168,85,247,0.5) 0%, rgba(168,85,247,0) 60%);
  top: 15%; right: -18%;
  animation: blob-2 26s ease-in-out infinite;
}
.premium-bg .blob-3 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(79,107,255,0.4) 0%, rgba(79,107,255,0) 60%);
  bottom: -25%; left: 25%;
  animation: blob-3 20s ease-in-out infinite;
}

@keyframes blob-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(100px, 80px) scale(1.15); }
  66%      { transform: translate(-50px, 40px) scale(0.95); }
}
@keyframes blob-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-120px, 60px) scale(1.2); }
}
@keyframes blob-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(80px, -70px) scale(1.1); }
}

html[data-theme="dark"] .premium-bg .blob { opacity: 0.9; }
html[data-theme="light"] .premium-bg .blob { opacity: 0.7; }

/* ============ СЕТКА ============ */
.premium-bg .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,107,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,107,255,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at center, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at center, #000 10%, transparent 70%);
  transition: opacity 0.8s ease;
}
html[data-theme="dark"] .premium-bg .grid { opacity: 0.6; }
html[data-theme="light"] .premium-bg .grid { opacity: 0.9; }

/* ============ ВИНЬЕТКА (тоже двумя слоями) ============ */
.premium-bg .vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.premium-bg .vignette::before,
.premium-bg .vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  transition: opacity 0.8s ease;
}
.premium-bg .vignette::before {
  background: radial-gradient(ellipse at center, transparent 35%, rgba(6,9,13,0.7) 100%);
  opacity: 1;
}
.premium-bg .vignette::after {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(241,243,250,0.6) 100%);
  opacity: 0;
}
html[data-theme="light"] .premium-bg .vignette::before { opacity: 0; }
html[data-theme="light"] .premium-bg .vignette::after  { opacity: 1; }

/* ============ КОНТЕНТ ПОВЕРХ ============ */
.header, main, footer {
  position: relative;
  z-index: 1;
}

/* ============ ПЛАВНАЯ СМЕНА ЦВЕТОВ ТЕКСТА / ГРАНИЦ ============ */
/* Всё, кроме градиентных фонов, переходит за 0.6s */
body, header, footer, main, section, article, div, a, button, input, textarea, select, h1, h2, h3, h4, h5, p, span, label, li {
  transition:
    background-color 0.6s ease,
    color            0.6s ease,
    border-color     0.6s ease,
    box-shadow       0.6s ease;
}