/* ============================================================
   冒险岛怀旧版 · 经典 UI 风格样式
   （米黄窗口 + 深棕描边 + 天空蓝 + 草地绿，原汁原味老岛味）
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: #5b3a16;
  background: linear-gradient(#5cb8ee 0%, #8fd3f6 55%, #c9ecfa 100%) fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------------- 通用按钮（游戏立体按键风） ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(#ffb13b, #f0821e);
  border: 3px solid #5b3a16;
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 1rem;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(91, 58, 22, .55);
  box-shadow: 0 5px 0 #a0522d, 0 8px 14px rgba(61, 38, 14, .35);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  text-decoration: none;
  user-select: none;
}
.btn:hover { filter: brightness(1.07); }
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #a0522d, 0 3px 6px rgba(61, 38, 14, .3);
}
.btn:focus-visible { outline: 3px solid #ffd257; outline-offset: 2px; }

.btn-primary { background: linear-gradient(#ffb13b, #f0821e); }
.btn-ghost {
  color: #6b3f16;
  background: linear-gradient(#fff6dd, #f3e2b3);
  text-shadow: none;
  box-shadow: 0 5px 0 #b8975a, 0 8px 14px rgba(61, 38, 14, .25);
}
.btn-ghost:active { box-shadow: 0 1px 0 #b8975a, 0 3px 6px rgba(61, 38, 14, .25); }
.btn-qq {
  background: linear-gradient(#4cb5ff, #1677d9);
  box-shadow: 0 4px 0 #0d55a0, 0 6px 10px rgba(13, 85, 160, .35);
}
.btn-qq:active { box-shadow: 0 1px 0 #0d55a0; }
.btn-sm { padding: 7px 16px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 14px 30px; font-size: 1.15rem; border-radius: 14px; }
.btn-xl {
  width: 100%;
  padding: 15px 30px;
  font-size: 1.25rem;
  border-radius: 14px;
}
.btn-copy {
  color: #6b3f16;
  background: linear-gradient(#fff6dd, #f3e2b3);
  text-shadow: none;
  box-shadow: 0 3px 0 #b8975a;
  padding: 7px 18px;
  font-size: .9rem;
  border-radius: 10px;
}
.btn-copy:active { box-shadow: 0 1px 0 #b8975a; }

/* ---------------- 顶部导航（木质板） ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(#7a4a21, #5f3717);
  border-bottom: 4px solid #3d240c;
  box-shadow: 0 4px 14px rgba(40, 24, 8, .4);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  color: #ffe9c4;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #3d240c;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.logo-icon { font-size: 1.4rem; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.version-badge {
  background: #ffd257;
  color: #6b3f16;
  border: 2px solid #b8863b;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .8rem;
  font-weight: 900;
  white-space: nowrap;
}

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 20px 30px;
  text-align: center;
  overflow: hidden;
}
.site-title {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  text-shadow:
    0 3px 0 #e8792a,
    0 6px 0 #a0522d,
    0 7px 0 #6b3f16,
    0 12px 22px rgba(61, 38, 14, .45);
  margin-bottom: 14px;
}
.slogan {
  color: #fff;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(69, 105, 138, .65);
  margin-bottom: 34px;
}
.hero-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.group-inline {
  font-family: Consolas, Menlo, monospace;
  background: rgba(61, 38, 14, .28);
  border-radius: 8px;
  padding: 0 8px;
  letter-spacing: 1px;
}

/* 白云 */
.clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute;
  width: 130px;
  height: 34px;
  background: #fff;
  border-radius: 999px;
  opacity: .92;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud::before { width: 52px; height: 52px; top: -26px; left: 22px; }
.cloud::after  { width: 38px; height: 38px; top: -18px; right: 26px; }
.c1 { top: 12%; animation: drift 80s linear infinite; }
.c2 { top: 30%; transform: scale(.7); animation: drift 110s linear infinite; animation-delay: -40s; }
.c3 { top: 6%;  transform: scale(1.15); animation: drift 95s linear infinite; animation-delay: -70s; }
@keyframes drift {
  from { left: -180px; }
  to   { left: 110%; }
}

/* 蘑菇仔（可点击） */
.mushroom-wrap {
  position: relative;
  display: inline-block;
  margin: 6px auto 18px;
  cursor: pointer;
  filter: drop-shadow(0 10px 8px rgba(46, 79, 26, .35));
}
.mushroom-wrap svg { display: block; transition: transform .12s ease; }
.mushroom-wrap:hover svg { transform: translateY(-4px); }
#mushroom.squish { animation: squish .22s ease; }
@keyframes squish {
  0%   { transform: scale(1, 1); }
  40%  { transform: scale(1.12, .84); }
  70%  { transform: scale(.95, 1.06); }
  100% { transform: scale(1, 1); }
}
.hp-bar {
  width: 150px;
  height: 14px;
  margin: 0 auto 8px;
  background: #3a2a18;
  border: 3px solid #5b3a16;
  border-radius: 999px;
  overflow: hidden;
}
.hp-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(#ff8f7d, #e3312c);
  border-radius: 999px;
  transition: width .35s ease;
}
.dmg {
  position: absolute;
  font-weight: 900;
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 2px 2px 0 #d9531e, -1px -1px 0 #d9531e, 0 4px 8px rgba(61,38,14,.5);
  pointer-events: none;
  animation: floatUp .95s ease-out forwards;
  z-index: 5;
  white-space: nowrap;
}
.dmg.crit {
  font-size: 2.2rem;
  color: #ffe14d;
  text-shadow: 2px 2px 0 #b34700, -1px -1px 0 #b34700, 0 4px 8px rgba(61,38,14,.5);
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(6px) scale(.6); }
  15%  { opacity: 1; transform: translateY(-6px) scale(1.15); }
  30%  { transform: translateY(-14px) scale(1); }
  100% { opacity: 0; transform: translateY(-72px) scale(.9); }
}

