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

html {
    background: linear-gradient(135deg, #5E3D50 0%, #3F2B36 100%);
    background-attachment: fixed;
    min-height: 100%;
}

/* 基礎樣式 */
body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #5E3D50 0%, #3F2B36 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    min-height: 100vh;
    min-width: 100vw;
}

/* 導航樣式 */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2c3e50;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3498db;
}

/* 下拉選單 */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: #555;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

/* 主要內容 */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* 頁尾 */
.main-footer {
    background: rgba(44, 62, 80, 0.95);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

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

/* 手機版導航切換按鈕 */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-toggle:hover {
    color: #3498db;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav-container {
        height: 60px;
        padding: 0 20px;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        margin-top: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0 1rem;
        min-width: auto;
        margin-top: 0.5rem;
    }
    
    .dropdown-menu a {
        padding: 0.3rem 0;
        font-size: 0.9rem;
        color: #666;
    }
}

/* 通用按鈕樣式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* 工具提示 */
.tooltip {
    position: absolute;
    background: rgba(44, 62, 80, 0.95);
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.hidden {
    display: none;
}