/* 基础样式重置 */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --bg-gradient-start: #f5f7fa;
    --bg-gradient-end: #c3cfe2;
    --main-bg: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #dfe6ec;
        --text-color: #e0e0e0;
        --bg-gradient-start: #2c3e50;
        --bg-gradient-end: #3498db;
        --main-bg: rgba(40, 44, 52, 0.98);
        --shadow-color: rgba(255,255,255,0.08);
    }
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: 15px 15px 0 0;
    background: var(--main-bg);
    backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px var(--shadow-color);
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.profile-card {
    background: var(--main-bg);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transition: transform 0.3s ease;
}

.avatar-container {
    margin: 0 auto 1.5rem;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

@keyframes shake {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(3deg) scale(1.1); }
    75% { transform: rotate(-3deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }

}

.avatar-container:hover .avatar {
    animation: shake 0.8s ease-in-out forwards;
}

.name {
    color: var(--primary-color);
    margin: 0 0 0.8rem;
    font-size: 2rem;
}

.bio {
    color: var(--text-color);
    margin: 0 0 2rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::after {
    content: attr(data-hover-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.social-link:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.social-link:hover span,
.social-link:hover i {
    opacity: 0;
    transform: translateY(-10px);
}

.social-link span {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.social-link i {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--main-bg);
    color: var(--text-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.contact-info p {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

@media (max-width: 480px) {
    .profile-card {
        padding: 1rem;
        margin: 0.5rem 0.5rem 60px;
    }
    
    .avatar-container {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .site-footer {
        font-size: 0.8rem;
        padding: 0.5rem;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 100;
        background: var(--main-bg);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-radius: 0;
        transform: none;
        backdrop-filter: none;
        box-shadow: none;
    }

    .modal-content {
        max-width: 95vw;
        padding: 1rem;
        margin: 0.5rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .name {
        font-size: 1.5rem;
    }

    .bio {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
  body {
    height: 100vh;
    overflow: hidden;
  }
  
  .profile-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
  }

  .social-links {
    margin-top: auto;
    padding-bottom: 15px;
  }

  .modal-content {
    max-height: 80vh;
    overflow-y: auto;
  }
}
