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

:root {
    --primary-color: #ff006e;
    --secondary-color: #00d9ff;
    --youtube-color: #ff0000;
    --github-color: #fff;
    --bilibili-color: #00d9ff;
    --discord-color: #8b5cf6;
    --minecraft-color: #10b981;
    --blog-color: #ff6b35;
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --neon-pink: #ff006e;
    --neon-blue: #00d9ff;
    --neon-purple: #8b5cf6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    overflow-y: scroll;
}

body.intro-active {
    overflow: hidden;
}

/* 開場畫面 */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    perspective: 1500px;
    pointer-events: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.intro-bg-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: patternMove 20s linear infinite;
    z-index: 1;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.intro-content {
    text-align: center;
    z-index: 10001;
    animation: gentleFade 2s ease-in-out infinite;
}

@keyframes gentleFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.intro-text {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: lowercase;
    font-family: 'Segoe UI', sans-serif;
}

.intro-left,
.intro-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.7));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

.intro-left {
    left: 0;
    transform-origin: left center;
    border-right: 3px solid rgba(255, 0, 110, 0.6);
    box-shadow: 
        inset -80px 0 120px rgba(255, 0, 110, 0.25),
        0 0 50px rgba(255, 0, 110, 0.4);
    background: linear-gradient(to right, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.6));
    transform: translateZ(0);
}

.intro-right {
    right: 0;
    transform-origin: right center;
    border-left: 3px solid rgba(0, 217, 255, 0.6);
    box-shadow: 
        inset 80px 0 120px rgba(0, 217, 255, 0.25),
        0 0 50px rgba(0, 217, 255, 0.4);
    background: linear-gradient(to left, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.6));
    transform: translateZ(0);
}

.intro-screen.tear .intro-left {
    transform: translateX(-60%) rotateY(65deg) scale(1.05) translateZ(0);
    box-shadow: 
        30px 0 150px rgba(255, 0, 110, 0.8),
        inset -100px 0 150px rgba(255, 0, 110, 0.3);
}

.intro-screen.tear .intro-right {
    transform: translateX(60%) rotateY(-65deg) scale(1.05) translateZ(0);
    box-shadow: 
        -30px 0 150px rgba(0, 217, 255, 0.8),
        inset 100px 0 150px rgba(0, 217, 255, 0.3);
}

.intro-screen.tear .intro-content {
    opacity: 0;
    transform: scale(1.3);
    transition: all 0.5s ease;
}

.intro-screen.tear .intro-bg-pattern {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.intro-screen.tear {
    pointer-events: none;
}

.intro-screen.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 下雪效果 */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 1s ease;
}

.snow-container.active {
    opacity: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1em;
    user-select: none;
    pointer-events: none;
    animation: snowfall linear infinite;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    filter: blur(0.5px);
}

@keyframes snowfall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        filter: blur(0px);
    }
    50% {
        transform: translateY(50vh) translateX(40px) rotate(180deg);
        filter: blur(1px);
    }
    100% {
        transform: translateY(100vh) translateX(80px) rotate(360deg);
        filter: blur(0.5px);
    }
}

/* 背景效果 - 東京夜景風格 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 0, 110, 0.6), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(0, 217, 255, 0.6), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(139, 92, 246, 0.6), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 0, 110, 0.4), transparent),
        radial-gradient(2px 2px at 90px 10px, rgba(0, 217, 255, 0.4), transparent);
    background-size: 200px 200px;
    animation: twinkle 5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.15), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.15), transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.1), transparent 50%);
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 毛玻璃效果 - 黑色東京風格 */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 0, 110, 0.05);
    transition: all 0.3s ease;
}

.glass-effect:hover {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 
        0 10px 35px 0 rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* 音樂播放器 */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 25px;
    border-radius: 20px;
    width: 380px;
    z-index: 1000;
    animation: floatIn 1s ease 1.5s both;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.player-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 0, 110, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.control-btn:hover::before {
    width: 100%;
    height: 100%;
}

.control-btn:hover {
    background: rgba(255, 0, 110, 0.2);
    border-color: var(--neon-pink);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn i {
    position: relative;
    z-index: 1;
}

#playPauseBtn {
    width: 60px;
    height: 60px;
    font-size: 22px;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.3), rgba(0, 217, 255, 0.3));
    border: 2px solid rgba(255, 0, 110, 0.5);
}

