/* ============================================
   CSS 变量 - 设计系统
   ============================================ */
:root {
    /* 主色调 - 紫蓝渐变 */
    --primary-start: #667eea;
    --primary-end: #764ba2;

    /* 强调色 */
    --accent-cyan: #00d4ff;
    --accent-pink: #ff6b9d;
    --accent-purple: #a855f7;

    /* 背景色 */
    --bg-dark: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);

    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* 边框 */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(102, 126, 234, 0.5);

    /* 阴影 */
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* 尺寸 */
    --card-max-width: 420px;
    --avatar-size: 120px;
    --btn-height: 56px;

    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   基础样式重置
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   背景效果
   ============================================ */

/* 渐变背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* 网格背景 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* 粒子容器 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* 光晕效果 */
.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-start);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 350px;
    height: 350px;
    background: var(--primary-end);
    bottom: -50px;
    right: -50px;
    animation-delay: -7s;
}

.glow-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(20px, 10px) scale(1.05);
    }
}

/* ============================================
   主容器
   ============================================ */
.container {
    position: relative;
    z-index: 10;
    padding: 2rem 1rem;
    width: 100%;
    max-width: var(--card-max-width);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   玻璃卡片
   ============================================ */
.card {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-medium);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--primary-start),
            var(--primary-end),
            transparent);
    opacity: 0.5;
}

.card:hover {
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    border-color: var(--border-glow);
}

/* ============================================
   头像
   ============================================ */
.avatar-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.avatar-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end), var(--accent-cyan));
    animation: rotate 8s linear infinite;
    opacity: 0.8;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.avatar {
    position: relative;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    background: var(--bg-dark);
    padding: 4px;
    z-index: 1;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* ============================================
   用户信息
   ============================================ */
.user-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.username {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bio {
    font-size: 0.875rem;
    color: var(--accent-purple);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 280px;
    white-space: pre-line;
}

/* ============================================
   社交图标
   ============================================ */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-medium);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.social-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

/* ============================================
   导航按钮
   ============================================ */
.nav-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.nav-btn {
    width: 100%;
    height: var(--btn-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: var(--transition-slow);
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    flex-shrink: 0;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-text {
    flex: 1;
}

.btn-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.nav-btn:hover .btn-arrow {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

/* ============================================
   底部装饰
   ============================================ */
.footer-decoration {
    display: flex;
    gap: 6px;
    margin-top: 2rem;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: pulse 2s ease-in-out infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.3s;
}

.dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ============================================
   版权信息
   ============================================ */
.copyright {
    margin-top: 2rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 480px) {
    :root {
        --avatar-size: 100px;
        --btn-height: 52px;
    }

    .card {
        padding: 2.5rem 1.5rem 1.5rem;
        border-radius: 20px;
    }

    .username {
        font-size: 1.5rem;
    }

    .bio {
        font-size: 0.75rem;
    }

    .description {
        font-size: 0.875rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .nav-btn {
        border-radius: 14px;
        font-size: 0.9375rem;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
    }

    .btn-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   动画入场效果
   ============================================ */
.card {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.avatar-wrapper {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.user-info {
    animation: fadeIn 0.6s ease 0.4s both;
}

.social-icons {
    animation: fadeIn 0.6s ease 0.5s both;
}

.nav-btn:nth-child(1) {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.nav-btn:nth-child(2) {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.7s both;
}

.nav-btn:nth-child(3) {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   图片弹窗 (移动端优化)
   ============================================ */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    margin: 20px auto;
    padding: 0 10px;
}

.image-modal.show .image-modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
}

.modal-close-btn:hover,
.modal-close-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
}

.modal-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    background: white;
}