/* ========================================
   孤城旧梦 - 个人展示网站样式表
   现代化玻璃质感UI设计
   ======================================== */

/* CSS变量定义 */
:root {
  --primary-color: #0ea5e9;
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --accent-color: #06b6d4;
  --accent-warm: #f59e0b;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.15);
  --glass-bg-weak: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-strong: rgba(255, 255, 255, 0.35);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-glow: rgba(14, 165, 233, 0.3);
  --shadow-glow-strong: rgba(14, 165, 233, 0.6);
  --gradient-main: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #0891b2 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --blur-amount: 20px;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 暗色主题 */
[data-theme="dark"] {
  --primary-color: #0ea5e9;
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-bg-strong: rgba(30, 41, 59, 0.7);
  --glass-bg-weak: rgba(15, 23, 42, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
}

/* 亮色主题 */
[data-theme="light"] {
  --primary-color: #0369a1;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --glass-bg-weak: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-border-strong: rgba(0, 0, 0, 0.18);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-glow: rgba(14, 165, 233, 0.2);
  --shadow-glow-strong: rgba(14, 165, 233, 0.4);
}

/* 全局重置 */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #0c1929 0%, #1a365d 30%, #0f172a 60%, #164e63 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: var(--transition-smooth);
}

/* ========== 粒子背景 ========== */
.particles-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.6) 0%, transparent 70%);
  animation: float-particle linear infinite; pointer-events: none;
}
@keyframes float-particle {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ========== 鼠标跟随光效 ========== */
.mouse-glow {
  position: fixed; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease; mix-blend-mode: screen;
}

/* ========== 滚动模糊遮罩 ========== */
.scroll-blur-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
  pointer-events: none; z-index: 1; transition: backdrop-filter 0.1s ease-out;
}

/* ========== 主容器 ========== */
.main-wrapper { position: relative; z-index: 2; max-width: 960px; margin: 0 auto; padding: 16px; }

/* ========== 玻璃基础类 ========== */
.glass-panel {
  background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border); border-radius: 12px; transition: var(--transition-smooth);
}
.glass-panel:hover {
  background: var(--glass-bg-strong); border-color: var(--glass-border-strong);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
.glass-panel-strong {
  background: var(--glass-bg-strong); backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-strong); border-radius: 12px;
}

/* ========== 头部 ========== */
.header-section {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; margin-bottom: 16px;
}

.id-title-panel {
  flex: 1; max-width: 380px; padding: 14px 20px; position: relative; overflow: hidden;
}
.id-title-panel::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(14, 165, 233, 0.1), transparent, rgba(6, 182, 212, 0.1), transparent);
  animation: rotate-glow 8s linear infinite;
}
@keyframes rotate-glow { to { transform: rotate(360deg); } }
.id-title-content { position: relative; z-index: 1; }
.id-title-content h1 {
  font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(135deg, #38bdf8, #06b6d4, #22d3ee);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 4px;
}
.id-subtitle { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; letter-spacing: 2px; }

.time-display { text-align: right; padding: 10px 16px; min-width: 180px; }
.date-text { font-size: 0.8rem; color: var(--text-secondary); letter-spacing: 1px; }
.time-text {
  font-size: 1.6rem; font-weight: 300; font-family: 'Courier New', monospace;
  color: var(--primary-light); text-shadow: 0 0 20px var(--shadow-glow); letter-spacing: 3px;
}

.theme-toggle-btn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(20px);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition-smooth); margin-left: 12px; position: relative; overflow: hidden;
}
.theme-toggle-btn:hover { transform: scale(1.08) rotate(15deg); box-shadow: 0 0 24px var(--shadow-glow); border-color: var(--primary-color); }
.theme-toggle-btn svg { width: 18px; height: 18px; fill: var(--primary-light); }

/* ========== 主布局 ========== */
.content-grid {
  display: grid; grid-template-columns: 180px 1fr 220px; gap: 12px; margin-bottom: 16px;
}
.left-sidebar { display: flex; flex-direction: column; gap: 10px; }
.center-main { display: flex; flex-direction: column; gap: 10px; }
.right-sidebar { display: flex; flex-direction: column; gap: 10px; }

