/* 分類按鈕樣式 */
.video-category-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(3, 169, 244, 0.1) 100%);
    border-radius: inherit;
    z-index: -1;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}

.category-btn:hover::before {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(3, 169, 244, 0.2) 100%);
}

.category-btn.active {
    background: linear-gradient(135deg, #2196F3 0%, #03A9F4 100%);
    color: white;
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.category-btn.active::before {
    display: none;
}

.category-btn.active i {
    color: white;
    transform: scale(1.1);
}

.category-btn.active span {
    font-weight: 600;
}

.category-btn i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.category-btn span {
    transition: all 0.3s ease;
}

/* 視頻內容容器 */
.video-content-container {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.video-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.video-content.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

/* 系列介紹樣式 */
.series-intro {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.series-intro h4 {
    color: #333;
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.series-intro p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}


/* 登入提示樣式 */
.login-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.notice-content i {
    font-size: 2rem;
    color: #ffc107;
    margin-bottom: 1rem;
    display: block;
}

.notice-content h4 {
    color: #856404;
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.notice-content p {
    color: #856404;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.login-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.login-btn:hover {
    background: linear-gradient(135deg, #ff8f00 0%, #ff6f00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 143, 0, 0.3);
}

/* 科目分類樣式 */
.subject-category {
    margin-bottom: 3rem;
}

.subject-category .category-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
    display: block;
}

.subject-category .category-header h4 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.subject-category .category-header p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* 科目網格 */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 科目卡片 */
.subject-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* 核心科目樣式 */
.core-subjects .subject-card::before {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.core-subjects .subject-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

/* 選修科目樣式 */
.elective-subjects .subject-card::before {
    background: linear-gradient(90deg, #2196F3, #03A9F4);
}

.elective-subjects .subject-card:hover {
    border-color: #2196F3;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
}

/* 增潤項目樣式 */
.enhancement-subjects .subject-card::before {
    background: linear-gradient(90deg, #FF9800, #FF5722);
}

.enhancement-subjects .subject-card:hover {
    border-color: #FF9800;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.2);
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-card:hover {
    transform: translateY(-4px);
}

.subject-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.subject-card h5 {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.subject-card p {
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.4;
    font-size: 0.9rem;
}

.subject-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.core-badge {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.elective-badge {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
}

.enhancement-badge {
    background: linear-gradient(135deg, #FF9800, #FF5722);
}

.subject-card .file-count {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* 功能網格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

/* 資料庫內容 */
.database-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

.database-info {
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.database-info h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.database-info ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.database-info li {
    padding: 0.4rem 0;
    color: #666;
    position: relative;
    padding-left: 1.2rem;
    font-size: 14px;
}

.database-info li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #333;
    font-weight: bold;
}

.database-visual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.visual-card {
    background: white;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.visual-card:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* 雲端內容 */
.cloud-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

.cloud-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cloud-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cloud-item:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cloud-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
}

.cloud-text h4 {
    margin-bottom: 0.3rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.cloud-text p {
    color: #666;
    font-size: 13px;
}

.cloud-action {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

/* 快速入口 */
.quick-access {
    background-color: #f8f9fa;
    color: #333;
    padding: 60px 0;
    border-top: 2px solid #e0e0e0;
}

.quick-access h3 {
    color: #333;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
    display: inline-block;
    width: 100%;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.access-card {
    background: white;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.access-card:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.access-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.access-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.access-card p {
    color: #666;
    font-size: 14px;
}

/* 頁腳 */
footer {
    background: #333;
    color: white;
    padding: 40px 0;
    text-align: center;
    border-top: 2px solid #e0e0e0;
}

footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
    font-size: 14px;
}

/* 響應式設計 */
.menu {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.menu:hover {
    color: #2196F3;
    transform: scale(1.1);
}

/* 手機菜單樣式 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(3, 169, 244, 0.1) 100%);
}

.mobile-menu-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    color: #2196F3;
    transform: scale(1.1);
}

.mobile-menu-nav {
    padding: 1rem 0;
}

.mobile-menu-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-menu-nav a:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(3, 169, 244, 0.1) 100%);
    color: #2196F3;
    border-left-color: #2196F3;
    transform: translateX(5px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width: 768px) {
    /* 導航欄手機優化 */
    .header-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .quick-links-section {
        order: 2;
        width: 100%;
        max-width: none;
    }
    
    .quick-links-items {
        justify-content: center;
        gap: 6px;
    }
    
    .quick-link {
        font-size: 11px;
        padding: 5px 8px;
    }
    
    .main-nav {
        order: 3;
        display: none;
    }
    
    .header-actions {
        order: 4;
        display: none;
    }
    
.menu {
        order: 5;
        display: block;
    }
    
    /* 主要內容調整 */
    main {
        padding-top: 100px; /* 調整手機端高度 */
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
    flex-direction: column;
        align-items: center;
    }
    
    .feature-section h3 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header-container {
        padding: 0 15px;
    }

    /* 頻道區域手機優化 */
    #channel {
        padding: 2rem 0;
    }

    #channel h3 {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    /* 頻道信息手機優化 */
    .channel-info {
        margin: 0 1rem;
        padding: 1.5rem;
        backdrop-filter: blur(15px);
    }

    .channel-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .channel-logo {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }

    .channel-title h4 {
        font-size: 1.5rem;
    }

    .channel-stats {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .channel-stats span {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 10px 15px;
        backdrop-filter: blur(15px);
    }

    /* 分類按鈕手機優化 */
    .video-category-buttons {
        flex-direction: column;
        gap: 0.8rem;
        margin: 1.5rem 0;
    }

    .category-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 15px 20px;
        backdrop-filter: blur(15px);
        font-size: 14px;
    }

    /* 視頻內容手機優化 */
    .video-content-container {
        min-height: auto;
    }

    .video-category {
        margin: 1rem;
        padding: 1.5rem;
        backdrop-filter: blur(15px);
    }

    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .category-header h4 {
        font-size: 1.2rem;
    }

    .video-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .video-item {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
        backdrop-filter: blur(15px);
    }

    .video-thumbnail {
        width: 100px;
        height: 60px;
        margin: 0 auto 1rem;
    }

    .video-details {
        width: 100%;
    }

    .video-details h5 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .video-details p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }

    .video-duration {
        margin-top: 0.5rem;
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* 系列介紹手機優化 */
    .series-intro {
        margin: 1rem;
        padding: 1.5rem;
        backdrop-filter: blur(15px);
    }

    .series-intro h4 {
        font-size: 1.2rem;
        text-align: center;
    }

    .series-intro p {
        font-size: 0.9rem;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .feature-section {
        padding: 40px 0;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .quick-access {
        padding: 40px 0;
    }
    
    .database-info,
    .cloud-item {
        padding: 1rem;
    }

    /* 頻道區域小屏幕優化 */
    #channel h3 {
        font-size: 1.3rem;
    }

    .channel-info {
        margin: 0 0.5rem;
        padding: 1rem;
    }

    .channel-logo {
        width: 50px;
        height: 50px;
    }

    .channel-title h4 {
        font-size: 1.3rem;
    }

    .channel-stats span {
        max-width: 150px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .category-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .video-category {
        margin: 0.5rem;
        padding: 1rem;
    }

    .category-header h4 {
        font-size: 1.1rem;
    }

    .video-item {
        padding: 1rem;
    }

    .video-thumbnail {
        width: 80px;
        height: 50px;
    }

    .video-details h5 {
        font-size: 0.85rem;
        line-height: 1.1;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .video-details p {
        font-size: 0.8rem;
    }

    .video-duration {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    .series-intro {
        margin: 0.5rem;
        padding: 1rem;
    }

    .series-intro h4 {
        font-size: 1.1rem;
    }

    .series-intro p {
        font-size: 0.85rem;
}
}