/* 设计系统 - 亮色主题 */
:root {
    /* 基础色 - 亮色 */
    --bg: #f8fafc;
    --bg-soft: #ffffff;
    --bg-hover: #f1f5f9;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* 品牌色 - 清新蓝紫 */
    --brand: #6366f1;
    --brand-hover: #4f46e5;
    --brand-light: rgba(99, 102, 241, 0.08);
    --accent: #818cf8;
    --accent-2: #ec4899;
    --accent-3: #14b8a6;

    /* 圆角 */
    --radius: 10px;
    --radius-lg: 14px;

    /* 阴影 - 轻柔 */
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-float: 0 8px 30px rgba(0,0,0,0.08);

    /* 缓动 */
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础 */
body {
    font-family: "LXGW WenKai", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    background: var(--bg);
}

/* 粒子画布 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* 渐变光球 */
/* 渐变光球 - 柔和彩色 */
.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

.gradient-orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    top: -150px;
    left: -150px;
}

.gradient-orb-2 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, #fbcfe8, #f9a8d4);
    bottom: -100px;
    right: -100px;
    animation-delay: -7s;
}

.gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #99f6e4, #5eead4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* 浮动装饰元素 */
.floating-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.decor-item {
    position: absolute;
    font-size: 24px;
    opacity: 0.15;
    animation: floating linear infinite;
}

.decor-1 { top: 10%; left: 5%; animation-duration: 25s; animation-delay: 0s; font-size: 28px; }
.decor-2 { top: 20%; right: 10%; animation-duration: 30s; animation-delay: -5s; }
.decor-3 { top: 60%; left: 8%; animation-duration: 22s; animation-delay: -10s; font-size: 20px; }
.decor-4 { top: 70%; right: 15%; animation-duration: 28s; animation-delay: -15s; }
.decor-5 { top: 40%; left: 15%; animation-duration: 35s; animation-delay: -8s; font-size: 32px; }
.decor-6 { top: 80%; right: 5%; animation-duration: 20s; animation-delay: -12s; }
.decor-7 { top: 15%; left: 50%; animation-duration: 32s; animation-delay: -3s; font-size: 18px; }
.decor-8 { top: 50%; right: 25%; animation-duration: 26s; animation-delay: -7s; }

@keyframes floating {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translate(-100px, -100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 加载进度条 */
.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent-2), var(--accent-3));
    background-size: 200% 100%;
    animation: gradient-move 2s linear infinite;
    z-index: 10000;
    transition: width 0.3s ease;
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 键盘快捷键提示 */
.shortcuts-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    z-index: 50;
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--ease);
    pointer-events: none;
}

.shortcuts-hint.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
}

.shortcut-item kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text);
    box-shadow: 0 2px 0 var(--border);
}

/* 加载动画 - 新样式 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #c084fc);
    animation: loading-pulse 1.5s ease-in-out infinite;
    background-size: cover;
    background-position: center;
}

@keyframes loading-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent-2));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.loading-text {
    color: var(--text-2);
    font-size: 14px;
}

/* 浅色蒙版 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
    pointer-events: none;
}
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-2);
    font-size: 18px;
}

/* 主内容容器 */
.main-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 头像容器 */
.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    padding-bottom: 80px;
}

/* 头像包装器 */
.avatar-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 0.8s var(--ease) 0.2s forwards;
}

/* 光晕背景 */
.avatar-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255, 107, 157, 0.3) 0%,
        rgba(192, 132, 252, 0.2) 40%,
        rgba(96, 165, 250, 0.1) 70%,
        transparent 100%);
    animation: glow-pulse 3s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* 旋转光环 */
.avatar-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    width: 190px;
    height: 190px;
    border-top-color: rgba(255, 107, 157, 0.6);
    border-right-color: rgba(255, 107, 157, 0.2);
    animation: spin 8s linear infinite;
}

.ring-2 {
    width: 200px;
    height: 200px;
    border-bottom-color: rgba(192, 132, 252, 0.5);
    border-left-color: rgba(192, 132, 252, 0.2);
    animation: spin 12s linear infinite reverse;
}

.ring-3 {
    width: 210px;
    height: 210px;
    border-top-color: rgba(96, 165, 250, 0.3);
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: rgba(96, 165, 250, 0.1);
    animation: spin 6s linear infinite;
}