/* ========== 头像区域 ========== */
.avatar-section { padding: 14px; text-align: center; }
.avatar-carousel {
  position: relative; width: 100%; height: 80px; border-radius: 10px;
  overflow: hidden; margin-bottom: 10px;
}
.carousel-track { display: flex; transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); height: 100%; }
.carousel-slide { min-width: 100%; height: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-dots { position: absolute; bottom: 6px; right: 10px; display: flex; gap: 5px; z-index: 2; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.3s; }
.carousel-dot.active { background: var(--primary-color); box-shadow: 0 0 8px var(--shadow-glow); }

.avatar-frame {
  width: 68px; height: 68px; margin: 0 auto 8px; position: relative;
  border-radius: 14px; padding: 2.5px;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4, #22d3ee, #0ea5e9);
  background-size: 300% 300%; animation: avatar-frame-glow 4s ease infinite;
}
@keyframes avatar-frame-glow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.avatar-frame-inner { width: 100%; height: 100%; border-radius: 11px; overflow: hidden; background: var(--glass-bg); }
.avatar-frame-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-name { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.avatar-tag { font-size: 0.66rem; color: var(--primary-light); letter-spacing: 2px; }

/* ========== 基础信息栏 ========== */
.info-sidebar-card { padding: 14px; }
.info-sidebar-card h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--glass-border); letter-spacing: 2px; }
.info-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.8rem; }
.info-item:last-child { border-bottom: none; }
.info-label { color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.icon-box { width: 22px; height: 22px; border-radius: 6px; background: var(--glass-bg-weak); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }
.info-value { color: var(--text-primary); font-weight: 500; }

/* ========== 立绘展示面板（左右横排） ========== */
.character-showcase {
  padding: 12px; overflow: hidden; display: flex; gap: 12px; align-items: stretch;
}
.showcase-image-container {
  width: 130px; min-width: 130px; border-radius: 8px; overflow: hidden; position: relative; flex-shrink: 0;
}
.showcase-image-container img { width: 100%; height: 170px; object-fit: cover; object-position: top center; filter: brightness(0.95) contrast(1.05); display: block; }
.showcase-overlay {
  flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0;
  background: var(--glass-bg-weak); border-radius: 8px; padding: 10px 14px; border: 1px solid var(--glass-border);
}
.showcase-quote { font-size: 0.74rem; color: var(--text-primary); line-height: 1.5; font-style: italic; margin-bottom: 4px; padding-left: 8px; border-left: 2px solid var(--primary-color); }
.showcase-author { font-size: 0.66rem; color: var(--primary-light); text-align: right; letter-spacing: 1px; }

/* ========== 状态栏 ========== */
.status-bar { padding: 8px 16px; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; }
.status-bar::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: status-shine 3s ease-in-out infinite;
}
@keyframes status-shine { 0% { left: -100%; } 50%, 100% { left: 150%; } }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.6); animation: pulse-status 2s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse-status { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.15); } }
.status-text { font-size: 0.82rem; color: var(--text-primary); flex: 1; }
.status-mood { font-size: 0.76rem; color: var(--primary-light); padding: 3px 10px; border-radius: 16px; background: var(--glass-bg-weak); border: 1px solid var(--glass-border); white-space: nowrap; }

/* ========== 人设卡片 ========== */
.profile-card { padding: 12px 14px; position: relative; overflow: hidden; }
.profile-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-main); }
.profile-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.profile-avatar-small { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; border: 2px solid var(--glass-border-strong); flex-shrink: 0; }
.profile-avatar-small img { width: 100%; height: 100%; object-fit: cover; }
.profile-basic h3 { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 1px; }
.profile-basic p { font-size: 0.72rem; color: var(--text-secondary); }
.profile-desc { font-size: 0.74rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tag { padding: 4px 10px; border-radius: 14px; font-size: 0.72rem; background: var(--glass-bg-weak); border: 1px solid var(--glass-border); color: var(--text-secondary); transition: var(--transition-smooth); }
.profile-tag:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 0 12px var(--shadow-glow); }

