/* ================================================================
   落秋阁 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; }
  .lq-shard { display: none !important; }
  .lq-magnet { transform: none !important; }
  .lq-card { transform: none !important; }
}

/* ============================================================
   V14 — 玻璃破碎弹跳 / 磁性吸附 / 卡片呼吸 / 粒子飞溅
   全站统一的"帅"反馈：点击炸玻璃、悬停吸附、卡片入场跳动
   ============================================================ */

/* --- 玻璃破碎碎片（点击瞬间弹出） --- */
.lq-shard {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, rgba(236, 208, 137, 0.95), rgba(184, 148, 47, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 8px rgba(236, 208, 137, 0.7);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  animation: lqShardFly 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.lq-shard.s1 { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.lq-shard.s2 { clip-path: polygon(0% 0%, 100% 0%, 50% 100%); }
.lq-shard.s3 { clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50% 100%); }
.lq-shard.s4 { clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%); }
.lq-shard.s5 { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.lq-shard.s6 { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
@keyframes lqShardFly {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, 60px), var(--ty, -60px)) rotate(var(--rot, 180deg)) scale(0.3); }
}

/* --- 磁性吸附：悬停时按钮向鼠标方向轻微倾斜 --- */
.lq-magnet {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* --- 卡片入场跳动（GSAP 也会触发，这里兜底CSS）--- */
@keyframes lqCardPop {
  0%   { transform: scale(0.85) translateY(20px); opacity: 0; }
  60%  { transform: scale(1.04) translateY(-4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.lq-card {
  animation: lqCardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --- 卡片呼吸光（鼠标悬停时金边"点燃"）--- */
@keyframes lqGlowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 208, 137, 0), 0 8px 32px rgba(100, 60, 20, 0.08); }
  50%      { box-shadow: 0 0 0 6px rgba(236, 208, 137, 0.15), 0 12px 40px rgba(184, 148, 47, 0.25); }
}
.card, .auth-card, .modal-card, .lq-tile {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover, .auth-card:hover, .lq-tile:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(184, 148, 47, 0.5);
  box-shadow: 0 0 0 1px rgba(236, 208, 137, 0.4), 0 18px 48px rgba(184, 148, 47, 0.18);
}
.card:active, .auth-card:active, .lq-tile:active {
  transform: translateY(-2px) scale(0.985);
  transition: transform 0.08s ease;
}

/* --- 按钮：按下时炸玻璃 + 跳一下 --- */
.gold-btn, .ghost-btn, .danger-btn, .tab, button {
  position: relative;
  overflow: visible;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.gold-btn:hover, .ghost-btn:hover, .danger-btn:hover, .tab:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.gold-btn:active, .ghost-btn:active, .danger-btn:active, .tab:active {
  transform: translateY(0) scale(0.96);
  transition: transform 0.06s ease;
}

/* --- 链接式导航（侧边栏主链接 / 板块卡）滑入金线 --- */
.lq-nav-link, .side-nav .main-link, .side-nav .sub, .zone-card {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, background 0.2s ease;
}
.lq-nav-link::before, .side-nav .main-link::before, .side-nav .sub::before, .zone-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #b8942f, transparent);
  transform: translateY(-50%);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.lq-nav-link:hover::before, .side-nav .main-link:hover::before, .side-nav .sub:hover::before, .zone-card:hover::before {
  width: 100%;
}

/* --- 输入框：聚焦时金边"通电"--- */
.field input, .field select, .field textarea, .search-box input {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus {
  border-color: rgba(184, 148, 47, 0.7);
  box-shadow: 0 0 0 4px rgba(236, 208, 137, 0.25), 0 8px 24px rgba(184, 148, 47, 0.12);
  transform: translateY(-1px);
}

/* --- 标题入场：金色描边闪一下 --- */
@keyframes lqTitleShine {
  0%   { text-shadow: 0 0 0 transparent, 0 2px 12px rgba(180, 140, 60, 0.15); }
  50%  { text-shadow: 0 0 28px rgba(236, 208, 137, 0.6), 0 2px 12px rgba(180, 140, 60, 0.3); }
  100% { text-shadow: 0 0 0 transparent, 0 2px 12px rgba(180, 140, 60, 0.15); }
}
h1, h2, h3, .topbar h2, .brand h1 {
  animation: lqTitleShine 1.6s ease-in-out 0.3s both;
}

/* --- 顶部导航条入场 --- */
@keyframes lqSlideDown {
  0%   { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.topbar, .admin-top {
  animation: lqSlideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- 侧边栏入场 --- */
@keyframes lqSlideRight {
  0%   { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.sidebar {
  animation: lqSlideRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- 背景金色光斑（页面加载时飘过）--- */
@keyframes lqBgSpot {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.3; }
  50%  { transform: translate(40px, -30px) scale(1.2); opacity: 0.6; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
}
body::after {
  content: "";
  position: fixed;
  top: 20%;
  right: 8%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(236, 208, 137, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: lqBgSpot 8s ease-in-out infinite;
}

/* --- "装"装载画面（板块选择页用）--- */
.lq-loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(184, 148, 47, 0.3);
  border-top-color: #b8942f;
  border-radius: 50%;
  animation: lqSpin 0.8s linear infinite;
}
@keyframes lqSpin {
  to { transform: rotate(360deg); }
}

/* --- 选区高亮（帅的金色）--- */
::selection {
  background: rgba(236, 208, 137, 0.5);
  color: #3a2e1a;
}
