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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

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

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

/* 页脚样式 */
.footer {
    margin-top: 50px;
    background-color: #343a40;
    color: #fff;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    color: #17a2b8;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-title {
    font-weight: bold;
    margin-bottom: 8px;
}

/* 电影卡片样式 */
.movie-card {
    text-decoration: none;
    color: inherit;
}

.movie-card:hover .card-title {
    color: #0d6efd;
}

/* 悬停阴影效果 */
.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* 轮播图样式 */
.carousel-item img {
    height: 400px;
    object-fit: cover;
    filter: brightness(0.8);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
}

/* 按钮样式 */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(13, 110, 253, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(108, 117, 125, 0.3);
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* 搜索框样式 */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 分页样式 */
.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-link {
    color: #0d6efd;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: #0b5ed7;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

/* 筛选条件样式 */
.card-header h3 {
    font-size: 1.25rem;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-item img {
        height: 250px;
    }
    
    .card-img-top {
        height: 180px !important;
    }
    
    .col-md-4, .col-sm-6, .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .card-title {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .col-md-4, .col-sm-6, .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .card-img-top {
        height: 200px !important;
    }
    
    .carousel-caption {
        padding: 10px;
    }
    
    .carousel-caption h5 {
        font-size: 1rem;
    }
    
    .carousel-caption p {
        font-size: 0.75rem;
    }
}

/* 文本截断 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 嵌入视频样式 */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
}

.embed-responsive-16by9::before {
    padding-top: 56.25%;
}

.embed-responsive .embed-responsive-item, .embed-responsive embed, .embed-responsive iframe, .embed-responsive object, .embed-responsive video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(13, 110, 253, 0.3);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 标签样式 */
.badge {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 相关推荐样式 */
.d-flex .text-truncate {
    max-width: 200px;
}

/* 详情页样式 */
.card-header h3 {
    margin: 0;
}

.card-body p {
    line-height: 1.8;
}

/* 热门标签样式 */
.card-body .badge {
    display: inline-block;
    margin: 5px;
    transition: all 0.3s ease;
}

.card-body .badge:hover {
    background-color: #0d6efd;
    color: #fff;
    transform: translateY(-2px);
}