/* =====================================================================
   Westlife 主题 - About 页面样式（重写版）
   结构顺序严格对齐 template-pages/page-about.php 中的模块：
   1) 基础与通用
   2) 顶部头像环绕区（关于我头像＋在线状态）
   3) 关于我（左）｜此刻关键词（右）
   4) 人格（MBTI）｜座右铭
   5) 统计面板 ｜ 科技
   6) 为什么建站
   7) 技能 ｜ 工具
   8) 十年之约进度
   9) 此刻关键
   10) 游戏
   11) 音乐
   12) 动画/响应式/暗色
   ===================================================================== */


/* =========================
   1) 基础与通用
   ========================= */
.about-main { padding: 24px 0 48px; }

/* 局部容器，不影响全站 */
.about-main .container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* 区块之间间距（各大模块） */
.about-main > section { margin-bottom: 28px; }

/* 卡片基础 */
.about-main .card,
.about-main .about-card.card {
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

/* 卡片头 */
.about-main .about-card .card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.about-main .about-card .card-head h3 { margin: 0; font-size: 16px; color: var(--color-heading); }
.about-main .about-card .card-head i  { color: var(--color-primary); }

/* 通用分栏：支持 1:1 / 2:1 / 3:2 */
.about-main .split { display: grid; gap: 20px; align-items: stretch; }
.about-main .split-1-1 { grid-template-columns: 1fr 1fr; }
.about-main .split-2-1 { grid-template-columns: 2fr 1fr; }
.about-main .split-3-2 { grid-template-columns: 3fr 2fr; }

/* 区块标题行（左标题｜右额外信息） */
.about-main .section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 26px 0 12px;
}
.about-main .section-head h2 {
  font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin: 0;
  color: var(--color-heading);
}

/* 旧浏览器 gap 兜底（不影响现代浏览器） */
.about-main .card,
.about-main .about-card { margin-bottom: 20px; }

/* =========================
   2) 顶部头像环绕区（关于我头像＋在线状态）
   ========================= */
.about-hero-top { margin: 10px 0 8px; }
.about-hero-top .hero-top-inner { display: flex; justify-content: center; }

/* 外圈用于摆放环绕文本，内圈为头像本体 */
.about-hero-top .hero-avatar-wrap {
  position: relative;
  width: 220px; height: 220px;
  margin: 6px auto 18px;
}

/* 头像容器（内圈） */
.about-hero-top .avatar-inner {
  position: absolute; left: 50%; top: 50%;
  width: 160px; height: 160px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.12);
  overflow: hidden;
  z-index: 1;
}
.about-hero-top .hero-avatar {
  width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover;
}

/* 环绕文本（外圈 SVG）——旋转直接作用在 svg，避免与缩放冲突 */
.about-hero-top .avatar-ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  transform-origin: 50% 50%;
  transform-box: view-box;
  will-change: transform;
  transform: rotate(0deg) scale(1);     /* 初始静止 */
}

/* 文本样式 */
.about-hero-top .avatar-ring .ring-text {
  font: 600 12px/1.2 var(--font-primary, system-ui);
  letter-spacing: .16em; text-transform: uppercase;
  fill: var(--color-text-light);
}

/* 悬浮触发：整体慢速旋转 + 轻微放大（在关键帧中保持 1.06 缩放常量） */
.about-hero-top .hero-avatar-wrap:hover .avatar-ring {
  animation: about-ring-spin 18s linear infinite;
}
@keyframes about-ring-spin {
  from { transform: rotate(0deg)   scale(1.06); }
  to   { transform: rotate(360deg) scale(1.06); }
}

/* 动画减少偏好：禁用旋转与放大 */
@media (prefers-reduced-motion: reduce) {
  .about-hero-top .avatar-ring { animation: none !important; transform: none !important; }
}

