/* ==========================================
   现代高级白色主题 - 视频网站
   ========================================== */

/* 基础变量 */
:root {
    --primary-color: #1a1a2e;
    --primary-light: #16213e;
    --accent-color: #ff6b00;
    --accent-hover: #ff8c33;
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #eee;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局样式 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    background: var(--card-bg) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--accent-color) !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin: 0 0.25rem;
}

.nav-link:hover {
    color: var(--accent-color) !important;
    background: rgba(255, 107, 0, 0.08);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 46, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 容器 */
.container {
    max-width: 1400px;
}

/* 搜索框 */
.search-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.search-wrapper .form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: var(--card-bg);
    transition: var(--transition);
}

.search-wrapper .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.search-wrapper .btn-search {
    background: var(--accent-color);
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1rem 2rem;
    font-weight: 600;
    color: white;
    transition: var(--transition);
}

.search-wrapper .btn-search:hover {
    background: var(--accent-hover);
    transform: translateX(2px);
}

/* 分区标题 */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .more-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.section-title .more-link:hover {
    color: var(--accent-color);
}

/* 视频卡片 - 竖向布局 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (min-width: 576px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.875rem;
    }
}

@media (min-width: 992px) {
    .video-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1400px) {
    .video-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 1rem;
    }
}

.video-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.video-card .cover-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.video-card .cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .cover-img {
    transform: scale(1.05);
}

.video-card .vip-badge {
    display: none;
}

.video-card .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-card .play-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: var(--transition);
}

.video-card:hover .play-icon {
    transform: scale(1);
}

.video-card .play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 16px solid var(--accent-color);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

.video-card .card-info {
    padding: 0.5rem 0.625rem;
}

.video-card .card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.video-card .card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* 按钮样式 */
.btn-primary {
    background: var(--accent-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-outline-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 107, 0, 0.05);
}

/* 卡片通用样式 */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* 表单样式 */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: var(--card-bg);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

/* 认证页面样式 */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.auth-card h2 {
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.auth-card .btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-card .auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-card .auth-footer a:hover {
    text-decoration: underline;
}

/* 视频详情页 */
.movie-detail {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.movie-detail .cover-section {
    position: relative;
}

.movie-detail .movie-cover {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.movie-detail .movie-info {
    padding: 2rem;
}

.movie-detail .movie-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.movie-detail .badge-vip,
.badge-vip {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c33 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* 视频播放器 */
.player-wrapper {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.player-wrapper video {
    width: 100%;
    display: block;
}

.player-header {
    background: var(--card-bg);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* 个人中心侧边栏 */
.profile-sidebar .list-group-item {
    border: none;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
}

.profile-sidebar .list-group-item:hover {
    background: rgba(255, 107, 0, 0.08);
    color: var(--accent-color);
}

.profile-sidebar .list-group-item.active {
    background: var(--accent-color);
    color: white;
}

.profile-sidebar .list-group-item.text-danger {
    color: var(--accent-color) !important;
}

.profile-sidebar .list-group-item.text-danger:hover {
    background: rgba(255, 107, 0, 0.12);
}

/* 面包屑 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* 分页 */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-color);
}

.page-item.active .page-link {
    background: var(--accent-color);
    color: white;
}

/* 提示框 */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #e7f5ff;
    color: #0c5460;
}

/* 页脚 */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.site-footer p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
}

/* 无内容提示 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* 加载动画 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .search-wrapper {
        padding: 1.25rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .movie-detail .movie-info {
        padding: 1.25rem;
    }
    
    .movie-detail .movie-title {
        font-size: 1.35rem;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 选中文本颜色 */
::selection {
    background: rgba(255, 107, 0, 0.2);
    color: var(--text-primary);
}

/* 图片懒加载占位 */
.img-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 悬浮效果 */
.hover-lift {
    transition: var(--transition);
}

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

/* 更多按钮区域 */
.section-more {
    text-align: right;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

/* VIP提示区域 */
.vip-notice {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d4 100%);
    border-left: 4px solid var(--accent-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.vip-notice h5 {
    color: #a84e00;
    margin-bottom: 0.5rem;
}

.vip-notice p {
    color: #a84e00;
    margin: 0;
}

/* 锁定内容覆盖层 */
.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
}

.locked-overlay .lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}
