* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 加载动画样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 44.8px;
    height: 44.8px;
    color: #6495ED;
    position: relative;
    margin: 0 auto;
    background: radial-gradient(11.2px, currentColor 94%, #0000);
}

.loader:before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(10.08px at bottom right, #0000 94%, currentColor) top left,
                radial-gradient(10.08px at bottom left, #0000 94%, currentColor) top right,
                radial-gradient(10.08px at top right, #0000 94%, currentColor) bottom left,
                radial-gradient(10.08px at top left, #0000 94%, currentColor) bottom right;
    background-size: 22.4px 22.4px;
    background-repeat: no-repeat;
    animation: loader 1.5s infinite cubic-bezier(0.3, 1, 0, 1);
}

@keyframes loader {
    33% {
        inset: -11.2px;
        transform: rotate(0deg);
    }
    66% {
        inset: -11.2px;
        transform: rotate(90deg);
    }
    100% {
        inset: 0;
        transform: rotate(90deg);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.announcement {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 6px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    z-index: 2;
    max-width: 90%;
    width: fit-content;
    font-size: 15px;
    line-height: 1.4;
}

.announcement p {
    margin: 0;
    text-align: center;
    color: #333;
    font-size: 15px;
}

.announcement a {
    color: #3553ff;
    text-decoration: none;
}

.announcement a:visited,
.announcement a:hover,
.announcement a:active {
    color: #3553ff;
    text-decoration: none;
}

.share-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.share-button:hover {
    transform: scale(1.1);
}

.share-button img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.share-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.share-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.share-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.share-modal.active .share-content {
    transform: scale(1);
    opacity: 1;
}

.share-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #333;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.share-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.share-option img {
    width: 30px;
    height: 30px;
    /* 保持社交图标原有颜色 */
}

.share-option span {
    font-size: 12px;
    color: #666;
}

.copy-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-link:hover {
    background-color: #ebebeb;
}

.copy-link img {
    width: 20px;
    height: 20px;
}

.copy-link span {
    font-size: 14px;
    color: #666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #af40ff, #5b42f3 60%, #00ddeb);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
}

.profile {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.name {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.title {
    font-size: 1.2em;
    opacity: 0.95;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.social-icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.social-icon:hover {
    /* 移除背景色变化，只保留图标放大效果 */
}

.social-icon:hover img {
    transform: scale(1.1);
}

.bio {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}



.typing-effect {
    font-size: 1.2em;
    margin: 15px auto;
    min-height: 1.5em;
    position: relative;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
}

.typing-effect .prefix {
    color: white;
    display: inline-block;
    margin-right: 8px;
    white-space: nowrap;
}

.typing-effect .words {
    overflow: hidden;
    position: relative;
    height: 1.5em;
}

.typing-effect .word {
    display: block;
    height: 100%;
    padding-left: 0;
    color: white;
    animation: spin_words 12s infinite;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spin_words {
    0% {
        transform: translateY(0);
    }
    5% {
        transform: translateY(-102%);
    }
    25% {
        transform: translateY(-100%);
    }
    30% {
        transform: translateY(-202%);
    }
    50% {
        transform: translateY(-200%);
    }
    55% {
        transform: translateY(-302%);
    }
    75% {
        transform: translateY(-300%);
    }
    80% {
        transform: translateY(-402%);
    }
    100% {
        transform: translateY(-400%);
    }
}

/* Skills Section */
.skills {
    padding: 40px 0;
    background-color: white;
}

.skills h2 {
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.skill-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.skill-item i {
    font-size: 2.5em;
    color: #6366f1;
    margin-bottom: 20px;
}

.skill-icon {
    width: 2.5em;
    height: 2.5em;
    margin-bottom: 20px;
}

.btn-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-right: 5px;
}

.contact-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 5px;
}

/* Projects Section */
.projects {
    padding: 40px 0;
    background-color: white;
}

.projects h2 {
    text-align: center;
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.project-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.25rem;
    color: #2d3748;
}

.project-card p {
    padding: 0 20px;
    color: #718096;
    flex-grow: 1;
    margin-bottom: 20px;
}

.project-links {
    padding: 0 20px 20px;
    display: flex;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #6366f1;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    font-size: 1.1rem;
}

.btn:hover {
    background-color: #4f46e5;
}

/* Contact Section */
.contact {
    padding: 40px 0;
    background-color: white;
    text-align: center;
}

.contact-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card h3 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 25px;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 0 auto;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.contact-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 15px;
    padding: 8px 14px;
}

.contact-link:hover {
    color: #6366f1;
}

/* Footer */
footer {
    background-color: white;
    color: #333;
    padding: 20px 0;
    text-align: center;
}

footer a {
    color: #333;
    text-decoration: none;
    margin: 0 10px;
    font-size: 13px;
    line-height: 1.5;
}

footer p {
    display: inline-block;
    margin: 0 10px;
    font-size: 13px;
    line-height: 1.5;
}

.runtime {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

/* Responsive Design */
/* 公告弹窗样式 */
.announcement-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.announcement-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: fit-content;
    min-width: 280px;
    max-width: 90%;
    position: relative;
    animation: scaleIn 0.3s ease;
    overflow: hidden;
}

.announcement-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
}

.announcement-close:hover {
    transform: scale(1.1);
}

.announcement-close img {
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.announcement-content {
    padding: 25px 20px;
    width: 100%;
    box-sizing: border-box;
}

.announcement-content h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.announcement-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 隐藏公告弹窗的类 */
.announcement-popup.hidden {
    display: none;
}

@media (max-width: 768px) {
    .header {
        padding: 60px 0;
    }

    .name {
        font-size: 2em;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        justify-content: center;
        gap: 15px;
        padding: 0 10px;
    }

    .announcement {
        max-width: calc(100% - 40px);
        padding: 8px 16px;
        margin: 0 auto;
    }

    .announcement p {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .announcement-card {
        width: fit-content;
        min-width: 280px;
        max-width: 95%;
    }
    
    .announcement-content {
        padding: 20px 15px;
    }
}