/* ════════════════════════════════════════════════════════════
   FLOURISH — Cinematic Atmosphere & Enhanced Graphics
   Layered aurora background, glassmorphic cards, gold sheen,
   shimmer brand, breathing accents. Sits on top of v10 tokens.
   ════════════════════════════════════════════════════════════ */

/* ── Falling mana canvas — behind all content ── */
#mana-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 1.2s ease;
}
#app { position: relative; z-index: 1; }

/* ── Atmospheric aurora background (layered radial gradients) ── */
[data-theme="dark"] body,
html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,168,76,0.10), transparent 55%),
    radial-gradient(ellipse 60% 40% at 12% 8%, rgba(139,90,124,0.08), transparent 50%),
    radial-gradient(ellipse 55% 45% at 88% 6%, rgba(90,143,110,0.07), transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 115%, rgba(201,168,76,0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
[data-theme="light"] body,
html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139,105,20,0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 12% 8%, rgba(122,80,110,0.05), transparent 50%),
    radial-gradient(ellipse 55% 45% at 88% 6%, rgba(74,122,94,0.05), transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

/* slow drifting aurora veil (pseudo-element so it doesn't fight the canvas) */
body::before {
  content: '';
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,168,76,0.05), transparent 40%),
    radial-gradient(circle at 70% 65%, rgba(139,90,124,0.04), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(90,143,110,0.04), transparent 40%);
  animation: aurora-drift 38s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.05); opacity: 0.7; }
  50%  { transform: translate3d( 2%,  2%, 0) scale(1.12); opacity: 1; }
  100% { transform: translate3d(-1%, -2%, 0) scale(1.08); opacity: 0.85; }
}
[data-theme="light"] body::before { mix-blend-mode: multiply; opacity: 0.5; }

/* ── Glassmorphic cards ── */
.card,
.card-enter {
  position: relative;
  background: linear-gradient(160deg, rgba(30,52,30,0.72), rgba(13,26,17,0.62));
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(201,168,76,0.18);
  box-shadow:
    0 1px 0 rgba(255,240,200,0.04) inset,
    0 8px 32px rgba(0,0,0,0.32),
    0 0 0 1px rgba(0,0,0,0.2);
  overflow: hidden;
}
[data-theme="light"] .card,
[data-theme="light"] .card-enter {
  background: linear-gradient(160deg, rgba(255,250,242,0.78), rgba(245,239,230,0.62));
  border: 1px solid rgba(139,105,20,0.16);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 8px 28px rgba(60,50,30,0.10);
}
/* subtle top sheen line on cards */
.card::before,
.card-enter::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.55), transparent);
  opacity: 0.8;
}

/* ── Header gold sheen + glow ── */
.app-header {
  background: linear-gradient(180deg, rgba(13,26,17,0.92), rgba(13,26,17,0.6));
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(201,168,76,0.22);
  box-shadow: 0 6px 24px rgba(0,0,0,0.28);
}
[data-theme="light"] .app-header {
  background: linear-gradient(180deg, rgba(255,250,242,0.94), rgba(255,250,242,0.7));
  border-bottom: 1px solid rgba(139,105,20,0.22);
}
.app-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(201,168,76,0.6) 50%, transparent 90%);
}

/* ── Brand shimmer ── */
.brand .title {
  background: linear-gradient(135deg, #dfc07a 0%, #c9a84c 35%, #fff4d0 50%, #c9a84c 65%, #a6883e 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 6s linear infinite;
  letter-spacing: 0.02em;
  filter: drop-shadow(0 0 10px rgba(201,168,76,0.25));
}
[data-theme="light"] .brand .title {
  background: linear-gradient(135deg, #a68a30 0%, #8b6914 35%, #dfc07a 50%, #8b6914 65%, #6b520f 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 6s linear infinite;
  filter: drop-shadow(0 0 6px rgba(139,105,20,0.18));
}
@keyframes shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}
.brand .logo {
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.4));
  animation: breathe-logo 5s ease-in-out infinite;
  display: inline-block;
}
@keyframes breathe-logo {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(201,168,76,0.4)); }
  50%     { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(201,168,76,0.6)); }
}

