/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e0e0;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 主要個人資料區域 */
.profile-section {
    margin-bottom: 60px;
    text-align: center;
}

.profile-content {
    background: rgba(30, 42, 70, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10; /* 確保個人資料區域有適當的層級 */
}

.profile-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

/* 頭像樣式 */
.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
    animation: glow 2s ease-in-out infinite alternate;
}

.avatar-container:hover .avatar-glow {
    opacity: 0.3;
}

@keyframes glow {
    from {
        transform: scale(0.9);
    }
    to {
        transform: scale(1.1);
    }
}

/* 個人信息 */
.profile-info {
    color: #e0e0e0;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #64b5f6, #42a5f5, #1e88e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-penguin {
    font-size: 1.2rem;
    color: #b0bec5;
    margin-bottom: 30px;
    font-weight: 400;
    opacity: 0.8;
}

.profile-subtitle {
    font-size: 1.1rem;
    color: #b0bec5;
    margin-bottom: 40px;
    font-weight: 300;
}

/* 社交媒體連結 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 5; /* 降低z-index讓圖片可以覆蓋 */
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
    min-width: 120px;
    justify-content: center;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.social-link.osu {
    color: #ff66aa;
    border-color: #ff66aa;
}

.social-link.osu:hover {
    background: #ff66aa;
    color: white;
}

.social-link.instagram {
    color: #e4405f;
    border-color: #e4405f;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-link.discord {
    color: #5865f2;
    border-color: #5865f2;
}

.social-link.discord:hover {
    background: #5865f2;
    color: white;
}

.social-link.steam {
    color: #66c0f4;
    border-color: #66c0f4;
}

.social-link.steam:hover {
    background: #66c0f4;
    color: white;
}

.social-link.spotify {
    color: #1db954;
    border-color: #1db954;
}

.social-link.spotify:hover {
    background: #1db954;
    color: white;
}

/* 相片展示區 */
.gallery-section {
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
    position: relative;
    z-index: 20; /* 提高z-index確保圖片可以覆蓋社群媒體連結 */
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #e0e0e0;
    margin-bottom: 30px;
    font-weight: 600;
}

.gallery-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    flex-wrap: nowrap;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    flex: 1;
    max-width: 280px;
    min-width: 200px;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}



/* 底部區域 */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 20px;
    position: relative;
    z-index: 10;
}

.visit-counter {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #b0bec5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.visit-counter i {
    font-size: 16px;
}



/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .profile-content {
        padding: 40px 30px;
    }
    
    .profile-name {
        font-size: 2rem;
    }
    
    .profile-penguin {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: 200px;
    }
    
    .gallery-grid {
        flex-direction: column;
        align-items: center;
        padding: 0;
        max-width: none;
    }
    
    .gallery-item {
        width: 100%;
        max-width: 400px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .profile-content {
        padding: 30px 20px;
    }
    
    .avatar {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.8rem;
    }
    
    .profile-penguin {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
}

/* 圖片查看器樣式 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.lightbox-image:hover {
    filter: brightness(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 2001;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* 響應式圖片查看器 */
@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 10px 15px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 1.2rem;
        padding: 10px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-counter {
        bottom: 15px;
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}

/* 簡單音量控制（左上角） */
.volume-control-top {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1000;
    color: white;
    transition: all 0.3s ease;
}

.volume-control-top:hover {
    background: rgba(0, 0, 0, 0.8);
}

.volume-control-top i {
    font-size: 16px;
    color: white;
    min-width: 16px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.music-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

/* 響應式音量控制 */
@media (max-width: 768px) {
    .volume-control-top {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .music-name {
        font-size: 11px;
    }
}