/* ========== 签名 ========== */
.signature-panel { padding: 12px; text-align: center; position: relative; overflow: hidden; }
.signature-text {
  font-family: 'STKaiti', 'KaiTi', serif; font-size: 1.5rem; color: transparent;
  background: linear-gradient(135deg, #38bdf8, #22d3ee, #67e8f9, #06b6d4);
  background-size: 200% 200%; -webkit-background-clip: text; background-clip: text;
  animation: signature-shimmer 3s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.4)); letter-spacing: 4px;
}
@keyframes signature-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.signature-line { width: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--primary-color), transparent); margin: 12px auto 0; }

/* ========== 雷达图 ========== */
.radar-chart-panel { padding: 14px; text-align: center; }
.radar-chart-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 12px; letter-spacing: 2px; }
.radar-container { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.radar-canvas { width: 100%; height: 100%; }
.radar-labels { position: absolute; inset: 0; pointer-events: none; }
.radar-label { position: absolute; font-size: 0.68rem; color: var(--text-secondary); white-space: nowrap; transform: translate(-50%, -50%); }

/* ========== 好感度进度条 ========== */
.affection-panel { padding: 14px; }
.affection-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 12px; letter-spacing: 2px; }
.affection-item { margin-bottom: 12px; }
.affection-item:last-child { margin-bottom: 0; }
.affection-header { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.78rem; }
.affection-name { color: var(--text-secondary); }
.affection-value { color: var(--primary-light); font-weight: 600; }
.affection-bar { height: 6px; border-radius: 3px; background: var(--glass-bg-weak); overflow: hidden; position: relative; }
.affection-fill { height: 100%; border-radius: 3px; background: var(--gradient-main); position: relative; transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); box-shadow: 0 0 8px var(--shadow-glow); }
.affection-fill::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: bar-shine 2s ease-in-out infinite; }
@keyframes bar-shine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ========== 喜好/雷点分栏 ========== */
.preference-panel { padding: 14px; }
.preference-tabs { display: flex; gap: 3px; margin-bottom: 12px; background: var(--glass-bg-weak); border-radius: 8px; padding: 3px; }
.preference-tab { flex: 1; padding: 7px; text-align: center; font-size: 0.78rem; border-radius: 6px; cursor: pointer; transition: var(--transition-smooth); color: var(--text-secondary); border: none; background: transparent; }
.preference-tab.active { background: var(--gradient-main); color: #fff; box-shadow: 0 3px 10px var(--shadow-glow); }
.preference-tab:hover:not(.active) { color: var(--text-primary); background: var(--glass-bg); }
.preference-content { display: none; }
.preference-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.preference-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.preference-item { padding: 8px 10px; border-radius: 8px; background: var(--glass-bg-weak); border: 1px solid var(--glass-border); font-size: 0.75rem; color: var(--text-secondary); transition: var(--transition-smooth); display: flex; align-items: center; gap: 6px; }
.preference-item:hover { background: var(--glass-bg); border-color: var(--primary-color); color: var(--text-primary); transform: translateY(-1px); }
.pref-icon-like { color: #22c55e; font-size: 0.78rem; }
.pref-icon-dislike { color: #ef4444; font-size: 0.78rem; }

/* ========== 故事文本框 ========== */
.story-panel { padding: 10px; max-height: 110px; display: flex; flex-direction: column; }
.story-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; flex-shrink: 0; }
.story-scroll-area { flex: 1; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--primary-color) transparent; }
.story-scroll-area::-webkit-scrollbar { width: 3px; }
.story-scroll-area::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 2px; }
.story-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.8; text-indent: 2em; }
.story-text p { margin-bottom: 10px; }