/* 在线状态点（原样保留） */
.about-hero-top .online-dot {
  position: absolute; right: 6px; bottom: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: onlinePulse 1.8s ease-out infinite;
}
.about-hero-top .online-dot.offline { background: #9aa4b2; box-shadow: none; animation: none; }

/* =========================
   3) 关于我（左）｜此刻关键词（右）
   ========================= */
.about-intro .intro-panel {
  text-align: left;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.about-intro .intro-name   { font-size: 20px; margin: 0 0 6px; color: var(--color-heading); }
.about-intro .intro-slogan { font-size: 14px; color: var(--color-primary); margin: 0 0 6px; }
.about-intro .intro-bio    { font-size: 14px; color: var(--color-text);   margin: 0; }

/* 右：此刻关键词（固定文案 + 动态词） */
.about-intro .rolling-text {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px dashed var(--color-border);
  background: var(--color-surface);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 140px;
}
.about-intro .rolling-fixed p { margin: 0 0 4px; color: var(--color-text-light); font-size: 14px; }

.about-intro .rolling-dyn {
  margin-top: 6px;
  font: 700 22px/1.2 var(--font-primary, system-ui);
  color: var(--color-heading);
  min-height: 28px;
}
.about-intro .rolling-dyn .rolling-dynamic {
  display: inline-block; animation: rollingJump 1.1s ease-in-out infinite;
}


/* =========================
   4) 人格（MBTI）｜座右铭
   ========================= */
.mbti-card {
  position: relative; display: flex; gap: 18px; align-items: center; overflow: hidden;
  border: 1px solid var(--color-border); border-radius: 14px; padding: 18px 20px;
  background: linear-gradient(180deg, var(--color-card-background), var(--color-background-light));
}
.mbti-left { flex: 1 1 50%; min-width: 0; }
.mbti-right{ flex: 1 1 50%; display: flex; align-items: center; justify-content: center; min-height: 260px; }

.mbti-chip {
  display: inline-block; padding: 3px 8px; font-size: 12px; border-radius: 999px;
  background: rgba(0,0,0,.04); color: var(--color-text-light); margin-bottom: 8px;
}
.mbti-title { margin: 0 0 6px; font-size: 22px; color: var(--color-heading); }
.mbti-code  {
  font: 800 28px/1.1 var(--font-primary);
  letter-spacing: .06em; color: var(--mbti-accent);
  text-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.mbti-tip { margin-top: 10px; color: var(--color-text-light); font-size: 13px; }
.mbti-tip a { color: var(--color-primary); }

/* 右侧插画（上半身视窗） */
.mbti-illu {
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 5 / 3; overflow: hidden;
}
.mbti-figure { position: absolute; inset: 0; transform-origin: 50% 80%; animation: mbtiSwing 6s ease-in-out infinite; will-change: transform; }
.mbti-figure img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  transform: rotateY(180deg);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.12));
}

/* 座右铭（blockquote） */
.motto {
  margin: 0; text-align: center; padding: 18px;
  font: italic 600 20px/1.6 var(--font-content);
  color: var(--color-heading);
  background: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}


/* =========================
   5) 统计面板 ｜ 科技
   ========================= */
.about-analytics .analytics-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.about-analytics .tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; border: 1px dashed var(--color-border); border-radius: 12px; background: var(--color-surface);
  min-height: 88px; position: relative; overflow: hidden;
}
.about-analytics .tile .val   { font: 800 24px/1 var(--font-primary); color: var(--color-primary); margin-bottom: 6px; }
.about-analytics .tile .label { font-size: 12px; color: var(--color-text-light); }
.about-analytics .source      { display: block; margin-top: 10px; color: var(--color-text-light); font-size: 12px; }

/* 科技卡片正文细节 */
.about-main .about-card .card-body p { margin: 6px 0; font-size: 14px; color: var(--color-text); }


/* =========================
   6) 为什么建站
   ========================= */
.about-main .about-card .card-body p { margin: 6px 0; font-size: 14px; color: var(--color-text); }


/* =========================
   7) 技能 ｜ 工具
   ========================= */
/* 技能网格（倾斜拼贴 + 悬浮铺平） */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; perspective: 800px; }
.skill {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 10px;
  padding: 12px;
  transform: rotateZ(var(--tilt, 0deg)) translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease;
}
.skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.skill .bar { height: 8px; background: var(--color-background-light); border-radius: 999px; overflow: hidden; }
.skill .bar i { display: block; height: 100%; background: rgba(var(--color-primary-rgb), .25); }

