/* ============================================================================
   Aestryon redesign layer (2026-07) — a calmer, premium "glass" pass over the
   existing neon identity. Loaded LAST so it overrides without touching the
   working base/component styles; remove the <link> to revert entirely.
   Scope: desktop feed chrome (header, side controls, cards). Mobile keeps its
   own layout; only shared visual tokens (glass buttons, card captions) reach it.
   ============================================================================ */

:root {
  --rd-glass: rgba(12, 16, 32, 0.55);
  --rd-glass-soft: rgba(255, 255, 255, 0.045);
  --rd-glass-hover: rgba(255, 255, 255, 0.08);
  --rd-hair: rgba(255, 255, 255, 0.09);
  --rd-hair-soft: rgba(255, 255, 255, 0.06);
  --rd-blue: #7b8cff;
  --rd-pink: #ff4d79;
  --rd-blur: blur(24px) saturate(150%);
  --rd-shadow: 0 22px 55px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --rd-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 1. Cohesive glass buttons (the "dock" feel) ---------------------
   Every side-rail control shares .magic-btn. Reskinning it once makes the
   scattered buttons read as one refined system: hairline glass, soft glow on
   hover, restrained accent instead of a heavy neon border. */
body .magic-btn {
  background: var(--rd-glass) !important;
  border: 1px solid var(--rd-hair) !important;
  -webkit-backdrop-filter: var(--rd-blur);
  backdrop-filter: var(--rd-blur);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.82);
  transition: transform 0.25s var(--rd-ease), border-color 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease !important;
}
body .magic-btn:hover {
  transform: translateY(-2px);
  background: var(--rd-glass-hover) !important;
  border-color: rgba(123, 140, 255, 0.32) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 22px rgba(123, 140, 255, 0.2) !important;
}
/* Keep the colour identity as a soft glow, not a slab fill. */
body .magic-btn.m-pink:hover,
body .magic-btn.m-red:hover {
  border-color: rgba(255, 77, 121, 0.36) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 77, 121, 0.22) !important;
}
body .magic-btn.m-gold:hover {
  border-color: rgba(255, 184, 0, 0.34) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 184, 0, 0.2) !important;
}
/* The decorative inner core glow was the main source of the "heavy" look. */
body .magic-btn .magic-core {
  opacity: 0.35 !important;
  filter: blur(6px);
}

/* NSFW / Zen keep a subtle tinted identity. */
body #nsfw-toggle {
  border-color: rgba(255, 77, 121, 0.3) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 77, 121, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* The music player becomes a single glass dock panel. */
body #music-player {
  background: var(--rd-glass) !important;
  border: 1px solid var(--rd-hair) !important;
  -webkit-backdrop-filter: var(--rd-blur);
  backdrop-filter: var(--rd-blur);
  box-shadow: var(--rd-shadow) !important;
  border-radius: 22px !important;
}

/* ---------- 2. Calm header ------------------------------------------------- */
body.feed-mode .feed-title {
  font-size: clamp(22px, 2.4vw, 30px) !important;
  letter-spacing: 0.06em !important;
  filter: drop-shadow(0 0 22px rgba(123, 140, 255, 0.18));
}
body.feed-mode .feed-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
  padding: 7px 15px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--rd-hair) !important;
  -webkit-backdrop-filter: var(--rd-blur);
  backdrop-filter: var(--rd-blur);
  color: rgba(212, 221, 255, 0.72) !important;
  font-size: 12px !important;
}

/* ---------- 3. Feed cards: premium glass + name/series caption ------------- */
body.feed-mode .feed-card {
  border: 1px solid var(--rd-hair-soft) !important;
  border-radius: 20px !important;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.35s var(--rd-ease), border-color 0.35s ease, box-shadow 0.35s ease !important;
}
body.feed-mode .feed-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 140, 255, 0.3) !important;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.5), 0 0 34px rgba(123, 140, 255, 0.16) !important;
}

/* Caption bar → frosted glass with a clear name / muted series hierarchy. */
body.feed-mode .feed-meta {
  background:
    linear-gradient(180deg, rgba(10, 13, 26, 0.2), rgba(8, 11, 22, 0.72)) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border-top: 1px solid var(--rd-hair-soft);
}
body.feed-mode .feed-caption {
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  color: #ffffff !important;
}
body.feed-mode .feed-anime {
  color: rgba(190, 205, 255, 0.62) !important;
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce) {
  body .magic-btn,
  body.feed-mode .feed-card {
    transition: none !important;
  }
}

/* ---------- 4. 18+ age-gate modal ------------------------------------------ */
.age-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 14, 0.66);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  animation: rdAgeFade 0.28s ease both;
}
.age-gate-modal[hidden] {
  display: none !important;
}
.age-gate-panel {
  width: min(420px, 100%);
  padding: 28px 26px 22px;
  text-align: center;
  border-radius: 26px;
  background:
    radial-gradient(130% 90% at 50% -10%, rgba(255, 77, 121, 0.14), transparent 60%),
    rgba(14, 18, 32, 0.92);
  border: 1px solid var(--rd-hair);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: rdAgeIn 0.42s var(--rd-ease) both;
}
.age-gate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #ffd7e0;
  background: linear-gradient(180deg, rgba(255, 77, 121, 0.24), rgba(255, 77, 121, 0.08));
  border: 1px solid rgba(255, 77, 121, 0.4);
  box-shadow: 0 0 26px rgba(255, 77, 121, 0.28);
}
.age-gate-panel h2 {
  margin: 0 0 8px;
  font-family: "Orbitron", sans-serif;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: #fff;
}
.age-gate-panel p {
  margin: 0 auto 22px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(210, 220, 245, 0.66);
}
.age-gate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.age-gate-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 12px 18px;
  border-radius: 14px;
  font-family: "Orbitron", sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s var(--rd-ease), box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}
.age-gate-cancel {
  color: rgba(226, 232, 255, 0.82);
  background: var(--rd-glass-soft);
  border: 1px solid var(--rd-hair);
}
.age-gate-cancel:hover {
  background: var(--rd-glass-hover);
  transform: translateY(-1px);
}
.age-gate-confirm {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 77, 121, 0.32), rgba(255, 77, 121, 0.14));
  border: 1px solid rgba(255, 77, 121, 0.44);
  box-shadow: 0 0 22px rgba(255, 77, 121, 0.2);
}
.age-gate-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(255, 77, 121, 0.32);
}
.age-gate-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

@keyframes rdAgeFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes rdAgeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .age-gate-modal,
  .age-gate-panel {
    animation: none !important;
  }
}