/* ========== 语录滚动条 ========== */
.quote-ticker { padding: 6px 14px; overflow: hidden; position: relative; }
.quote-ticker::before, .quote-ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30px; z-index: 2; pointer-events: none; }
.quote-ticker::before { left: 0; background: linear-gradient(90deg, var(--glass-bg-strong), transparent); }
.quote-ticker::after { right: 0; background: linear-gradient(270deg, var(--glass-bg-strong), transparent); }
.quote-track { display: flex; animation: ticker-scroll 30s linear infinite; white-space: nowrap; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.quote-item { display: inline-flex; align-items: center; gap: 10px; padding: 0 24px; font-size: 0.78rem; color: var(--text-secondary); }
.quote-divider { color: var(--primary-color); opacity: 0.5; }

/* ========== 弹幕标签云 ========== */
.danmaku-cloud { padding: 12px; position: relative; overflow: hidden; }
.danmaku-cloud h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; }
.danmaku-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.danmaku-tag { padding: 5px 12px; border-radius: 18px; font-size: 0.72rem; background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); color: var(--text-secondary); transition: var(--transition-smooth); animation: danmaku-float 3s ease-in-out infinite; cursor: default; }
.danmaku-tag:nth-child(odd) { animation-delay: 0s; }
.danmaku-tag:nth-child(even) { animation-delay: 1.5s; }
@keyframes danmaku-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.danmaku-tag:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); transform: translateY(-4px) scale(1.05); box-shadow: 0 6px 20px var(--shadow-glow); }

/* ========== 徽章展示区 ========== */
.badge-panel { padding: 12px; }
.badge-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge-item { aspect-ratio: 1; border-radius: 10px; background: var(--glass-bg-weak); border: 1px solid var(--glass-border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: var(--transition-smooth); position: relative; overflow: hidden; }
.badge-item:hover { transform: translateY(-2px); border-color: var(--primary-color); box-shadow: 0 6px 18px var(--shadow-glow); }
.badge-icon { font-size: 1.1rem; position: relative; z-index: 1; }
.badge-name { font-size: 0.64rem; color: var(--text-secondary); position: relative; z-index: 1; text-align: center; padding: 0 2px; }

/* ========== 相册 ========== */
.album-panel { padding: 12px; }
.album-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.album-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; transition: var(--transition-smooth); }
.album-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.album-overlay-mask { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,0.75)); display: flex; align-items: flex-end; padding: 6px; opacity: 0; transition: opacity 0.3s ease; }
.album-item:hover .album-thumb { transform: scale(1.1); }
.album-item:hover .album-overlay-mask { opacity: 1; }
.album-title { font-size: 0.66rem; color: #fff; }

/* ========== 二创作品 ========== */
.works-panel { padding: 12px; }
.works-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; }
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.work-item { border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; transition: var(--transition-smooth); aspect-ratio: 4/3; }
.work-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.work-mask { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(14, 165, 233, 0.7), rgba(6, 182, 212, 0.7)); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.work-item:hover .work-thumb { transform: scale(1.06); }
.work-item:hover .work-mask { opacity: 1; }
.work-item:hover { box-shadow: 0 6px 20px var(--shadow-glow); transform: translateY(-2px); }
.work-title { font-size: 0.78rem; color: #fff; font-weight: 600; margin-bottom: 2px; }
.work-type { font-size: 0.64rem; color: rgba(255,255,255,0.8); }

/* ========== 留言框 ========== */
.guestbook-panel { padding: 12px; }
.guestbook-panel h3 { font-size: 0.82rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; }
.message-list { max-height: 120px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--primary-color) transparent; }
.message-list::-webkit-scrollbar { width: 3px; }
.message-list::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 2px; }
.message-bubble { display: flex; gap: 8px; margin-bottom: 12px; animation: bubble-in 0.4s ease-out; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.msg-avatar { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; overflow: hidden; background: var(--glass-bg-weak); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--primary-light); border: 1px solid var(--glass-border); }
.msg-body { flex: 1; max-width: 85%; }
.msg-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.msg-name { font-size: 0.74rem; color: var(--primary-light); font-weight: 500; }
.msg-time { font-size: 0.64rem; color: var(--text-muted); }
.msg-content { padding: 7px 12px; border-radius: 4px 12px 12px 12px; background: var(--glass-bg-weak); border: 1px solid var(--glass-border); font-size: 0.76rem; color: var(--text-secondary); line-height: 1.6; }
.msg-input-area { margin-top: 10px; display: flex; gap: 8px; }
.msg-input { flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-bg-weak); color: var(--text-primary); font-size: 0.78rem; outline: none; transition: var(--transition-smooth); font-family: inherit; }
.msg-input::placeholder { color: var(--text-muted); }
.msg-input:focus { border-color: var(--primary-color); box-shadow: 0 0 12px var(--shadow-glow); background: var(--glass-bg); }
.msg-send-btn { padding: 8px 18px; border-radius: 8px; border: 1px solid var(--primary-color); background: var(--gradient-main); color: #fff; font-size: 0.78rem; cursor: pointer; transition: var(--transition-smooth); font-family: inherit; white-space: nowrap; }
.msg-send-btn:hover { transform: scale(1.02); box-shadow: 0 3px 16px var(--shadow-glow-strong); }

/* ========== 语音按钮 ========== */
.voice-panel { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.voice-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--glass-border-strong); background: var(--glass-bg-strong); backdrop-filter: blur(20px); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition-smooth); flex-shrink: 0; position: relative; overflow: hidden; }
.voice-btn:hover { transform: scale(1.08); box-shadow: 0 0 20px var(--shadow-glow); }
.voice-btn svg { width: 18px; height: 18px; fill: var(--primary-light); position: relative; z-index: 1; }
.voice-info { flex: 1; }
.voice-name { font-size: 0.78rem; color: var(--text-primary); margin-bottom: 4px; }
.voice-waveform { display: flex; align-items: center; gap: 2px; height: 20px; }
.voice-bar { width: 2.5px; border-radius: 2px; background: var(--primary-color); transition: height 0.15s ease; }
.voice-bar:nth-child(1) { height: 5px; } .voice-bar:nth-child(2) { height: 12px; } .voice-bar:nth-child(3) { height: 8px; }
.voice-bar:nth-child(4) { height: 15px; } .voice-bar:nth-child(5) { height: 6px; } .voice-bar:nth-child(6) { height: 13px; }
.voice-bar:nth-child(7) { height: 10px; } .voice-bar:nth-child(8) { height: 16px; } .voice-bar:nth-child(9) { height: 11px; } .voice-bar:nth-child(10) { height: 7px; }
.voice-playing .voice-bar { animation: wave-animate 0.6s ease-in-out infinite alternate; }
.voice-playing .voice-bar:nth-child(1) { animation-delay: 0s; } .voice-playing .voice-bar:nth-child(2) { animation-delay: 0.05s; }
.voice-playing .voice-bar:nth-child(3) { animation-delay: 0.1s; } .voice-playing .voice-bar:nth-child(4) { animation-delay: 0.15s; }
.voice-playing .voice-bar:nth-child(5) { animation-delay: 0.2s; } .voice-playing .voice-bar:nth-child(6) { animation-delay: 0.25s; }
.voice-playing .voice-bar:nth-child(7) { animation-delay: 0.3s; } .voice-playing .voice-bar:nth-child(8) { animation-delay: 0.35s; }
.voice-playing .voice-bar:nth-child(9) { animation-delay: 0.4s; } .voice-playing .voice-bar:nth-child(10) { animation-delay: 0.45s; }
@keyframes wave-animate { from { height: 3px; } to { height: var(--wave-h, 16px); } }