.skills-grid .skill:nth-child(odd)  { --tilt: -1.5deg; }
.skills-grid .skill:nth-child(even) { --tilt:  1.5deg; }

@media (hover:hover){
  .skills-grid:hover .skill { --tilt: 0deg; }
  .skill:hover {
    transform: rotateZ(0.8deg) translateY(-2px) scale(1.02);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
  }
}

/* 工具清单网格 */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; margin: 0; list-style: none; }
.tool-grid li {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px dashed var(--color-border); border-radius: 10px; background: var(--color-surface);
}
.tool-grid li i { color: var(--color-primary); }


/* =========================
   8) 十年之约进度
   ========================= */
.about-decade .decade-meta { color: var(--color-text-light); }
.about-decade .decade-percent { font-weight: 700; color: var(--color-primary); }

/* 进度条（匹配 page-about.php 的 .decade-fill/.cap/.shine 标记） */
.decade-progress {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: var(--color-background-light);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.decade-progress .decade-fill {
  position: absolute; inset: 0 auto 0 0;
  height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(var(--color-primary-rgb), .85) 0%, rgba(var(--color-primary-rgb), 1) 100%);
  transition: width 1200ms cubic-bezier(.2,.9,.2,1);
}
.decade-progress .decade-fill .cap {
  position: absolute; right: -8px; top: 50%;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-primary);
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), .35), 0 0 12px rgba(var(--color-primary-rgb), .5);
  animation: capPulse 1.6s ease-in-out infinite;
}
.decade-progress .decade-fill .shine {
  position: absolute; right: -80px; top: 0; bottom: 0; width: 140px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  filter: blur(2px);
  animation: shineMove 1.2s linear infinite;
  pointer-events: none;
}
/* 完成态（>99.9% 可在页面上追加 .complete） */
.decade-progress.complete .decade-fill .cap   { animation: none; box-shadow: 0 0 0 0 rgba(0,0,0,0), 0 0 10px rgba(var(--color-primary-rgb), .6); }
.decade-progress.complete .decade-fill .shine { display: none; }

/* 进度说明（起止时间/剩余天数） */
.decade-legend {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 12px; color: var(--color-text-light);
}
.decade-legend .remain     { color: var(--color-text); }
.decade-legend .days-left  { color: var(--color-primary); }


/* =========================
   9) 此刻关键
   ========================= */
.about-highlights .highlight-card .h-title { margin: 0 0 8px; font-size: 16px; color: var(--color-heading); }
.about-highlights .highlight-card .h-list { margin: 0; padding-left: 18px; color: var(--color-text); }
.about-highlights .highlight-card .h-desc { margin: 0; color: var(--color-text-light); }


/* =========================
   10) 游戏
   ========================= */
.about-games .game-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.game-card {
  position: relative; border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden;
  min-height: 240px; background: #000;
  background-image: var(--bg); background-size: cover; background-position: center;
  display: flex; flex-direction: column; isolation: isolate;
  transition: transform .2s ease;
}
.game-card .game-mask {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55));
}
.game-card .game-head {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 14px; color: #fff;
}
.game-card .game-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.game-card .game-meta { display: flex; gap: 10px; font-size: 13px; opacity: .95; }
.game-card .game-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }

