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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px;
}

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

/* 標題樣式 */
header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
}

h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

#subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    font-weight: 300;
}

hr {
    border: none;
    height: 1px;
    background-color: #dee2e6;
    margin: 20px 0;
}

/* 導航按鈕樣式 */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(108, 92, 231, 0.2);
    min-width: 120px;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 92, 231, 0.3);
    background: linear-gradient(135deg, #5b4fdb, #8a7df9);
}

.nav-button:active {
    transform: translateY(0);
}

.nav-button.active {
    background: linear-gradient(135deg, #00b894, #00cec9);
    box-shadow: 0 4px 6px rgba(0, 184, 148, 0.2);
}

/* 語言切換器 */
.language-switcher {
    margin: 30px 0;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.language-button {
    padding: 10px 20px;
    background-color: #0984e3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.language-button:hover {
    background-color: #0770c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(9, 132, 227, 0.3);
}

/* 內容區域 */
.content-section {
    margin-top: 30px;
    min-height: 300px;
}

/* 首頁歡迎卡片 */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.welcome-card p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

/* 文件列表樣式 */
.file-section {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.file-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.file-title {
    color: #2d3436;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dfe6e9;
}

/* 表格樣式 */
.file-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.file-table th {
    background-color: #f1f2f6;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3436;
    border-bottom: 2px solid #dfe6e9;
}

.file-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dfe6e9;
    vertical-align: middle;
}

.file-table tr:hover {
    background-color: #f8f9fa;
}

.download-link {
    color: #0984e3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.download-link:hover {
    color: #0770c4;
    text-decoration: underline;
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.update-date {
    color: #636e72;
    font-size: 0.9rem;
}

/* 設置頁面樣式 */
.settings-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.setting-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-item h3 {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.setting-item p {
    color: #636e72;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 響應式設計 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #subtitle {
        font-size: 1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .nav-button {
        width: 100%;
        max-width: 200px;
    }
    
    .welcome-card {
        padding: 30px 20px;
    }
    
    .welcome-card h2 {
        font-size: 1.8rem;
    }
    
    .welcome-card p {
        font-size: 1rem;
    }
    
    .file-table {
        display: block;
        overflow-x: auto;
    }
    
    .settings-card {
        padding: 20px;
    }
    
    .language-switcher {
        padding: 15px;
    }
}

/* 容器可見性 - 確保與 index.html 一致 */
#home-container,
#files-container,
#settings-container {
    display: none;
}

#home-container.visible,
#files-container.visible,
#settings-container.visible {
    display: block;
}
