/* ==========================================================================
   components.css — 展开面板内部的内容模块
   笔记 / 相簿 / 收藏 / 游戏 / 爱好 / 关于
   ========================================================================== */

/* ---------- 通用小节 ---------- */

.section + .section {
  margin-top: 44px;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.section__title {
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--ink);
}

.section__sub {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.section__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}

/* ---------- 关于：自我介绍 ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.about__hello {
  font-family: var(--font-hand);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.4;
  color: var(--ink);
}

.about__hello em {
  font-style: normal;
  color: var(--green-deep);
  position: relative;
}

/* 手写下划线 */
.about__hello em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 7px;
  border-radius: 4px;
  background: var(--mint);
  opacity: 0.65;
  z-index: -1;
}

.about__text {
  margin-top: 18px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-2);
}

.about__text p + p {
  margin-top: 14px;
}

.about__meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 12.5px;
  color: var(--muted);
}

.about__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 头像 / 立牌 */
.about__side {
  position: relative;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.9), rgba(253, 247, 236, 0.7));
  box-shadow: var(--shadow-sm);
}

.about__avatar {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 44px;
  background: linear-gradient(150deg, #eaf4ec, #fdf3e2);
  border: 1px solid #fff;
  box-shadow: var(--shadow-sm);
}

.about__name {
  margin-top: 14px;
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink);
}

.about__tagline {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.about__accounts {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-2);
}

.about__accounts-label {
  font-family: var(--font-en);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}

/* ---------- 笔记 ---------- */

.notes {
  display: flex;
  flex-direction: column;
}

.note {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px dashed var(--line-2);
}

.note:first-child {
  border-top: 0;
}

.note__date {
  font-family: var(--font-en);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  padding-top: 3px;
}

.note__body a {
  display: block;
}

.note__title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}

.note:hover .note__title {
  color: var(--green-deep);
}

.note__excerpt {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.note__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--green-deep);
  background: rgba(207, 230, 216, 0.55);
}

.tag--warm {
  color: #8a6a2f;
  background: rgba(247, 221, 155, 0.5);
}

.tag--cool {
  color: #4d6f88;
  background: rgba(188, 220, 238, 0.5);
}

/* ---------- 相簿 ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

/* 没有图片时的渐变占位 */
.shot__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: var(--ph-bg, linear-gradient(140deg, #f2ece2, #e6efe8));
  filter: saturate(0.9);
}

.shot__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 11px 9px;
  font-size: 11.5px;
  color: #fff;
  background: linear-gradient(to top, rgba(40, 32, 26, 0.62), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.shot:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.shot:hover img {
  transform: scale(1.05);
}

.shot:hover .shot__cap {
  opacity: 1;
  transform: none;
}

/* 图片灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  background: rgba(45, 38, 32, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s var(--ease), visibility 0s;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.lightbox__cap {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

/* ---------- 收藏 ---------- */

.collect {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.item:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: #fff;
}

.item__mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--mark-bg, #f3ece1);
}

.item__main {
  min-width: 0;
}

.item__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}

.item__note {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.item__star {
  font-size: 11px;
  color: #d5a63c;
  letter-spacing: 0.06em;
}

/* ---------- 爱好 ---------- */

.hobbies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.hobby {
  position: relative;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.hobby::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--hobby-glow, rgba(207, 230, 216, 0.5));
  filter: blur(6px);
}

.hobby__icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(120, 95, 70, 0.18));
}

.hobby__name {
  margin-top: 10px;
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink);
}

.hobby__desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.hobby__bar {
  margin-top: 14px;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.hobby__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), #a8cdb8);
  width: var(--lv, 60%);
}

/* ---------- 游戏 ---------- */

.arcade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.gamecard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px;
  min-height: 168px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #fffdf8, var(--game-tint, #f6f1e7));
  text-align: left;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.gamecard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gamecard__icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 5px 7px rgba(120, 95, 70, 0.2));
}

.gamecard__name {
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--ink);
}

.gamecard__desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.gamecard__best {
  margin-top: auto;
  font-family: var(--font-en);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

/* 游戏运行容器 */
.arena {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.arena__hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.arena__hud b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.arena__stage {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbf7ef, #eef2ea);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.arena__tips {
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--green-deep);
  box-shadow: 0 8px 18px -8px rgba(78, 125, 103, 0.8);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -8px rgba(78, 125, 103, 0.85);
}

.btn--ghost {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn--ghost:hover {
  background: #fff;
}

.btn--sm {
  padding: 7px 15px;
  font-size: 12px;
}

/* 结果浮层 */
.result {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.result.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease), visibility 0s;
}

.result__title {
  font-family: var(--font-hand);
  font-size: 24px;
  color: var(--ink);
}

.result__score {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--muted);
}

.result__actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ---------- 关于页里的账号墙 ---------- */

.accounts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  transition: transform 0.28s var(--ease), background 0.28s var(--ease);
}

.account:hover {
  transform: translateY(-2px);
  background: #fff;
}

.account__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--green));
  flex: 0 0 auto;
}

.account__name {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 打地鼠 ---------- */

.whack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(6px, 1.4vw, 12px);
  width: 100%;
  height: 100%;
  padding: clamp(8px, 2vw, 18px);
}

.hole {
  position: relative;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 34%, #e8ddcc 0%, #d8c9b4 58%, #c5b39b 100%);
  box-shadow:
    inset 0 7px 13px rgba(120, 95, 70, 0.26),
    inset 0 -2px 4px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  overflow: hidden;
}

.hole::after {
  content: "";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(24px, 5.5vw, 40px);
  line-height: 1;
  opacity: 0;
  transform: translateY(46%) scale(0.5);
  transition: transform 0.13s ease-out, opacity 0.1s linear;
  filter: drop-shadow(0 4px 5px rgba(110, 85, 60, 0.25));
}

.hole.has-mole::after {
  content: "🐹";
  opacity: 1;
  transform: none;
}

.hole.just-hit::after {
  content: "💫";
  opacity: 1;
  transform: none;
}

/* ---------- 记忆翻牌 ---------- */

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(6px, 1.4vw, 11px);
  width: 100%;
  height: 100%;
  padding: clamp(8px, 2vw, 16px);
}

.tile {
  perspective: 700px;
  border-radius: 14px;
  padding: 0;
  background: none;
}

.tile__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.44s var(--ease-out);
}

.tile.is-open .tile__inner,
.tile.is-matched .tile__inner {
  transform: rotateY(180deg);
}

.tile__back,
.tile__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tile__back {
  background: linear-gradient(155deg, #ecf4ed, #d8e7db);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  font-size: clamp(14px, 2.4vw, 19px);
  opacity: 0.9;
}

.tile__face {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: clamp(20px, 4vw, 30px);
  transform: rotateY(180deg);
}

.tile.is-matched .tile__face {
  background: #eff7f1;
  border-color: #cfe6d8;
}

/* ---------- 投篮 ---------- */

.hoops-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

/* 灯箱里的占位大图 */
.lightbox__ph {
  width: min(560px, 82vw);
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: clamp(56px, 9vw, 96px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

@media (max-width: 760px) {
  .about {
    grid-template-columns: 1fr;
  }

  .note {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .note__date {
    padding-top: 0;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