/* 闪烁装饰 */
.avatar-sparkle {
    position: absolute;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    animation: sparkle 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.sparkle-1 { top: 10px; left: 30px; animation-delay: 0s; }
.sparkle-2 { top: 5px; right: 35px; animation-delay: 0.3s; }
.sparkle-3 { top: 40px; left: 10px; animation-delay: 0.6s; }
.sparkle-4 { top: 40px; right: 10px; animation-delay: 0.9s; }
.sparkle-5 { bottom: 30px; left: 20px; animation-delay: 1.2s; }
.sparkle-6 { bottom: 30px; right: 20px; animation-delay: 1.5s; }

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 头像框架 */
.avatar-frame {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, 
        #ff6b9d 0%, 
        #c084fc 25%, 
        #60a5fa 50%, 
        #34d399 75%, 
        #fbbf24 100%);
    background-size: 300% 300%;
    animation: gradient-shift 5s ease infinite;
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    z-index: 2;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.avatar-frame:hover {
    transform: scale(1.08);
    box-shadow: 
        0 0 40px rgba(255, 107, 157, 0.3),
        0 0 80px rgba(192, 132, 252, 0.15);
}

/* 悬停时所有光环加速 */
.avatar-wrapper:hover .ring-1 { animation-duration: 3s; }
.avatar-wrapper:hover .ring-2 { animation-duration: 5s; }
.avatar-wrapper:hover .ring-3 { animation-duration: 2s; }
.avatar-wrapper:hover .avatar-glow { animation-duration: 1.5s; }

/* 圆形头像 */
.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid var(--bg);
    transition: transform 0.3s var(--ease);
}

.avatar-frame:hover .avatar {
    transform: scale(1.02);
}

/* 在线徽章 */
.online-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-soft);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    z-index: 5;
    box-shadow: var(--shadow-card);
    font-size: 12px;
    color: var(--text-2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* 名字 */
.avatar-title {
    margin-top: 28px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--text), var(--brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s var(--ease) 0.3s forwards;
}

/* 时钟容器 */
.clock-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s var(--ease) 0.4s forwards;
}

.greeting {
    color: var(--text-2);
    font-size: 15px;
}

.clock {
    color: var(--text-3);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    padding: 4px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* 副标题容器 */
.subtitle-container {
    margin-top: 16px;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 副标题 */
.subtitle {
    color: var(--text-2);
    font-size: 18px;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
}

/* 枫叶光标 */
.cursor-container {
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
}

.leaf-cursor {
    font-size: 18px;
    color: var(--accent-2);
}

/* 标签容器 */
.tags-container {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s var(--ease) 0.5s forwards;
}

/* 弹幕容器 */
.danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text-3);
    opacity: 0.4;
    animation: danmaku-float linear forwards;
    pointer-events: none;
}

@keyframes danmaku-float {
    from {
        transform: translateX(100vw);
    }
    to {
        transform: translateX(-100%);
    }
}

/* 滚动进度条 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent-2));
    z-index: 100;
    transition: width 0.1s ease;
}

/* 标签 - VibeHub Chip 风格 */
.tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--bg-soft);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-2);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s var(--ease), border-color 0.18s ease;
}

.tag:hover {
    color: var(--text);
    background: var(--bg-hover);
    transform: translateY(-2px);
    border-color: var(--border);
}

.tag:active {
    transform: translateY(1px);
}

.tag-icon {
    font-size: 14px;
}

/* 标签特殊颜色 */
.gender {
    border-color: #c7d2fe;
    background: rgba(99, 102, 241, 0.05);
}
.gender .tag-icon { color: #6366f1; }

.age {
    border-color: #fbcfe8;
    background: rgba(236, 72, 153, 0.05);
}
.age .tag-icon { color: #ec4899; }

.developer {
    border-color: #99f6e4;
    background: rgba(20, 184, 166, 0.05);
}
.developer .tag-icon { color: #14b8a6; }

/* 功能按钮容器 */
.function-buttons {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s var(--ease) 0.6s forwards;
}

/* 功能按钮 */
.function-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 16px;
    transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.button-icon {
    font-size: 20px;
    transition: transform 0.2s var(--ease);
}

.button-text {
    font-size: 16px;
    letter-spacing: 0.5px;
}

.function-button:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.function-button:hover .button-icon {
    transform: scale(1.1);
}

.function-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* 按钮特殊样式 */
.sitemap-button {
    border-color: #c7d2fe;
}
.sitemap-button:hover {
    border-color: #a5b4fc;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.friends-button {
    border-color: #fbcfe8;
}
.friends-button:hover {
    border-color: #f9a8d4;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.12);
}

/* 社交图标容器 */
.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    justify-content: center;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s var(--ease) 0.7s forwards;
}

/* 社交图标 */
.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-2);
    font-size: 22px;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s var(--ease), border-color 0.18s ease;
    cursor: pointer;
    border: 1px solid var(--border);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.social-icon:hover {
    transform: translateY(-4px) rotate(-4deg) scale(1.06);
}

.social-icon:active {
    transform: translateY(-1px) scale(0.97);
}

/* 图标特殊颜色 */
.github:hover {
    background: #f3f4f6;
    color: #24292f;
    border-color: #d1d5db;
    box-shadow: var(--shadow-card);
}

.bilibili:hover {
    background: #e0f7fa;
    color: #00aeec;
    border-color: #b2ebf2;
    box-shadow: 0 6px 16px rgba(0, 174, 236, 0.1);
}

.telegram:hover {
    background: #e0f7fa;
    color: #0088cc;
    border-color: #b2ebf2;
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.1);
}

