/* 科技科普课程页面样式 */

/* 重置body默认样式，解决顶部空隙问题 */
body {
    margin: 0;
    padding: 0;
}

/* 英雄区样式 */
.hero-section {
    background: linear-gradient(135deg, #0A2463 0%, #3E92CC 100%);
    padding: 92px 0 40px;
    position: relative;
    overflow: hidden;
}

/* 解决头部与banner之间的空白问题 */
main {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 0 0 350px;
}

.hero-content {
    text-align: left;
}

.hero-features {
    display: flex;
    gap: 30px;
    margin-top: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

.feature-item svg {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.8);
}

/* 直播预约卡片 */
.live-booking-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.live-booking-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.4);
}

.live-badge svg {
    color: #ffffff;
}

.live-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
}

.live-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.live-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.live-booking-card:hover .live-thumbnail img {
    transform: scale(1.1);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ffffff;
}

.play-button svg {
    color: #3E92CC;
    width: 32px;
    height: 32px;
}

.live-info {
    margin-bottom: 25px;
}

.live-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.live-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.meta-item svg {
    color: rgba(255, 255, 255, 0.7);
}

.live-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

.live-booking-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FFD700, #FFED4E);
    color: #0A2463;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.live-booking-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
    background: #FFD700;
}

.live-booking-btn svg {
    color: #0A2463;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 课程筛选区样式 */
.filter-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 40px 0;
    border-bottom: 1px solid #e8ebff;
}

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

.filter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* 课程网格样式 */
.courses-section {
    padding: 80px 0;
    background: #ffffff;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* 课程卡片样式 */
.course-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid #f1f5f9;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
    z-index: 5;
}

.course-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.1);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.course-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    width: 30px;
    height: 30px;
    color: #3b82f6;
}

.course-category {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.course-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.course-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.course-card:hover .course-title {
    color: #3b82f6;
}

.course-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.course-card:hover .course-description {
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
}

.course-details {
    margin-bottom: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.course-card:hover .course-details {
    max-height: 300px;
    opacity: 1;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #64748b;
    animation: fadeInUp 0.3s ease-out forwards;
    opacity: 0;
}

.detail-item:nth-child(1) {
    animation-delay: 0.1s;
}

.detail-item:nth-child(2) {
    animation-delay: 0.15s;
}

.detail-item:nth-child(3) {
    animation-delay: 0.2s;
}

.detail-item:nth-child(4) {
    animation-delay: 0.25s;
}

.detail-label {
    font-weight: 600;
    margin-right: 8px;
    color: #94a3b8;
    min-width: 80px;
}

.detail-value {
    flex: 1;
    line-height: 1.4;
}

.course-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.course-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.course-btn:active {
    transform: translateY(0);
}

.course-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;
}

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

/* 分页样式 */
.pagination-section {
    padding: 40px 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.pagination-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    padding: 12px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.pagination-ellipsis {
    padding: 12px 10px;
    color: #94a3b8;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding: 30px 0 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .course-card {
        height: 480px;
    }
    
    .course-thumbnail {
        height: 200px;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .pagination-container {
        flex-wrap: wrap;
    }
    
    .hero-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .hero-left {
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-right {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 20px 0 40px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .course-info {
        padding: 20px;
    }
    
    .course-title {
        font-size: 1.1rem;
    }
}

/* 动画效果 */
@keyframes titleGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.6);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

/* 添加直播卡片动画 */
.live-booking-card {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.play-button {
    animation: pulse 2s ease-in-out infinite;
}

/* 添加加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 课程卡片悬停效果增强 */
.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* 按钮脉冲效果 */
.course-btn.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* 无障碍设计 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .course-card {
        border: 2px solid #000000;
    }
    
    .filter-btn {
        border: 2px solid #000000;
    }
}