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

/* 自訂滾輪樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #e0e6ed;
    background: linear-gradient(135deg, #0f0f23 0%, #16213e 50%, #1a1a2e 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #dbaee8, #b4cfed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: all 0.3s;
}

.logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #e0e6ed;
    transition: all 0.3s;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.nav-links a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}
.nav-links a.active {
    color: #7c90e5;
    background: rgba(116, 137, 228, 0.1);
    box-shadow: 0 0 20px rgba(116, 137, 228, 0.3);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #e0e6ed;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

main {
    margin-top: 90px;
    min-height: calc(100vh - 160px);
    padding: 2rem 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 主頁布局 */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 84px;
}

/* 主頁英雄區 */
.hero-section {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 3rem;
    margin: -1rem -1rem 3rem -1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    z-index: -1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #dbaee8, #b4cfed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    color: #b8c5d1;
}

/* 浮動個人卡片 */
.profile-card {
    background: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 110px;
    transition: all 0.3s;
    margin-top: 80px;
}

/* .profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 50px rgba(102, 126, 234, 0.2);
} */

.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}


@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.profile-name {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e0e6ed;
    margin-bottom: 0.5rem;
}

.profile-title {
    text-align: center;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.profile-bio {
    font-size: 0.9rem;
    color: #b8c5d1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(55, 65, 108, 0.5); /* 半透明的深藍色背景 */
    color: #e6f0ff; /* 淺藍色文字 */
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(132, 149, 199, 0.7); /* 半透明的淺藍邊框 */
    backdrop-filter: blur(8px); /* 增加較強的毛玻璃效果 */
    font-size: 0.8rem;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    
    background: rgba(55, 65, 108, 0.4);
    color: #e6f0ff;
    border: 1px solid rgba(132, 149, 199, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(55, 65, 108, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.social-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 30px rgba(55, 65, 108, 0.4);
    background: rgba(55, 65, 108, 0.6);
}

/* 專案區塊 */
.projects-section {
    margin: 3rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.project-card {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 25px rgba(0,0,0,0.3);
    transition: all 0.3s;
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transition: left 0.5s;
}

/* .project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
} */

.project-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.status-active {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.status-completed {
    background: rgba(52, 152, 219, 0.2);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.status-inactive {
    background: rgba(149, 165, 166, 0.2);
    color: #7f8c8d;
    border: 1px solid rgba(149, 165, 166, 0.4);
}

/* 部落格卡片 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.blog-card {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0,0,0,0.3);
    transition: all 0.3s;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 50px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h3 {
    margin-bottom: 0.5rem;
    color: #e0e6ed;
    font-size: 1.2rem;
}

.blog-meta {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s;
}

.read-more:hover::after {
    transform: translateX(5px);
}

.read-more:hover {
    color: #764ba2;
}

/* 畫廊區塊 */
.gallery-section {
    margin: 3rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.gallery-item {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0,0,0,0.3);
    transition: all 0.3s;
    border: 1px solid rgba(102, 126, 234, 0.2);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.3);
}

.gallery-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8c5d1;
    font-size: 1rem;
}

.gallery-info {
    padding: 1rem;
}

.gallery-info h4 {
    color: #e0e6ed;
    margin-bottom: 0.5rem;
}

.gallery-info p {
    color: #b8c5d1;
    font-size: 0.9rem;
}

/* 遊戲區塊 */
.games-section {
    margin: 3rem 0;
}

.game-category {
    margin: 2rem 0;
}

.game-category h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.game-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    
    background: rgba(102, 126, 234, 0.1);
    color: #8c73ff;
    border: 1px solid rgba(132, 149, 199, 0.4);
    backdrop-filter: blur(10px);
    
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.game-tag:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-3px) scale(1.02);
    color: #6a4bff;
}

/* 其他頁面樣式 */
.page-content {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 84px;
}

.article {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    line-height: 1.8;
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 84px;
}

.article h1 {
    color: #e0e6ed;
    margin-bottom: 0.5rem;
}

.article h2 {
    color: #667eea;
    margin: 2rem 0 1rem 0;
}

.article-meta {
    color: #667eea;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
}

.back-btn {
    display: inline-block;
    margin-bottom: 2rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.2);
    margin-left: 85%;
    margin-top: 48px;
}

.back-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: translateX(-5px);
}