/* ========== 社交按钮 ========== */
.social-panel { padding: 12px 16px; }
.social-panel h3 { font-size: 0.85rem; color: var(--primary-light); margin-bottom: 10px; letter-spacing: 2px; }
.social-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.social-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition-smooth); position: relative; overflow: hidden; text-decoration: none; }
.social-btn:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 6px 18px var(--shadow-glow); border-color: transparent; }
.social-btn svg { width: 16px; height: 16px; fill: var(--primary-light); position: relative; z-index: 1; transition: fill 0.3s ease; }
.social-btn:hover svg { fill: #fff; }

/* ========== Tab控件 ========== */
.tab-control { display: flex; gap: 3px; padding: 3px; background: var(--glass-bg-weak); border-radius: 8px; margin-bottom: 10px; }
.tab-btn { flex: 1; padding: 8px 12px; border: none; border-radius: 6px; background: transparent; color: var(--text-secondary); font-size: 0.76rem; cursor: pointer; transition: var(--transition-smooth); font-family: inherit; }
.tab-btn.active { background: var(--gradient-main); color: #fff; box-shadow: 0 3px 10px var(--shadow-glow); }
.tab-btn:hover:not(.active) { color: var(--text-primary); background: var(--glass-bg); }
.tab-page { display: none; }
.tab-page.active { display: block; animation: fadeIn 0.3s ease; }

/* ========== 装饰挂件（关键修复：限制尺寸） ========== */
.floating-decorations {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3; overflow: hidden;
}
.decor-item {
  position: absolute; opacity: 0.1; animation: decor-float 6s ease-in-out infinite;
}
.decor-item:nth-child(1) { top: 12%; left: 2%; animation-delay: 0s; }
.decor-item:nth-child(2) { top: 42%; left: 0.5%; animation-delay: 2s; }
.decor-item:nth-child(3) { top: 68%; right: 2%; animation-delay: 1s; }
.decor-item:nth-child(4) { top: 22%; right: 1%; animation-delay: 3s; }
.decor-item:nth-child(5) { top: 82%; left: 6%; animation-delay: 4s; }
@keyframes decor-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(3deg); }
  66% { transform: translateY(4px) rotate(-2deg); }
}
.decor-item svg { width: 20px !important; height: 20px !important; max-width: 20px; max-height: 20px; fill: var(--primary-light); filter: drop-shadow(0 0 4px var(--shadow-glow)); display: block; }