/* 草地 */
.grass {
  height: 46px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 14px, transparent 14px 30px),
    linear-gradient(#7cc24f, #569a33);
  border-top: 6px solid #4c8a2e;
  border-bottom: 6px solid #3c6d22;
}

/* ---------------- 经典窗口面板 ---------------- */
main { padding-bottom: 10px; }
.ms-window {
  background: #fbf3dd;
  border: 4px solid #7a4a21;
  border-radius: 14px;
  box-shadow:
    0 8px 0 rgba(107, 63, 22, .35),
    inset 0 0 0 3px #ecd9a9;
  overflow: hidden;
}
.ms-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(#8a5a2b, #6b3f16);
  color: #ffe9c4;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 0 #3d240c;
  border-bottom: 3px solid #3d240c;
}
.win-dots::before { content: "● ● ●"; letter-spacing: 4px; font-size: .65rem; opacity: .55; }
.ms-body { padding: 22px; }

/* ---------------- 加群窗口 ---------------- */
.join-section {
  max-width: 620px;
  margin: 30px auto 36px;
  padding: 0 20px;
}
.join-body { text-align: center; position: relative; padding-bottom: 40px; }
.join-desc {
  color: #8a6134;
  line-height: 1.9;
  font-size: .95rem;
  margin-bottom: 18px;
}
.qq-number-card {
  background: #fffbe9;
  border: 3px dashed #c9a86a;
  border-radius: 14px;
  padding: 18px 16px 20px;
  margin-bottom: 18px;
}
.qq-label {
  display: block;
  font-size: .8rem;
  font-weight: 900;
  color: #a9855a;
  letter-spacing: 6px;
  margin-bottom: 6px;
}
.qq-number {
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  font-weight: 900;
  color: #d9531e;
  letter-spacing: 4px;
  text-shadow: 0 2px 0 #f3d9a7;
  margin-bottom: 12px;
  user-select: all;
}
.join-steps {
  list-style: none;
  margin-top: 18px;
  text-align: left;
  display: inline-block;
}
.join-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: #6b4a26;
  font-size: .92rem;
  font-weight: 700;
}
.join-steps li > span {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(#ffb13b, #f0821e);
  border: 2px solid #5b3a16;
  color: #fff;
  font-size: .8rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.snail {
  position: absolute;
  right: 14px;
  bottom: 8px;
  opacity: .9;
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ---------------- 页脚 ---------------- */
.footer {
  background: linear-gradient(#3c6d22, #2c5218);
  border-top: 5px solid #4c8a2e;
  color: #d6ecc2;
  text-align: center;
  padding: 26px 20px 30px;
}
.footer-brand { font-weight: 900; color: #eef7e2; margin-bottom: 8px; }
.footer-note { font-size: .78rem; opacity: .75; line-height: 1.7; max-width: 720px; margin: 0 auto; }
.footer-icp { font-size: .75rem; opacity: .65; margin-top: 8px; }
.footer-icp a { color: inherit; }

/* ---------------- 弹窗 ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 18, 6, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal { width: min(92vw, 430px); animation: popIn .18s ease-out; }
@keyframes popIn {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-close {
  background: #d9531e;
  color: #fff;
  border: 2px solid #3d240c;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 2px 0 #8a3310;
}
.modal-close:active { transform: translateY(2px); box-shadow: none; }
.modal-tip { font-size: .8rem; color: #a9855a; line-height: 1.7; margin-top: 14px; }

/* ---------------- 轻提示 ---------------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: #3a2a18;
  color: #ffe9c4;
  border: 2px solid #8a6134;
  border-radius: 999px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: .92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 200;
  box-shadow: 0 8px 20px rgba(30, 18, 6, .4);
  max-width: 90vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 枫叶飘落 ---------------- */
#leaf-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.leaf {
  position: absolute;
  top: 0;
  will-change: transform;
  animation: leafFall linear forwards;
}
@keyframes leafFall {
  0%   { transform: translate(0, -6vh) rotate(0deg); opacity: 0; }
  6%   { opacity: .9; }
  25%  { transform: translate(var(--sway, 40px), 25vh) rotate(130deg); }
  50%  { transform: translate(calc(var(--sway, 40px) * -1), 52vh) rotate(240deg); }
  75%  { transform: translate(var(--sway, 40px), 78vh) rotate(320deg); }
  100% { transform: translate(0, 106vh) rotate(400deg); opacity: .85; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .join-section { margin-top: 24px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 44px; }
  .site-title { letter-spacing: 2px; }
  .hero-btns .btn { width: 100%; }
  .version-badge { display: none; }
  .snail { display: none; }
}

/* 减少动态效果（无障碍） */
@media (prefers-reduced-motion: reduce) {
  .leaf, .cloud, .snail { display: none; }
  * { animation-duration: .01s !important; transition-duration: .01s !important; }
}