/* 聯絡頁面 */
.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-card {
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0,0,0,0.3);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.3);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;

    background: transparent;
    border: 2px solid #aeb8c3;
    color: #626a76;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}


footer {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(10px);
    color: #b8c5d1;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.section-title {
    color: #e0e6ed;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    color: #667eea;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 15, 35, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 25px rgba(0,0,0,0.4);
        border-top: 1px solid rgba(102, 126, 234, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .home-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-card {
        position: static;
        order: -1;
    }

    .hero-title {
        font-size: 2rem;
    }

    .projects-grid,
    .blog-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .contact-options {
        grid-template-columns: 1fr;
    }
}

/* --- 關於我區塊樣式 (新版，融入暗色主題) --- */
.info-section h3 {
    color: #667eea; /* 使用網站的強調色 */
    font-size: 1.3rem;
    margin: 2.5rem 0 1.5rem 0; /* 設定標題的上下間距 */
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2); /* 使用網站統一的邊框顏色 */
}

/* 區塊內的段落和歌曲列表 */
.info-section p,
.info-section .song-list {
    color: #b8c5d1; /* 使用網站的次要文字顏色，更柔和 */
    line-height: 1.7;
    font-size: 16px;
}

.info-section .song-list {
    list-style-type: disc;
    padding-left: 20px; /* 讓列表標記往內縮 */
}


/* --- 聯絡資訊清單樣式 (新版，融入暗色主題) --- */

.contact-list {
    list-style: none; /* 移除清單預設的圓點 */
    padding-left: 0;
    margin-top: 1.5rem;
}

.contact-list li {
    margin-bottom: 8px; /* 每個聯絡項目之間的間距 */
}

.contact-list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #e0e6ed; /* 使用網站的主要文字顏色 */
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent; /* 預留邊框位置，避免 hover 時跳動 */
}

/* 滑鼠懸停在連結上時的樣式，參考網站其他元件的 hover 效果 */
.contact-list a:hover {
    background: rgba(102, 126, 234, 0.15); /* 使用網站統一的 hover 背景色 */
    color: #fff; /* 文字變更亮 */
    transform: translateX(5px); /* 增加微小的位移互動感 */
    border-color: rgba(102, 126, 234, 0.3);
}

.contact-list .icon {
    font-size: 20px;
    width: 35px;
    text-align: center;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.contact-list a:hover .icon {
    transform: scale(1.1); /* hover 時圖示稍微放大 */
}

/* 為不同平台的圖示加上品牌顏色 (這部分沿用，效果很好) */
.contact-list a[href*="mailto:"] .icon         { color: #D44638; }
.contact-list .fa-discord                     { color: #5865F2; }
.contact-list .fa-github                      { color: #ffffff; } /* 在暗色背景下，GitHub 圖示用白色更清晰 */
.contact-list .fa-x-twitter                   { color: #ffffff; } /* X Logo 用白色更適合 */
.contact-list .fa-threads                     { color: #ffffff; } /* Threads Logo 也是白色較佳 */
.contact-list .fa-instagram                   { color: #E4405F; }
.contact-list .fa-facebook                    { color: #1877F2; }
.contact-list .fa-patreon                     { color: #ffffff; }
.contact-list .fa-youtube                     { color: #FF0000; }

/* 全屏圖片檢視器 */
.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.fullscreen-viewer.active {
    display: flex;
}

.fullscreen-viewer img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-viewer {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-viewer:hover {
    transform: scale(1.2);
    color: #667eea;
}

/* 為畫廊項目加入互動效果 */
.gallery-item {
    cursor: zoom-in;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.3);
}

/* 確保圖片在畫廊中的顯示正確 */
.gallery-placeholder img {
    transition: transform 0.3s ease;
}

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