/* ================================================================
   落秋阁 V11 黑金至尊版 — 安全增强版
   原则：只做增强，不覆盖原背景/动画，避免内容消失
   ================================================================ */

/* ==============================
   零、V11 设计令牌
   ============================== */
:root {
  --gold-100: #fff8e7;
  --gold-200: #ffe9b8;
  --gold-300: #ffd978;
  --gold-400: #f5c542;
  --gold-500: #ecd089;
  --gold-600: #d6b66a;
  --gold-700: #b8942f;
  --gold-800: #9c7130;
  --gold-900: #6b4218;

  --copper-300: #e8a87c;
  --copper-500: #c47a3a;
  --copper-700: #7d4018;

  --glass-blur:   20px;
  --glass-saturate: 1.12;
  --glass-border: rgba(236,208,137,.18);

  --shadow-card:     0 6px 30px rgba(100,60,20,.06), inset 0 1px 0 rgba(255,255,255,.8);
  --shadow-card-hover:0 12px 40px rgba(100,60,20,.08), inset 0 1px 0 rgba(255,255,255,.9), 0 0 20px rgba(214,182,106,.06);
  --shadow-hero:     0 12px 40px rgba(100,60,20,.06);
  --shadow-panel:    0 8px 36px rgba(100,60,20,.06), 0 0 30px rgba(214,182,106,.04);

  --radius-lg:  20px;
  --radius-xl:  24px;
  --radius-2xl: 28px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================
   一、卡片玻璃增强
   ============================== */
.card, .auth-card, .modal-card {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(236,208,137,.28);
}

.hero-panel {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-hero);
}

.resource-card {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236,208,137,.3);
  box-shadow: var(--shadow-card-hover);
}

.modal-card {
  box-shadow: var(--shadow-panel);
}

/* ==============================
   二、侧边栏桌面端增强
   ============================== */
@media(min-width:861px) {
  .sidebar {
    border-radius: var(--radius-xl);
    box-shadow: 0 28px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(18px) saturate(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
  }

  .side-brand b {
    background: linear-gradient(92deg, #fff6dc, #ecd089 46%, #fff6dc 72%, #d6b66a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(236,208,137,.2);
    font-size: 26px;
    letter-spacing: 6px;
  }

  .side-nav a {
    border-radius: 12px;
  }

  .side-nav a.active {
    background: linear-gradient(135deg, rgba(214,182,106,.18), rgba(156,113,48,.08));
    color: #ecd089;
    box-shadow: 0 0 20px rgba(214,182,106,.2), inset 0 1px 0 rgba(255,255,255,.08);
    transform: translateX(2px);
  }

  .side-nav a.active::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, transparent, #ecd089, transparent);
    box-shadow: 0 0 14px rgba(236,208,137,.4), 0 0 30px rgba(236,208,137,.15);
  }

  .side-nav a:hover {
    background: linear-gradient(135deg, rgba(214,182,106,.1), rgba(156,113,48,.04));
    transform: translateX(2px);
    color: #d6b66a;
  }

  .side-footer {
    background: linear-gradient(160deg, rgba(255,253,250,.96), rgba(248,244,236,.96));
    border-top: 1px solid rgba(236,208,137,.1);
  }
}

/* ==============================
   三、滚动渐入（安全版——无opacity:0）
   ============================== */
.scroll-reveal {
  transform: translateY(8px);
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal.stagger-1 { transition-delay: 0.03s; }
.scroll-reveal.stagger-2 { transition-delay: 0.06s; }
.scroll-reveal.stagger-3 { transition-delay: 0.09s; }
.scroll-reveal.stagger-4 { transition-delay: 0.12s; }

/* ==============================
   四、按钮涟漪 + 金色增强
   ============================== */
.gold-btn, .ghost-btn, .danger-btn {
  position: relative;
  overflow: hidden;
}

.gold-btn::after, .ghost-btn::after, .danger-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.25) 0%, transparent 70%);
  opacity: 0;
  transform: scale(2);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}

.gold-btn:active::after, .ghost-btn:active::after, .danger-btn:active::after {
  opacity: 1;
  transform: scale(0);
  transition: 0s;
}

.gold-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 14px 34px rgba(214,182,106,.28),
    0 0 40px rgba(255,218,122,.14);
  filter: brightness(1.06) saturate(1.05);
}

/* ==============================
   五、输入框焦点增强
   ============================== */
.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus {
  border-color: rgba(236,208,137,.5);
  box-shadow:
    0 0 0 3px rgba(214,182,106,.1),
    0 0 28px rgba(214,182,106,.08),
    inset 0 0 0 1px rgba(236,208,137,.06);
}

/* ==============================
   六、滚动条美化
   ============================== */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: rgba(0,0,0,.2); border-radius: 999px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(236,208,137,.3), rgba(156,113,48,.2));
  border-radius: 999px;
  border: 1px solid rgba(236,208,137,.1);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(236,208,137,.5), rgba(180,130,60,.35));
}

/* ==============================
   七、模态遮罩增强
   ============================== */
.modal {
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ==============================
   八、移动端——减动效保性能
   ============================== */
@media(max-width:860px) {
  :root { --glass-blur: 12px; }

  .card:hover, .resource-card:hover { transform: none; }

  .scroll-reveal {
    transform: translateY(4px);
    transition-duration: 0.4s;
  }
}

/* ==============================
   九、方案二动画 — Hero浮动 + 徽章呼吸 + 页面过渡
   ============================== */

/* Hero标题缓慢浮动 */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.hero-title {
  animation: heroFloat 8s var(--ease-smooth) infinite;
}

/* 官方徽章金色呼吸光 */
@keyframes sealBreathe {
  0%, 100% { box-shadow: 0 0 16px rgba(236,208,137,.08); }
  50%      { box-shadow: 0 0 32px rgba(236,208,137,.22), 0 0 48px rgba(236,208,137,.06); }
}

.official-seal {
  animation: sealBreathe 2.5s var(--ease-smooth) infinite;
}

/* 页面轻升入场 */
@keyframes pageRise {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}

/* .page 动画暂缓——排查 */

/* 顶部导航条下划装饰线 */
.topbar::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 8px;
  background: linear-gradient(90deg, transparent, rgba(236,208,137,.5), transparent);
  border-radius: 2px;
}

/* 卡片悬浮微呼吸（非hover时）*/
@keyframes cardIdle {
  0%, 100% { box-shadow: var(--shadow-card); }
  50%      { box-shadow: 0 6px 30px rgba(100,60,20,.06), inset 0 1px 0 rgba(255,255,255,.8), 0 0 24px rgba(214,182,106,.04); }
}

/* .card 呼吸动画暂缓——排查 */

/* 快速入口磁吸微动 */
.quick {
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-smooth), border-color 0.2s var(--ease-smooth);
}

.quick:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(236,208,137,.36);
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 28px rgba(214,182,106,.08);
}

/* ==============================
   十、无障碍——尊重系统偏好
   ============================== */
@media(prefers-reduced-motion: reduce) {
  .scroll-reveal, .card-enter, .hero-title, .official-seal, .card {
    animation: none !important;
  }
  .hero-title, .official-seal, .card, .scroll-reveal, .card-enter {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .card:hover, .resource-card:hover, .quick:hover { transform: none !important; }
  #lq-particle-canvas { display: none; }
  .v11-sparkles { display: none; }
}
