/* 财务实操培训视频网站 - 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: bold;
    color: #fff !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    transform: translateY(-1px);
}

/* 主内容区域 */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* 视频卡片样式 */
.video-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    background: #000;
    height: 200px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    transition: all 0.3s ease;
}

.video-card:hover .video-play-overlay {
    background: rgba(103, 126, 234, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.video-duration {
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
}

/* 分类导航 */
.category-nav {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-nav h5 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.category-item {
    display: inline-block;
    margin: 0.3rem 0.5rem 0.3rem 0;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-item:hover,
.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* 搜索框 */
.search-box {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 视频播放器 */
.video-player-container {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.video-player {
    width: 100%;
    height: auto;
    max-height: 70vh;
}

.video-details {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.video-details h1 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.video-stats {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.video-stats span {
    margin-right: 1.5rem;
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer h5 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

/* 分页样式 */
.pagination .page-link {
    border: none;
    color: #667eea;
    font-weight: 500;
    margin: 0 0.2rem;
    border-radius: 5px;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.pagination .page-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .video-card {
        margin-bottom: 1.5rem;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .category-nav,
    .search-box {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .category-item {
        margin: 0.2rem 0.3rem 0.2rem 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .video-details {
        padding: 1.5rem;
    }
    
    .video-details h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .video-thumbnail {
        height: 160px;
    }
    
    .video-play-overlay {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .search-input,
    .search-btn {
        border-radius: 20px;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .video-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .video-stats span {
        margin-bottom: 0.5rem;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 管理后台样式 */
.admin-sidebar {
    background: #343a40;
    min-height: 100vh;
    padding: 1rem 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin: 0.2rem 1rem;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: #495057;
    color: #fff;
}

.admin-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.upload-text {
    color: #6c757d;
    font-size: 1.1rem;
}

/* 进度条 */
.progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* 提示信息 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
} 