/* =========================================================
   鸢克斯 yoocoos 主页 · 清新可爱风 (零依赖, 响应式)
   与 game.yoocoos.com 同款排版模式:
   窄屏单列卡片 / 宽屏 auto-fill 网格, 板块始终纵向堆叠
   ========================================================= */
:root {
  color-scheme: light;         /* 页面自管配色, 禁止浏览器自动深色改色 */
  --ink: #5b4a3a;
  --ink-soft: #9a8a74;
  --card: #ffffff;
  --gold: #ff9f1c;
  --pink: #ff7aa8;
  --mint: #7ed6c0;
  --grad: linear-gradient(160deg, #e9f7f6 0%, #f6f2e4 50%, #fceef4 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--grad);
  color: var(--ink);
  overflow-x: hidden;
}
body::before { /* 顶部柔光 */
  content: "";
  position: fixed;
  top: -120px; left: 50%;
  width: 560px; height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.85), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 漂浮小可爱 ---------- */
.floaties { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.fl {
  position: absolute;
  font-size: 30px;
  opacity: 0.35;
  animation: floaty 7s ease-in-out infinite;
}
.f1 { left: 8%;  top: 12%; animation-delay: 0s; }
.f2 { right: 10%; top: 8%;  animation-delay: 1.2s; font-size: 24px; }
.f3 { left: 12%; bottom: 18%; animation-delay: 2.4s; font-size: 26px; }
.f4 { right: 8%; bottom: 24%; animation-delay: 0.6s; }
.f5 { left: 22%; top: 42%; animation-delay: 1.8s; font-size: 22px; }
.f6 { right: 20%; top: 40%; animation-delay: 3s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-18px) rotate(5deg); }
}

/* ---------- 布局 ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 460px;          /* 手机: 单列窄版 */
  margin: 0 auto;
  padding: 34px 20px 30px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 板块(始终纵向堆叠) ---------- */
.section { margin-top: 30px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-left: 2px;
}
.section-emoji { font-size: 20px; }
.section-title { font-size: 18px; font-weight: 800; }

/* ---------- 卡片网格(与 game 子域名同款) ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;   /* 窄屏: 一行一个 */
  gap: 14px;
}
.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(120, 90, 50, 0.10);
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(255, 159, 28, 0.22);
  border-color: var(--gold);
}
.card-icon {
  font-size: 36px;
  flex: 0 0 auto;
  animation: wiggle 2.6s ease-in-out infinite;
}
a.card:hover .card-icon { animation-play-state: paused; transform: scale(1.15); }
@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(7deg); }
}
.card-body { flex: 1; min-width: 0; }
.card-name { font-size: 16px; font-weight: 800; }
.card-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.card-tags { margin-top: 7px; display: flex; gap: 6px; }
.tag {
  font-size: 10.5px;
  padding: 2px 9px;
  border-radius: 10px;
  background: #fff3e0;
  color: var(--gold);
  font-weight: 700;
}
.card-go {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: auto;
  padding-top: 34px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

/* =========================================================
   响应式: 宽屏(桌面) → 容器加宽 + 卡片自动多列网格
   (与 game.yoocoos.com 完全相同的模式)
   ========================================================= */
@media (min-width: 640px) {
  .wrap { max-width: 860px; padding: 56px 32px 36px; }
  .cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
  }
}

/* ---------- 深色模式切换按钮 ---------- */
.theme-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(120, 90, 50, 0.15);
  transition: transform .2s, background .3s;
}
.theme-btn:hover { transform: scale(1.12) rotate(15deg); }

/* =========================================================
   清新的深色模式 (不太深, 薄荷深青调)
   ========================================================= */
html.dark {
  color-scheme: dark;          /* 我们的深色模式生效时, 告诉浏览器我们自管 */
  --ink: #e8f4f0;
  --ink-soft: #9db8b0;
  --card: #22343a;
  --gold: #ffb84d;
  --pink: #ff8ab8;
  --mint: #7ed6c0;
  --grad: linear-gradient(160deg, #16262a 0%, #1c2f34 50%, #232830 100%);
}
html.dark body::before { opacity: 0.22; }
html.dark .fl { opacity: 0.16; }
html.dark .card {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.07);
}
html.dark a.card:hover { box-shadow: 0 12px 28px rgba(255, 184, 77, 0.16); }
html.dark .back,
html.dark .theme-btn {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
html.dark .back:hover { background: rgba(255, 255, 255, 0.16); color: var(--ink); }
html.dark .tag { background: rgba(255, 159, 28, 0.16); color: var(--gold); }
