/* CSS变量定义 */
:root {
    /* 深色主题 */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-primary: #ff6b35;
    --accent-secondary: #ffd93d;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glow-color: rgba(255, 107, 53, 0.3);
}

/* 亮色主题 */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --accent-primary: #ff6b35;
    --accent-secondary: #ffd93d;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(255, 107, 53, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glow-color: rgba(255, 107, 53, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.theme-btn .light-icon {
    display: none;
}

[data-theme="light"] .theme-btn .dark-icon {
    display: none;
}

[data-theme="light"] .theme-btn .light-icon {
    display: block;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
}

.profile-card {
    background: linear-gradient(145deg, var(--card-bg), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ffd93d, #ff6b35);
    border-radius: 20px 20px 0 0;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 0 20px var(--glow-color);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    opacity: 0.3;
    filter: blur(15px);
    animation: glow 2s ease-in-out infinite alternate;
}

/* 头像装饰效果 */
.avatar-sparkles {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    pointer-events: none;
    z-index: -1;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
    animation: sparkle 4s infinite;
    box-shadow: 0 0 8px var(--accent-secondary);
}

.sparkle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 70%;
    right: 15%;
    animation-delay: 1.5s;
}

.sparkle:nth-child(3) {
    bottom: 20%;
    left: 25%;
    animation-delay: 3s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes glow {
    0% { opacity: 0.1; }
    100% { opacity: 0.35; }
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-secondary);
    font-weight: 400;
    opacity: 0.8;
}

.profile-content {
    text-align: center;
}

.signature {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 217, 61, 0.1));
    border-radius: 15px;
    border-left: 4px solid var(--accent-primary);
}

.signature p {
    font-size: 1.1rem;
    color: var(--accent-secondary);
    font-style: italic;
    line-height: 1.6;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 217, 61, 0.05));
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.info-card:hover::before {
    opacity: 1;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.info-header i {
    font-size: 1.3rem;
    color: var(--accent-primary);
    width: 24px;
    text-align: center;
}

.info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-content {
    padding-left: 36px;
}

.info-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 社交媒体链接 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 25px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.blog-link:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 217, 61, 0.1));
    border-color: var(--accent-primary);
}

.email-link:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 217, 61, 0.1));
    border-color: var(--accent-primary);
}

.github-link:hover {
    background: linear-gradient(135deg, rgba(36, 41, 46, 0.1), rgba(255, 107, 53, 0.1));
    border-color: var(--accent-primary);
}

/* 通知提示 */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 15px 25px;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 8px 25px var(--shadow-color);
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification i {
    color: var(--accent-secondary);
}

/* 魔法粒子效果 */
.magic-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd93d;
    border-radius: 50%;
    animation: float 6s infinite linear;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    top: 30%;
    right: 25%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    bottom: 30%;
    left: 20%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    top: 80%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .profile-card {
        padding: 30px 20px;
    }

    .name {
        font-size: 2rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .signature p {
        font-size: 1rem;
    }

    .theme-toggle {
        top: 15px;
        right: 15px;
    }

    .theme-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }



    .social-links {
        flex-direction: column;
        gap: 15px;
    }

    .social-link {
        justify-content: center;
        padding: 15px 25px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .profile-card {
        padding: 25px 15px;
    }

    .name {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .signature {
        padding: 15px;
        margin-bottom: 25px;
    }

    .signature p {
        font-size: 0.9rem;
    }

    .info-card {
        padding: 16px;
    }

    .info-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .info-header i {
        font-size: 1.1rem;
        width: 20px;
    }

    .info-title {
        font-size: 1rem;
    }

    .info-content {
        padding-left: 30px;
    }

    .info-description {
        font-size: 0.9rem;
    }



    .social-link {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* 平板设备 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 600px;
    }

    .profile-card {
        padding: 35px 25px;
    }
}

/* 大屏幕设备 */
@media (min-width: 1025px) {
    .container {
        max-width: 550px;
    }

    .profile-card {
        padding: 45px 35px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b35, #ffd93d);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ffd93d, #ff6b35);
}

/* 波纹动画 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .info-card:hover {
        transform: none;
    }

    .social-link:hover {
        transform: none;
    }

    .theme-btn:hover {
        transform: none;
    }
}
