/* ==========================================================
   秋日影像集 · 基础样式
   ========================================================== */
:root {
  --sky-top: #5fa8e8;
  --sky-mid: #9fd0f4;
  --sky-low: #e2eff8;
  --gold: #e3a033;
  --gold-deep: #c9822a;
  --gold-soft: #f3d79a;
  --brown: #40301f;
  --brown-2: #6b543a;
  --brown-3: #9a8468;
  --green: #2f855a;
  --green-2: #46a06b;
  --glass: rgba(255, 252, 245, 0.58);
  --glass-strong: rgba(255, 252, 246, 0.78);
  --glass-border: rgba(255, 255, 255, 0.72);
  --shadow-lg: 0 40px 90px rgba(72, 46, 14, 0.28), 0 8px 24px rgba(72, 46, 14, 0.12);
  --shadow-md: 0 18px 40px rgba(72, 46, 14, 0.16), 0 2px 8px rgba(72, 46, 14, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--brown);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
  background: #a9d4f3;
  overflow-x: hidden;
}

/* ---------- 秋日场景背景 ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene::before {
  content: "";
  position: absolute;
  inset: -48px;
  background-image: url("/assets/autumn-bg.jpg");
  background-size: cover;
  background-position: center 42%;
  opacity: 0.9;
  filter: blur(30px) saturate(1.05) brightness(1.03);
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(255, 255, 255, 0.5), transparent 62%),
    linear-gradient(180deg,
      rgba(95, 168, 232, 0.24) 0%,
      rgba(159, 208, 244, 0.08) 32%,
      rgba(246, 232, 203, 0.16) 66%,
      rgba(232, 189, 110, 0.32) 100%);
}

.sun-glow {
  position: absolute;
  width: 52vw;
  height: 52vw;
  left: 50%;
  top: -26vw;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 249, 232, 0.85) 0%, rgba(255, 243, 214, 0.35) 38%, transparent 68%);
  filter: blur(6px);
  opacity: 0.85;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(30px);
  opacity: 0.7;
}
.cloud.c1 { width: 34vw; height: 9vw; left: 6%; top: 13%; }
.cloud.c2 { width: 26vw; height: 7vw; right: 4%; top: 24%; opacity: 0.5; }
.cloud.c3 { width: 42vw; height: 10vw; left: 28%; top: 38%; opacity: 0.35; }

/* 底部金色落叶剪影 */
.leaf-bed {
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: -10vh;
  height: 42vh;
  background:
    radial-gradient(60% 70% at 12% 96%, rgba(196, 122, 42, 0.55), transparent 70%),
    radial-gradient(50% 60% at 46% 104%, rgba(214, 150, 55, 0.6), transparent 72%),
    radial-gradient(55% 65% at 82% 98%, rgba(176, 104, 34, 0.5), transparent 70%);
  filter: blur(26px);
}

/* 飘落的叶子 */
.falling {
  position: absolute;
  top: -12vh;
  color: #c47a2a;
  opacity: 0;
  animation: fall linear infinite;
  will-change: transform;
}
.falling svg { display: block; width: 100%; height: 100%; }
@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.65; }
  50% { transform: translate3d(4vw, 50vh, 0) rotate(160deg); }
  92% { opacity: 0.65; }
  100% { transform: translate3d(-2vw, 112vh, 0) rotate(340deg); opacity: 0; }
}

/* ---------- 玻璃窗 ---------- */
.window {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 0;
  user-select: none;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }

.chrome-title {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: rgba(64, 48, 31, 0.52);
  font-weight: 500;
  padding-right: 52px;
}

/* ---------- 通用控件 ---------- */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 10px rgba(72, 46, 14, 0.08), inset 0 1px 0 #fff;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(72, 46, 14, 0.14), inset 0 1px 0 #fff; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-green {
  color: #fff;
  background: linear-gradient(180deg, #4fa672 0%, #2f855a 100%);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 24px rgba(47, 133, 90, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn-green:hover { box-shadow: 0 14px 30px rgba(47, 133, 90, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.32); }

.btn-ghost { background: rgba(255, 255, 255, 0.36); }

.btn svg { width: 17px; height: 17px; flex: none; }

.field {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 2px 6px rgba(72, 46, 14, 0.06), 0 1px 0 #fff;
  font-family: inherit;
  font-size: 16px;
  color: var(--brown);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder { color: rgba(107, 84, 58, 0.42); }
.field:focus {
  border-color: rgba(227, 160, 51, 0.85);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 4px rgba(227, 160, 51, 0.16), inset 0 1px 3px rgba(72, 46, 14, 0.04);
}

/* ---------- 提示条 ---------- */
.toast-box {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  background: rgba(56, 42, 26, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(40, 25, 8, 0.3);
  animation: toastIn 0.4s var(--ease) both;
}
.toast.ok { background: linear-gradient(180deg, rgba(64, 152, 105, 0.95), rgba(41, 117, 81, 0.95)); }
.toast.warn { background: linear-gradient(180deg, rgba(214, 138, 45, 0.96), rgba(184, 110, 30, 0.96)); }
.toast.err { background: linear-gradient(180deg, rgba(201, 92, 74, 0.96), rgba(167, 66, 50, 0.96)); }
.toast.out { animation: toastOut 0.3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.97); } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 88, 48, 0.28);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .falling { display: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
