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

body {
    font-family: 'Microsoft JhengHei', 'Noto Sans TC', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #3F7C85 0%, #00CCBF 100%);
    min-height: 100vh;
}

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

.header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5em;
    color: #3F7C85;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2em;
    color: #747E7E;
    margin-bottom: 20px;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 12px 25px;
    background: #747E7E;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-tab:hover {
    background: #3F7C85;
    transform: translateY(-2px);
}

.nav-tab.active {
    background: #FF5F5D;
    box-shadow: 0 4px 15px rgba(255, 95, 93, 0.3);
}

.content-section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}
.item-content h4{
    font-size: 20px;
    margin-top: 10px;
}
.item-content ul {
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}
.item-content p a:link, .item-content p a:visited {
    margin-left: 2px;
    margin-right: 2px;
    color: #00CCBF;
}
.item-content p a:hover {
    color: #747E7E; 
}
.item-content .source-note {
    margin-top:  10px;
    background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
    padding: 10px 20px;
    border-radius: 3px;
}
.item-content .source-note ul {
    padding-left: 30px;
    padding-bottom: 15px;
}
.item-content .source-note ul li a:link,
.item-content .source-note ul li a:visited {
    color: #000;
    text-decoration: none;

}
.item-content .source-note ul li a:hover {
    color: #00CCBF;
}

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

.section-title {
    font-size: 2em;
    color: #3F7C85;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #FF5F5D;
    font-weight: 600;
}

.item-container {
    margin-bottom: 20px;
}

.item-header {
    background: #3F7C85;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.item-header:hover {
    background: #00CCBF;
    transform: translateX(5px);
}

.item-header h3 {
    font-size: 1.2em;
    margin: 0;
}

.toggle-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.item-header.active .toggle-icon {
    transform: rotate(180deg);
}

.item-content {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e9ecef;
    line-height: 1.8;
}

.item-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}
.item-content img,
.outline-episode img {
    margin-top: 10px;
    margin-bottom: 10px;
    background: #fff;
    max-width: 800px;
    width: 100%;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.source-link {
    color: #00CCBF;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.source-link:hover {
    border-bottom-color: #00CCBF;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.video-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.video-card h4 {
    color: #3F7C85;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.video-card p {
    color: #747E7E;
    margin-bottom: 15px;
}

.video-link {
    display: inline-block;
    background: #FF5F5D;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.video-link:hover {
    background: #00CCBF;
    transform: translateY(-2px);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.book-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.book-title {
    color: #3F7C85;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.book-author {
    color: #747E7E;
    margin-bottom: 10px;
    font-style: italic;
}

.book-publisher {
    color: #95a5a6;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.book-description {
    color: #34495e;
    line-height: 1.6;
}

.highlight {
    background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

/* 將書籍區塊的標題改為較輕的顏色 */
#books h3 {
    color: #72F2EB !important;
    margin: 30px 0 20px 0;
}

.outline-toggle-btn {
    display: inline-block;
    background: linear-gradient(135deg, #3F7C85 0%, #00CCBF 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(63, 124, 133, 0.3);
    position: relative;
    overflow: hidden;
}

.outline-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00CCBF 0%, #72F2EB 100%);
    transition: left 0.3s ease;
    z-index: 0;
}

.outline-toggle-btn:hover::before {
    left: 0;
}

.outline-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 204, 191, 0.4);
}

.outline-toggle-btn.active {
    background: linear-gradient(135deg, #FF5F5D 0%, #FF8A80 100%);
    box-shadow: 0 4px 15px rgba(255, 95, 93, 0.4);
}

.outline-toggle-btn.active::before {
    background: linear-gradient(135deg, #FF8A80 0%, #FFCDD2 100%);
}

.video-outline {
    margin: 10px;
}

.video-outline h5{
    font-size: 20px;
    color: #00CCBF;;
    padding: 10px 0px;
}
.video-outline  h6 {
    font-size: 22px;
    pading: 15px 0px;
}
.video-outline ul {
    padding:  5px 20px;
    margin-bottom: 15px;
}
.video-outline ul li a:link,
.video-outline ul li a:visited {
    color: #000;
    text-decoration: none;
}

/* 確保按鈕文字在最上層 */
.outline-toggle-btn span,
.outline-toggle-btn {
    position: relative;
    z-index: 1;
}

/* 時間碼連結樣式 */
.outline-episode a {
    color: #FF5F5D;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
    padding: 2px 6px;
    background: rgba(255, 95, 93, 0.1);
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.outline-episode a:hover {
    background: #FF5F5D;
    color: white;
    text-decoration: none;
}




@media (max-width: 768px) {

    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 200px;
        text-align: center;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .book-grid {
        grid-template-columns: 1fr;
    }

    /* 讓時間碼連結在手機上更容易點擊 */

    .outline-episode a {
        padding: 4px 8px;
        margin-left: 8px;
        font-size: 0.85em;
    }

}