.social-icon svg {
    fill: currentColor;
}

/* 主题切换按钮 - 精致滑动开关 */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 56px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 50;
    padding: 0;
}

.theme-toggle-track {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover .theme-toggle-track {
    border-color: var(--brand);
}

.theme-icon-sun,
.theme-icon-moon {
    font-size: 12px;
    color: var(--text-3);
    z-index: 1;
    transition: color 0.3s ease;
}

.theme-toggle-track .theme-icon-sun {
    color: #f59e0b;
}

.theme-toggle-track .theme-icon-moon {
    color: var(--text-3);
}

.theme-toggle-thumb {
    position: absolute;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s var(--ease), background 0.3s ease;
}

.theme-toggle.is-dark .theme-toggle-thumb {
    transform: translateX(28px);
    background: var(--brand);
    border-color: var(--brand);
}

.theme-toggle.is-dark .theme-toggle-track {
    background: var(--bg-hover);
}

.theme-toggle.is-dark .theme-icon-moon {
    color: #818cf8;
}

.theme-toggle.is-dark .theme-icon-sun {
    color: var(--text-3);
}

/* 页脚 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    color: var(--text-3);
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
}

.footer a {
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--text);
}

.footer-separator {
    margin: 0 10px;
    color: var(--border);
}

/* 模态框遮罩 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 模态框内容 - 全新设计 */
.modal-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 32px 64px -16px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(30px) scale(0.92);
    transition: transform 0.5s var(--ease), opacity 0.3s ease;
    margin: 0 20px;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

/* 模态框头部 - 渐变背景 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-hover));
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-light), transparent 70%);
    opacity: 0.3;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.modal-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-3);
    margin-top: 4px;
}

.modal-title-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 20px;
    position: relative;
}

.sitemap-modal .modal-title-icon {
    background: linear-gradient(135deg, var(--brand), #818cf8);
    color: white;
    box-shadow: 
        0 8px 16px -4px rgba(99, 102, 241, 0.4),
        0 0 0 4px rgba(99, 102, 241, 0.1);
}

.friends-modal .modal-title-icon {
    background: linear-gradient(135deg, var(--accent-2), #f472b6);
    color: white;
    box-shadow: 
        0 8px 16px -4px rgba(236, 72, 153, 0.4),
        0 0 0 4px rgba(236, 72, 153, 0.1);
}

/* 关闭按钮 */
.close-button {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-3);
    font-size: 16px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: all 0.25s var(--ease);
    position: relative;
    z-index: 1;
}

.close-button:hover {
    background: var(--bg-hover);
    color: var(--text);
    transform: rotate(90deg) scale(1.05);
    border-color: var(--brand);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* 模态框主体 */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

/* 搜索框 - 新增 */
.modal-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    border-radius: 16px;
    margin-bottom: 24px;
    transition: all 0.3s var(--ease);
}

.modal-search:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-search i {
    color: var(--text-3);
    font-size: 16px;
}

.modal-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 15px;
    color: var(--text);
    font-family: var(--font-sans);
}

.modal-search input::placeholder {
    color: var(--text-3);
}

/* 站点网格 - 小地图布局 */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 站点卡片 - 小地图横向卡片 */
.sitemap-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s var(--ease);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sitemap-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.sitemap-card:active {
    transform: translateY(-2px);
}

.sitemap-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 28px;
    color: white;
    transition: all 0.3s var(--ease);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sitemap-card:hover .sitemap-card-icon {
    transform: scale(1.08) rotate(-4deg);
}

.sitemap-card-content {
    flex: 1;
    min-width: 0;
}

.sitemap-card-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.sitemap-card-url {
    font-family: monospace, "Courier New", monospace;
    font-size: 13px;
    color: var(--text-3);
    word-break: break-all;
    line-height: 1.4;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1; 
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    }
    50% { 
        opacity: 0.7; 
        box-shadow: 0 0 16px rgba(34, 197, 94, 0.8);
    }
}

