body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, #005688 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #DC143C 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, #004570 0%, transparent 50%),
        radial-gradient(circle at 100% 50%, #E4002B 0%, transparent 50%),
        radial-gradient(circle at 10% 10%, #DC143C 0%, transparent 50%),
        linear-gradient(135deg, #005688 0%, #DC143C 100%);
    background-size: 200% 200%;
    z-index: -1;
    overflow: hidden;
    animation: gradientFlow 20s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 20% 30%, 80% 20%, 20% 80%, 100% 50%, 10% 10%, 50% 50%;
    }
    20% {
        background-position: 70% 10%, 15% 85%, 90% 10%, 5% 90%, 95% 5%, 30% 70%;
    }
    40% {
        background-position: 90% 80%, 10% 50%, 85% 15%, 40% 20%, 20% 95%, 60% 20%;
    }
    60% {
        background-position: 30% 60%, 90% 90%, 20% 10%, 70% 90%, 85% 85%, 80% 80%;
    }
    80% {
        background-position: 50% 90%, 95% 30%, 15% 60%, 20% 30%, 80% 15%, 40% 40%;
    }
    100% {
        background-position: 20% 30%, 80% 20%, 20% 80%, 100% 50%, 10% 10%, 50% 50%;
    }
}

.geometric-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.3);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    bottom: -80px;
    right: -80px;
    animation-delay: 7s;
    animation-duration: 25s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.25);
    top: 50%;
    right: 10%;
    animation: float 18s infinite ease-in-out;
    animation-delay: 3s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.2);
    top: 20%;
    left: 15%;
    animation: rotate-float 22s infinite ease-in-out;
    animation-delay: 1s;
}

.shape-5 {
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.18);
    bottom: 20%;
    left: 8%;
    animation: pulse 16s infinite ease-in-out;
    animation-delay: 5s;
}

.shape-6 {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.22);
    top: 10%;
    right: 30%;
    animation: float 20s infinite ease-in-out;
    animation-delay: 8s;
}

.geometric-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    opacity: 0.12;
}

.tri-1 {
    border-width: 0 75px 130px 75px;
    border-color: transparent transparent rgba(255, 255, 255, 0.3) transparent;
    top: 60%;
    left: 35%;
    animation: spin-slow 30s linear infinite;
}

.tri-2 {
    border-width: 0 60px 104px 60px;
    border-color: transparent transparent rgba(255, 255, 255, 0.25) transparent;
    bottom: 30%;
    right: 20%;
    animation: spin-reverse 25s linear infinite;
}

.geometric-square {
    position: absolute;
    opacity: 0.1;
    border-radius: 10px;
}

.sq-1 {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    top: 30%;
    right: 15%;
    animation: rotate-float 28s infinite ease-in-out;
    animation-delay: 2s;
}

.sq-2 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.25);
    bottom: 15%;
    left: 30%;
    animation: float-diagonal 24s infinite ease-in-out;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

@keyframes rotate-float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(40px, -60px) rotate(120deg);
    }
    66% {
        transform: translate(-40px, 40px) rotate(240deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.18;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.25;
    }
}

@keyframes spin-slow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes float-diagonal {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-60px, -60px) rotate(180deg);
    }
}

.content {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    perspective: 1500px;
    width: 100%;
}

.card-flip {
    position: relative;
    width: 100%;
    max-width: 700px;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-flip.flipped {
    transform: rotateY(180deg);
}

.project-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 40px;
    border-radius: 20px;
    max-width: 700px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    backface-visibility: hidden;
    box-sizing: border-box;
}

.card-front {
    position: relative;
    z-index: 2;
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
    z-index: 1;
    justify-content: center;
}

.project-image {
    position: absolute;
    top: -50px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.05);
}

.project-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.project-image img:hover {
    transform: scale(1.05);
}

.project-container h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 48px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-3px);
}

.social-links svg {
    width: 16px;
    height: 16px;
}

.main-divider {
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    border: none;
    margin-top: 25px;
}

.project-details {
    text-align: center;
    margin-top: 20px;
    width: 100%;
}

#project-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

#project-list li {
    cursor: pointer;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

#project-list li:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

#project-list li.active {
    color: #ffffff;
    font-weight: 600;
    position: relative;
}

#project-list li.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    position: absolute;
    bottom: -2px;
    left: 0;
}

#project-desc {
    width: 90%;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
    margin: 25px auto 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    font-weight: 400;
}

#project-desc a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
    cursor: pointer;
}

#project-desc a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

/* 卡片背面样式 */
.card-back h2 {
    margin: 40px 0 0 0;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.music-icon {
    color: #ffffff;
}

.back-content {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 2;
    text-align: center;
}

.back-content p {
    margin: 15px 0;
}

.contact-info {
    margin-top: 40px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info p {
    margin: 12px 0;
}

.back-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.back-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Footer */
.footer {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    z-index: 1;
    flex-shrink: 0;
}

.footer p {
    margin: 0;
}

/* Music Player */
.music-player {
    width: 100%;
    max-width: 350px;
    margin: 20px auto;
}

.album-cover {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    position: relative;
}

.vinyl {
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, transparent 29%, rgba(255,255,255,0.05) 29%, rgba(255,255,255,0.05) 30%, transparent 30%),
        radial-gradient(circle at 50% 50%, transparent 39%, rgba(255,255,255,0.03) 39%, rgba(255,255,255,0.03) 40%, transparent 40%),
        radial-gradient(circle at 50% 50%, transparent 49%, rgba(255,255,255,0.03) 49%, rgba(255,255,255,0.03) 50%, transparent 50%),
        radial-gradient(circle at 50% 50%, transparent 59%, rgba(255,255,255,0.03) 59%, rgba(255,255,255,0.03) 60%, transparent 60%),
        radial-gradient(circle at 50% 50%, transparent 69%, rgba(255,255,255,0.03) 69%, rgba(255,255,255,0.03) 70%, transparent 70%),
        linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    border-radius: 50%;
    position: relative;
    animation: rotate 6s linear infinite paused;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.vinyl::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
}

.vinyl::after {
    content: '';
    position: absolute;
    width: 30%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.vinyl.playing {
    animation-play-state: running;
}

.vinyl-center {
    position: absolute;
    width: 35%;
    height: 35%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

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

.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 24px;
    line-height: 24px;
}

.song-artist {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 20px;
    line-height: 20px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 35px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
}

.progress-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 10px;
    position: relative;
    left: -32px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.play-btn {
    width: 55px;
    height: 55px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.25);
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* 播放列表弹窗样式 */
.playlist-menu {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 260px;
    max-width: 90vw;
    max-height: 60vh;
    background: rgba(30, 40, 60, 0.98);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 18px 16px 12px 16px;
    z-index: 100;
    color: #fff;
    display: flex;
    flex-direction: column;
}
.playlist-menu h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    flex-shrink: 0;
}
.playlist-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(60vh - 80px);
    -webkit-overflow-scrolling: touch;
}
.playlist-menu li {
    padding: 8px 0;
    cursor: pointer;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.2s;
    text-align: left;
    user-select: none;
    -webkit-user-select: none;
}
.playlist-menu li:last-child {
    border-bottom: none;
}
.playlist-menu li:hover {
    background: rgba(255,255,255,0.08);
}
.playlist-menu .current {
    color: #ffd700;
    font-weight: 600;
}
.playlist-menu .close-btn {
    position: absolute;
    right: 12px;
    top: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.playlist-menu .close-btn:hover {
    opacity: 1;
}
