*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Microsoft YaHei', sans-serif;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
    background: var(--bg-image) no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

/* ==================== 遮罩层 ==================== */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(230, 240, 255, 0.85), rgba(240, 247, 255, 0.85));
    z-index: -1;
}

/* ==================== 主容器 ==================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ==================== 头部样式 ==================== */
.header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
}

/* ==================== 头像容器 ==================== */
.avatar-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 8px;
}

.grey-track {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 6px solid #ddd;
    border-radius: 50%;
    opacity: 0.7;
}

.avatar-outer-ring {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid #ddd;
    padding: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    animation: rotateAvatar 20s linear infinite;
}

/* ==================== 动画元素 ==================== */
.blue-line {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 3px solid transparent;
    border-top-color: #4a8cff;
    border-radius: 50%;
    animation: rotateRing 8s linear infinite reverse;
}

.purple-line {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.purple-line:nth-child(1) {
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-left-color: #9c27b0;
    animation: rotateRing 12s linear infinite;
    opacity: 0.9;
}

.purple-line:nth-child(2) {
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-right-color: #9c27b0;
    animation: rotateRing 15s linear infinite reverse;
    opacity: 0.8;
}

.purple-line:nth-child(3) {
    top: -25px;
    left: -25px;
    right: -25px;
    bottom: -25px;
    border-bottom-color: #9c27b0;
    animation: rotateRing 18s linear infinite;
    opacity: 0.7;
}

.purple-line:nth-child(4) {
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    border-top-color: #9c27b0;
    animation: rotateRing 10s linear infinite reverse;
    opacity: 0.6;
}

.purple-line:nth-child(5) {
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
    border-left-color: #9c27b0;
    animation: rotateRing 14s linear infinite;
    opacity: 0.5;
}

.purple-line:nth-child(6) {
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    border-right-color: #9c27b0;
    animation: rotateRing 16s linear infinite reverse;
    opacity: 0.4;
}

.purple-line:nth-child(7) {
    top: -45px;
    left: -45px;
    right: -45px;
    bottom: -45px;
    border-bottom-color: #9c27b0;
    animation: rotateRing 20s linear infinite;
    opacity: 0.3;
}

.purple-line:nth-child(8) {
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    border-top-color: #9c27b0;
    animation: rotateRing 22s linear infinite reverse;
    opacity: 0.2;
}

/* ==================== 动画定义 ==================== */
@keyframes rotateAvatar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* ==================== 文字样式 ==================== */
.name {
    font-size: 2.8rem;
    margin: 30px 0 15px;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* ==================== 按钮区域 ==================== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px auto;
    max-width: 800px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 25px;
    background: white;
    color: #4a8cff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 2px solid rgba(74, 140, 255, 0.1);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.action-btn i {
    margin-right: 10px;
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #4a8cff, #3a7bef);
    color: white;
    border-color: transparent;
}

.action-btn:hover i {
    transform: scale(1.1);
}

/* ==================== 卡片样式 ==================== */
.main-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.main-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a8cff;
    font-weight: 600;
}

.time-display {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    margin: 5px 0;
}

/* ==================== 页脚样式 ==================== */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
}

.beian {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #999;
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
}

/* ==================== 弹幕系统 ==================== */
.danmu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.danmu-item {
    position: absolute;
    white-space: nowrap;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-size: 18px;
    font-weight: bold;
    will-change: transform;
    opacity: 0.9;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s;
}

.danmu-item:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.5);
}

/* ==================== 在线统计 ==================== */
.online-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.stat-box {
    background: rgba(255,255,255,0.2);
    padding: 6px 15px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    min-width: 80px;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .header {
        padding: 40px 0 30px;
    }
    
    .avatar-container {
        width: 180px;
        height: 180px;
    }
    
    .name {
        font-size: 2.2rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .danmu-item {
        font-size: 14px;
    }
    
    .main-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8rem;
    }
    
    .action-btn {
        padding: 15px;
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
}

/* ==================== 其他微交互 ==================== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 140, 255, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 140, 255, 0.8);
}

/* ==================== 打印样式 ==================== */
@media print {
    body::before,
    .danmu-container,
    .action-buttons {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 10px;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ==================== 高DPI设备优化 ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .avatar {
        border-width: 3px;
    }
    
    .action-btn {
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
}

/* ==================== 暗黑模式预留 ==================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-filter: brightness(0.8);
    }
    
    body {
        color: #f0f0f0;
    }
    
    .main-card {
        background: rgba(30, 30, 30, 0.85);
        color: #f0f0f0;
    }
}

/* ==================== 动画性能优化 ==================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}