/* 短剧网站样式 - 基于Bootstrap */

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --accent-color: #4ecdc4;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 顶部工具栏样式 */
.top-toolbar {
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-toolbar .navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
}

.search-box .form-control {
    border-radius: 25px 0 0 25px;
    border-right: none;
}

.search-box .btn {
    border-radius: 0 25px 25px 0;
    border-left: none;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.dropdown-toggle::after {
    margin-left: 0.5em;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* 主要内容区域 */
.display-4 {
    font-weight: 300;
    color: var(--dark-color);
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--secondary-color);
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* 动态消息样式 */
#dynamic-message {
    display: none;
    font-style: italic;
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

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

/* 页脚样式 */
footer {
    margin-top: auto;
}

footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* 语言切换下拉菜单 */
.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item.active {
    background-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
    }
}

/* 页面加载动画 */
body {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* 短剧卡片样式 */
.playlet-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.playlet-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.playlet-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlet-card:hover .card-overlay {
    opacity: 1;
}

.play-count {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

.episode-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 无图片卡片样式 */
.card-no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
    height: 200px;
}

.playlet-card:hover .card-no-image {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
}

.playlet-tags .badge {
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlet-tags .badge:hover {
    transform: scale(1.1);
}

.actor-link {
    cursor: pointer;
    transition: color 0.2s ease;
}

.actor-link:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

.playlet-meta {
    font-size: 0.85rem;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* 详情页样式 */
.playlet-info .row {
    border-bottom: 1px solid #f0f0f0;
    padding: 0.5rem 0;
}

.playlet-info .row:last-child {
    border-bottom: none;
}

.download-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.download-section .input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 页面标题样式 */
h2 {
    font-weight: 600;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #adb5bd;
}

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

.loading .spinner-border {
    color: var(--primary-color);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .top-toolbar .col-md-3,
    .top-toolbar .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .card-img-wrapper {
        height: 250px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .playlet-meta {
        font-size: 0.8rem;
    }
    
    .download-section {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .card-img-wrapper {
        height: 200px;
    }
    
    .top-toolbar {
        padding: 1rem 0;
    }
    
    .search-box .form-control {
        font-size: 0.9rem;
    }
}

/* 主题色彩覆盖Bootstrap默认样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #ff5252;
    border-color: #ff5252;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* 标签和演员链接样式 */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Footer样式优化 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* 分页样式 */
.pagination {
    margin: 2rem 0;
}

.pagination .page-link {
    color: #0d6efd;
    border-color: #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-link i {
    font-size: 0.875rem;
}

/* 页面信息样式 */
#page-info-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #0d6efd;
}

#page-info-container .text-muted {
    font-size: 0.9rem;
    margin: 0;
}

/* 加载动画增强 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 移动端分页响应式 */
@media (max-width: 768px) {
    .pagination {
        margin: 1.5rem 0;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .pagination .pagination-lg .page-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    #page-info-container {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    #page-info-container .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .pagination .page-link i {
        font-size: 0.75rem;
    }
}
