/* 影片頁面樣式 */

.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 150px 0 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/about-bg.jpg') no-repeat;
    background-size: cover;
    background-position: bottom;
    opacity: 0.5;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-breadcrumb {
    font-size: 15px;
    opacity: 0.8;
}

.hero-breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.hero-breadcrumb a:hover {
    opacity: 1;
}

/* 主體內容區域 */
.main-container {
    padding: 0;
}

.featured-section,
.latest-section,
.category-section,
.subscribe-section {
    padding: 50px 0;
}

.subscribe-section {
    margin-top: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 影片網格 */
.video-grid {
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.video-grid:not(.small) {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.video-grid.small {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* 影片卡片 */
.video-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

/* 影片縮略圖 */
.video-thumbnail {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgb(70, 91, 185) 0%, #02345a 100%);
    background: #4d4b4b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

.video-thumbnail.small {
    height: 200px;
}

/* 播放按鈕 */
.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.play-button.small {
    width: 60px;
    height: 60px;
}

.play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.play-icon {
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.play-button.small .play-icon {
    border-left: 15px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 3px;
}

/* 影片內容 */
.video-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.video-description {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.video-duration,
.video-date {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

.latest-section .video-content{
    padding: 20px;
}

.latest-section .video-title{
    font-size: 20px;
    margin: 0;
    margin-bottom: 10px;
}

/* 影片按鈕 */
.video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.video-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.video-btn:hover::before {
    left: 100%;
}

.video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: var(--white);
}

/* 分類網格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 分類卡片 */
.category-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card:nth-child(1) .category-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.category-card:nth-child(2) .category-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.category-card:nth-child(3) .category-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.category-card:nth-child(4) .category-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-description {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 25px;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: var(--white);
}

/* 訂閱區域 */
.subscribe-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.subscribe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.subscribe-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.subscribe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.subscribe-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.subscribe-description {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 25px;
}

.subscribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.subscribe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.subscribe-btn:hover::before {
    left: 100%;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: var(--white);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .video-grid:not(.small) {
        grid-template-columns: 1fr;
    }

    .video-grid.small {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .subscribe-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 16px;
    }

    .featured-section,
    .latest-section,
    .category-section,
    .subscribe-section {
        padding: 60px 0;
    }

    .video-content {
        padding: 25px;
    }

    .category-card {
        padding: 30px 15px;
    }

    .subscribe-card {
        padding: 30px;
    }

    .video-thumbnail {
        height: 200px;
    }

    .video-thumbnail.small {
        height: 150px;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button.small {
        width: 50px;
        height: 50px;
    }

    .play-icon {
        border-left: 15px solid white;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        margin-left: 3px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .section-header{
        margin-bottom: 30px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 100px 0 80px;
    }

    .hero-title {
        font-size: 28px;
    }

    .featured-section,
    .latest-section,
    .category-section,
    .subscribe-section {
        padding: 30px 0;
    }

    .video-content {
        padding: 15px;
    }

    .video-title{
        font-size: 19px;
        line-height: 1.2;
    }

    .video-description{
        font-size: 15px;
        margin-bottom: 5px;
    }

    .category-card {
        padding: 25px 15px;
    }

    .subscribe-card {
        padding: 25px;
    }

    .video-thumbnail {
        height: 180px;
    }

    .video-thumbnail.small {
        height: 180px;
    }

    .play-button {
        width: 50px;
        height: 50px;
    }

    .play-button.small {
        width: 40px;
        height: 40px;
    }

    .play-icon {
        border-left: 12px solid white;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        margin-left: 2px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* 視頻錯誤狀態樣式 */
.video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
}

.video-error::before {
    content: '⚠️';
    font-size: 48px;
    margin-bottom: 15px;
}

.video-error a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.video-error a:hover {
    background: var(--primary-color);
    color: white;
}

/* 備用播放按鈕樣式 */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgb(39, 54, 124) 0%, #02345a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.video-fallback .play-button {
    margin-bottom: 15px;
}

.video-error-message {
    font-size: 14px;
    opacity: 0.9;
    max-width: 200px;
}

.video-error-message p {
    margin: 0;
    line-height: 1.4;
}

/* 視頻模態框樣式 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.video-modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.video-modal-close {
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.video-modal-close:hover {
    color: #333;
}

.video-modal-body {
    padding: 30px;
}

.video-player {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .video-modal-content {
        margin: 10px;
        max-height: 95vh;
    }

    .video-modal-header {
        padding: 15px 20px;
    }

    .video-modal-body {
        padding: 20px;
    }

    .video-modal-header h3{
        font-size: 18px;
        line-height: 25px;
    }
}


.wechat-qrcode {
    text-align: center;
    padding: 20px;
}

.wechat-qrcode img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.wechat-qrcode p {
    color: #666;
    font-size: 14px;
}

.layui-layer{
    top: 26% !important;
}