/* assets/base.css —— 前台结构性基础样式（主题在此之上重塑外观） */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fff;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* 页面容器 */
.tc-page { min-height: 100vh; display: flex; flex-direction: column; }
.tc-container { width: 100%; max-width: 900px; margin: 0 auto; padding: 24px 16px; }

/* 站点头部 */
.tc-site-head { text-align: center; padding: 32px 16px; }
.tc-site-title { font-size: 34px; margin: 0 0 8px; }
.tc-site-intro { font-size: 16px; margin: 0; opacity: .85; }

/* 模块通用外壳 */
.tc-module { margin: 0 0 26px; padding: 20px; border-radius: 14px; background: #f6f6f6; }
.tc-module-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tc-module-head h2 { margin: 0; font-size: 22px; }
.tc-module-icon { font-size: 24px; }
.tc-module-body { }
.tc-empty { color: #888; font-style: italic; }

/* 个人介绍 */
.tc-profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.tc-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #ddd; }
.tc-avatar-empty { display: flex; align-items: center; justify-content: center; font-size: 44px; }
.tc-profile-name { margin: 0 0 6px; font-size: 20px; }
.tc-profile-intro { margin: 0; }

/* 相册 */
.tc-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tc-photo { margin: 0; }
.tc-photo img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; }
.tc-photo figcaption { font-size: 13px; text-align: center; margin-top: 4px; }

/* 留言板 */
.tc-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tc-form input, .tc-form textarea { padding: 10px; border: 2px solid #ccc; border-radius: 8px; font: inherit; }
.tc-form button { align-self: flex-start; padding: 8px 20px; border: none; border-radius: 8px; background: #e8482b; color: #fff; font-weight: 700; cursor: pointer; }
.tc-msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tc-msg { background: #fff; border-radius: 10px; padding: 12px; }
.tc-msg-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.tc-msg-name { font-weight: 700; }
.tc-msg-time { color: #999; }

/* 心愿单 */
.tc-wish-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tc-wish { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 14px; border-radius: 10px; }
.tc-wish.is-done .tc-wish-title { text-decoration: line-through; color: #999; }

/* 友链 */
.tc-link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tc-link { display: inline-block; padding: 8px 16px; background: #fff; border-radius: 20px; text-decoration: none; }

/* 日记 */
.tc-diary { background: #fff; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.tc-diary-title { margin: 0 0 4px; }
.tc-diary-time { font-size: 13px; color: #999; margin-bottom: 8px; }

/* 联系方式 */
.tc-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tc-contact { display: flex; align-items: center; gap: 8px; }

/* 计数器 */
.tc-counter { display: flex; align-items: baseline; gap: 8px; justify-content: center; font-size: 18px; }
.tc-counter-num { font-size: 32px; font-weight: 800; color: #e8482b; }

/* 页脚 */
.tc-site-foot { margin-top: auto; text-align: center; padding: 20px; font-size: 13px; opacity: .7; }
.tc-cms-link { position: fixed; right: 12px; bottom: 12px; background: rgba(0,0,0,.5); color: #fff; padding: 6px 12px; border-radius: 20px; text-decoration: none; font-size: 13px; z-index: 50; }

/* 开源小游戏 iframe 嵌入 */
/* 小游戏：手风琴卡片（多款时同时只运行一个） */
.tc-games { display: flex; flex-direction: column; gap: 12px; }
.tc-game-card { border-radius: 12px; overflow: hidden; }
.tc-game-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
  background: #f0ede6; color: inherit; border: 2px solid rgba(0,0,0,.12); border-radius: 12px;
}
.tc-game-card.is-open .tc-game-toggle { border-radius: 12px 12px 0 0; }
.tc-game-toggle:hover { filter: brightness(0.97); }
.tc-game-caret { font-size: 13px; opacity: .7; }
.tc-game-name { display: flex; align-items: center; gap: 8px; }
.tc-game-embed { width: 100%; }
/* 多游戏(手风琴)时，折叠则隐藏内容区 */
.tc-game-card .tc-game-toggle + .tc-game-embed { display: none; }
.tc-game-card.is-open .tc-game-toggle + .tc-game-embed { display: block; }
.tc-game-frame {
  display: block; width: 100%; height: 480px; border: 0; background: #fff;
}
.tc-game-card.is-open .tc-game-frame { border-radius: 0 0 12px 12px; border: 2px solid rgba(0,0,0,.12); border-top: 0; }

/* 开源致谢 / 许可（仅展示当前启用的游戏） */
.tc-credits {
  max-width: 900px; margin: 0 auto; padding: 10px 16px 24px;
  font-size: 12px; line-height: 1.7; opacity: .75; text-align: center;
}
.tc-credits-title { font-weight: 700; opacity: .9; }
.tc-credits-link { text-decoration: underline; }