.game-card .game-body {
  position: relative; z-index: 1;
  margin-top: auto; padding: 12px 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 30%, rgba(0,0,0,.75) 100%);
  color: #eaeef5;
}
.game-card .game-row  { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-card .label     { color: #c9d3e6; font-size: 12px; }
.game-card .value     { color: #fff; font-weight: 600; }

@media (hover:hover){
  .game-card:hover { transform: translateY(-2px); }
}

/* LOL 英雄列表 */
.champions { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.champions li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.champions img {
  width: 38px; height: 38px; border-radius: 8px; object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.champions em { font-style: normal; font-size: 12px; color: #dfe7ff; white-space: nowrap; }


/* =========================
   11) 音乐
   ========================= */
.about-music .music-card {
  position: relative; border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden;
  min-height: 220px;
  background: #000; background-image: var(--bg); background-size: cover; background-position: center;
}
.about-music .music-mask {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.65), rgba(0,0,0,.2) 50%, rgba(0,0,0,.65));
}
.about-music .music-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 16px;
  color: #fff; align-items: center;
}
.about-music .music-avatar {
  width: 160px; height: 160px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.about-music .music-title { margin: 0 0 8px; font-size: 18px; }
.about-music .music-row   { margin: 6px 0 0; display: flex; gap: 10px; align-items: center; }
.about-music .music-row .label { font-size: 12px; color: #d6def2; min-width: 40px; }
.about-music .music-row .value { font-weight: 700; }


/* =========================
   12) 动画 / 悬浮 / 响应式 / 暗色
   ========================= */

/* 动画关键帧 */
@keyframes rollingJump { 0%,100%{ transform: translateY(0); } 30%{ transform: translateY(-3px); } }
@keyframes onlinePulse {
  0%{ box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70%{ box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@keyframes mbtiSwing {
  0%, 50%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-6px) rotate(-2deg); }
  75% { transform: translateX( 6px) rotate( 2deg); }
}
@keyframes capPulse {
  0%, 100% { transform: translateY(-50%) scale(1);   box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), .35), 0 0 12px rgba(var(--color-primary-rgb), .5); }
  50%      { transform: translateY(-50%) scale(1.08); box-shadow: 0 0 0 8px rgba(var(--color-primary-rgb), .08), 0 0 16px rgba(var(--color-primary-rgb), .65); }
}
@keyframes shineMove { from { transform: translateX(0); } to { transform: translateX(80px); } }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce){
  .skill, .skill:hover { transition: none; transform: none; }
  .mbti-figure { animation: none !important; }
  .about-intro .rolling-dyn .rolling-dynamic { animation: none !important; }
  .about-hero-top .online-dot { animation: none !important; }
  .decade-progress .decade-fill .cap { animation: none !important; }
  .decade-progress .decade-fill { transition: none !important; }
}

/* 响应式 */
@media (max-width: 900px){
  .about-main .split { grid-template-columns: 1fr; }
  .about-games .game-grid { grid-template-columns: 1fr; }
  .mbti-card { flex-direction: column; }
  .mbti-right { min-height: 200px; }
  .mbti-illu { max-width: 420px; aspect-ratio: 4 / 3; }
}
@media (max-width: 768px){
  .about-analytics .analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .about-music .music-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px){
  .skills-grid { grid-template-columns: 1fr; }
  .tool-grid   { grid-template-columns: 1fr 1fr; }
}

/* 暗色模式微调（仅限 About 页作用域） */
[data-theme="dark"] .about-main .about-card.card { background: var(--color-surface); border-color: #333; }
[data-theme="dark"] .about-main .about-card .card-body blockquote { background: #202020; }
[data-theme="dark"] .about-hero-top .avatar-ring .ring-text { fill: #9aa4b2; }
[data-theme="dark"] .mbti-card { background: var(--color-background); }
[data-theme="dark"] .about-analytics .tile { background: var(--color-background); border-color: #333; }
[data-theme="dark"] .decade-progress { background: #202020; border-color: #333; }
[data-theme="dark"] .decade-legend  { color: #9aa4b2; }
[data-theme="dark"] .game-card,
[data-theme="dark"] .music-card { border-color: #333; }

/* About 页面卡片：取消整体悬浮上浮动效（不影响 .skill 与 .game-card 的局部动效） */
.about-main .card,
.about-main .about-card {
  transition: none !important;
  transform: none !important;
  animation: none !important;
}
.about-main .card:hover,
.about-main .card:focus-within,
.about-main .about-card:hover,
.about-main .about-card:focus-within {
  transform: none !important;
  box-shadow: var(--shadow-md);
}

/* 局部网格的统一间距 */
.about-main .analytics-grid,
.about-main .skills-grid,
.about-main .tool-grid,
.about-main .game-grid { gap: 14px; }

/* 十年之约卡片内元素间距微调 */
.about-main .about-decade .decade-legend > * + * { margin-left: 10px; }

/* 滚动文字区域内的段落间距 */
.about-main .rolling-text .rolling-fixed p + p { margin-top: 6px; }