#playPauseBtn:hover {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.5), rgba(0, 217, 255, 0.5));
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.6);
}

.track-info {
    margin-bottom: 15px;
}

.track-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.progress-bar:hover {
    background: rgba(255, 255, 255, 0.15);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

.volume-control i {
    font-size: 18px;
    color: var(--neon-pink);
    filter: drop-shadow(0 0 5px rgba(255, 0, 110, 0.6));
    transition: all 0.3s ease;
}

.volume-control i:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(255, 0, 110, 1));
}

#volumeSlider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
    transition: all 0.3s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 0, 110, 1);
}

#volumeSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

#volumeSlider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 0, 110, 1);
}


/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    padding-top: 80px;
}

/* 個人資訊卡片 */
.profile-card {
    text-align: center;
    padding: 50px 40px 40px;
    border-radius: 30px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.avatar-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid transparent;
    border-top-color: var(--neon-pink);
    border-right-color: var(--neon-blue);
    border-radius: 50%;
    animation: rotate 8s linear infinite;
    box-shadow: 
        0 0 20px rgba(255, 0, 110, 0.5),
        0 0 40px rgba(0, 217, 255, 0.3);
}

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

.name {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 0, 110, 0.5));
}

.bio {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text-primary);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.2);
}

.location-tag:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 0, 110, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 0, 110, 0.2);
}

.location-tag i {
    font-size: 18px;
    color: var(--neon-pink);
    filter: drop-shadow(0 0 5px rgba(255, 0, 110, 0.8));
}

.description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 社交媒體連結 */
.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.social-card {
    display: flex;
    align-items: center;
    padding: 25px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
    animation-fill-mode: both;
}

.social-card:nth-child(1) { animation-delay: 0.1s; }
.social-card:nth-child(2) { animation-delay: 0.2s; }
.social-card:nth-child(3) { animation-delay: 0.3s; }
.social-card:nth-child(4) { animation-delay: 0.4s; }
.social-card:nth-child(5) { animation-delay: 0.5s; }
.social-card:nth-child(6) { animation-delay: 0.6s; }

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-card.youtube::before {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.3), transparent);
}

.social-card.github::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
}

.social-card.bilibili::before {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), transparent);
}

.social-card.discord::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), transparent);
}

.social-card.minecraft::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), transparent);
}

.social-card.blog::before {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), transparent);
}

.social-card:hover::before {
    opacity: 0.6;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.social-card:hover .icon-wrapper {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

.youtube .icon-wrapper { color: var(--youtube-color); }
.github .icon-wrapper { color: var(--github-color); }
.bilibili .icon-wrapper { color: var(--bilibili-color); }
.discord .icon-wrapper { color: var(--discord-color); }
.minecraft .icon-wrapper { color: var(--minecraft-color); }
.blog .icon-wrapper { color: var(--blog-color); }

.social-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.social-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.social-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.arrow {
    font-size: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.social-card:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 技能區塊 */
.skills-section {
    padding: 35px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.6s;
    animation-fill-mode: both;
}

.skills-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-tag {
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* 頁腳 */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer i {
    color: #ff6b6b;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .music-player {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        padding: 20px;
    }
    
    #playPauseBtn {
        width: 55px;
        height: 55px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
    }

    .container {
        padding-top: 40px;
        padding-bottom: 180px;
    }

    .profile-card {
        padding: 40px 20px;
    }

    .name {
        font-size: 32px;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .skills-section {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 14px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .intro-text {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .avatar {
        width: 120px;
        height: 120px;
    }

    .name {
        font-size: 28px;
    }

    .bio {
        font-size: 16px;
    }

    .social-card {
        padding: 20px;
    }

    .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