/* ── Bottom nav glass + active gold glow ── */
.bottom-nav {
  background: linear-gradient(0deg, rgba(13,26,17,0.94), rgba(13,26,17,0.7));
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid rgba(201,168,76,0.22);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.28);
}
[data-theme="light"] .bottom-nav {
  background: linear-gradient(0deg, rgba(255,250,242,0.95), rgba(255,250,242,0.72));
  border-top: 1px solid rgba(139,105,20,0.22);
}
.nav-btn {
  transition: color var(--transition) 0.2s, text-shadow 0.25s;
  position: relative;
}
.nav-btn.active {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(201,168,76,0.6);
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(201,168,76,0.8), 0 0 22px rgba(201,168,76,0.5);
}

/* ── Card header gold underline + breathing icon ── */
.card-header {
  border-bottom: 1px solid rgba(201,168,76,0.15);
  background: linear-gradient(180deg, rgba(201,168,76,0.06), transparent);
}
.card-header .icon {
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.3));
  display: inline-block;
}

/* ── Primary button gold sheen ── */
.btn-primary {
  background: linear-gradient(135deg, #c9a84c 0%, #a6883e 50%, #dfc07a 100%);
  background-size: 200% 100%;
  border: 1px solid rgba(201,168,76,0.6);
  color: #1a1408;
  font-weight: 700;
  box-shadow:
    0 1px 0 rgba(255,240,200,0.4) inset,
    0 6px 18px rgba(201,168,76,0.28),
    0 0 0 1px rgba(0,0,0,0.2);
  transition: background-position 0.4s ease, box-shadow 0.25s, transform 0.12s;
  animation: btn-sheen 8s ease-in-out infinite;
}
.btn-primary:hover, .btn-primary:active {
  background-position: 100% 0;
  box-shadow:
    0 1px 0 rgba(255,240,200,0.5) inset,
    0 8px 26px rgba(201,168,76,0.42),
    0 0 0 1px rgba(201,168,76,0.4);
  transform: translateY(-1px);
}
@keyframes btn-sheen {
  0%,100% { background-position: 0 0; }
  50%     { background-position: 80% 0; }
}

/* ── Verse block — gilded treatment for lesson scripture ── */
.card div[style*="border-left:3px solid var(--accent)"] {
  background: linear-gradient(90deg, rgba(201,168,76,0.07), transparent 70%);
  padding: 14px 16px !important;
  border-radius: 0 8px 8px 0;
  box-shadow: inset 3px 0 0 rgba(201,168,76,0.4), 0 0 20px rgba(201,168,76,0.06);
}

/* ── Plan day rows — hover lift + mana-spark on tap ── */
.plan-day {
  transition: transform 0.15s var(--transition), background 0.2s, box-shadow 0.2s;
  border-radius: 12px;
}
.plan-day:hover {
  transform: translateX(2px);
  background: rgba(201,168,76,0.05);
}
.plan-day.done { opacity: 0.78; }

/* ── Accent text glow ── */
.week-detail-eyebrow,
.card-header .icon {
  text-shadow: 0 0 12px rgba(201,168,76,0.18);
}

/* ── Scroll reveal — cards breathe in ── */
.card-enter { animation: card-rise 0.55s var(--transition) both; }
@keyframes card-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Empty / error states get atmosphere too ── */
.empty-state, .error-state {
  background: linear-gradient(160deg, rgba(30,52,30,0.5), rgba(13,26,17,0.4));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

/* ── Reduced motion: kill animations, keep static beauty ── */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .brand .title, .brand .logo, .btn-primary { animation: none; }
  .card-enter { animation: none; opacity: 1; transform: none; }
  #mana-canvas { opacity: 0.35; }
}