/* ========== 弹窗 ========== */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px);
  z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px;
}
.popup-overlay.show { display: flex; animation: popup-fadeIn 0.3s ease; }
@keyframes popup-fadeIn { from { opacity: 0; } to { opacity: 1; } }
.popup-box {
  width: 100%; max-width: 420px; border-radius: 16px;
  background: var(--glass-bg-strong); backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-strong); padding: 24px; position: relative;
  animation: popup-scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px var(--shadow-glow);
}
@keyframes popup-scaleIn { from { opacity: 0; transform: scale(0.9) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.popup-close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--glass-border); background: var(--glass-bg); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition-smooth); }
.popup-close:hover { background: rgba(239, 68, 68, 0.2); border-color: #ef4444; }
.popup-close svg { width: 12px; height: 12px; fill: var(--text-secondary); }
.popup-title { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 12px; padding-right: 28px; }
.popup-content { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.7; }

/* ========== 底部 ========== */
.footer-section { margin-top: 16px; padding: 20px 24px; text-align: center; position: relative; overflow: hidden; }
.footer-section::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, var(--glass-border-strong), transparent); }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-link { font-size: 0.78rem; color: var(--text-secondary); text-decoration: none; transition: var(--transition-smooth); position: relative; }
.footer-link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background: var(--primary-color); transition: width 0.3s ease; }
.footer-link:hover { color: var(--primary-light); }
.footer-link:hover::after { width: 100%; }
.footer-copyright { font-size: 0.76rem; color: var(--text-muted); letter-spacing: 1px; }
.footer-decoration { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.footer-decor-line { width: 24px; height: 2px; border-radius: 1px; background: var(--gradient-main); opacity: 0.5; }
.footer-decor-line:nth-child(2) { width: 12px; }

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 180px 1fr; }
  .right-sidebar { display: contents; }
  .right-sidebar > *:nth-child(odd) { grid-column: 1; }
  .right-sidebar > *:nth-child(even) { grid-column: 2; }
}
@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; }
  .left-sidebar, .center-main, .right-sidebar { width: 100%; }
  .header-section { flex-wrap: wrap; gap: 10px; }
  .id-title-panel { max-width: 100%; order: 1; }
  .time-display { order: 2; text-align: left; }
  .theme-toggle-btn { order: 3; margin-left: auto; }
  .character-showcase { flex-direction: column; }
  .showcase-image-container { width: 100%; min-width: 100%; height: 140px; }
  .showcase-image-container img { height: 140px; }
  .preference-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  html { font-size: 14px; }
  .main-wrapper { padding: 10px; }
  .signature-text { font-size: 1.2rem; }
  .radar-container { width: 150px; height: 150px; }
  .social-btn { width: 32px; height: 32px; }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ========== 选择颜色 ========== */
::selection { background: rgba(14, 165, 233, 0.3); color: var(--text-primary); }