/* 站点统计 - 新增 */
.sitemap-stats {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    color: var(--text-2);
}

.stat-badge i {
    color: var(--brand);
}

.stat-badge strong {
    color: var(--text);
    font-weight: 600;
}

/* 友情链接网格 */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* 友情链接卡片 - 全新设计 */
.friend-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--bg-soft);
    border-radius: 18px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.35s var(--ease);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.friend-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 0%, rgba(236, 72, 153, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.friend-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 32px -8px rgba(236, 72, 153, 0.15),
        0 0 0 1px rgba(236, 72, 153, 0.1);
    border-color: var(--accent-2);
}

.friend-card:hover::before {
    opacity: 1;
}

.friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--border);
    transition: all 0.35s var(--ease);
}

.friend-card:hover .friend-avatar {
    transform: scale(1.1) rotate(-5deg);
    border-color: var(--accent-2);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.friend-info {
    flex-grow: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.friend-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

/* 加载状态 */
.loading {
    text-align: center;
    color: var(--text-3);
    font-size: 15px;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 响应式 */
@media (max-width: 768px) {
    .avatar-wrapper {
        width: 180px;
        height: 180px;
    }

    .avatar-glow {
        width: 140px;
        height: 140px;
    }

    .ring-1 { width: 155px; height: 155px; }
    .ring-2 { width: 165px; height: 165px; }
    .ring-3 { width: 175px; height: 175px; }

    .avatar-frame {
        width: 130px;
        height: 130px;
    }

    .avatar-sparkle {
        font-size: 12px;
    }

    .online-badge {
        bottom: 15px;
        right: 15px;
        padding: 4px 10px;
        font-size: 11px;
    }

    .badge-dot {
        width: 6px;
        height: 6px;
    }

    .avatar-title {
        font-size: 26px;
        margin-top: 20px;
    }

    .subtitle {
        font-size: 16px;
    }

    .tags-container {
        gap: 10px;
        margin-top: 20px;
    }

    .tag {
        padding: 6px 14px;
        font-size: 13px;
    }

    .function-buttons {
        gap: 14px;
        margin-top: 28px;
    }

    .function-button {
        padding: 12px 24px;
        gap: 10px;
    }

    .button-text {
        font-size: 14px;
    }

    .social-icons {
        gap: 16px;
        margin-top: 28px;
    }

    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .modal-content {
        width: 95%;
    }

    .sitemap-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sitemap-card {
        padding: 16px;
    }

    .sitemap-card-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .sitemap-card-name {
        font-size: 17px;
    }

    .sitemap-card-url {
        font-size: 12.5px;
    }

    .sites-container {
        grid-template-columns: 1fr;
    }

    .friends-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .avatar-wrapper {
        width: 150px;
        height: 150px;
    }

    .avatar-glow {
        width: 120px;
        height: 120px;
    }

    .ring-1 { width: 130px; height: 130px; }
    .ring-2 { width: 140px; height: 140px; }
    .ring-3 { width: 150px; height: 150px; }

    .avatar-frame {
        width: 110px;
        height: 110px;
    }

    .avatar-sparkle {
        font-size: 10px;
    }

    .online-badge {
        bottom: 10px;
        right: 10px;
        padding: 3px 8px;
        font-size: 10px;
    }

    .avatar-title {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
        white-space: normal;
        max-width: 300px;
    }
}

/* ============================================
   VibeHub 精选动画效果
   ============================================ */

/* 入场动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 自定义鼠标 */
html.has-cursor-fx,
html.has-cursor-fx * {
    cursor: none !important;
}

.cursor-fx {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}

.cursor-fx.on {
    opacity: 1;
}

.cursor-fx .cf-dot {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
    transition: width 0.2s var(--ease), height 0.2s var(--ease), margin 0.2s var(--ease), background 0.2s, border 0.2s;
}

.cursor-fx.is-link .cf-dot {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* 骨架屏波纹加载 */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-hover) 25%,
        var(--bg-soft) 50%,
        var(--bg-hover) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-wave 1.4s ease infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-wave {
    to { background-position: -200% 0; }
}

/* 品牌色脉冲指示器 */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
    animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.75; }
}

/* 状态指示器 - 在线状态 */
.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
    .pulse-dot { animation: none; }
    .avatar::before { animation: none; }
    .click-particle { display: none; }
}

/* 点击特效粒子 */
.click-particle {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    animation: click-float 0.8s ease-out forwards;
}

@keyframes click-float {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.5);
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 16px;
        right: 16px;
    }
}
