/* 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    scroll-behavior: smooth;
}

/* 导航栏 */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 按钮样式 */
.btn-primary {
    @apply bg-primary text-white px-6 py-3 rounded-lg font-medium hover:bg-secondary transition-colors;
}

.btn-secondary {
    @apply bg-white text-primary border border-primary px-6 py-3 rounded-lg font-medium hover:bg-gray-100 transition-colors;
}

/* 卡片样式 */
.card {
    @apply bg-gray-800 rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow;
}

/* 标题样式 */
.section-title {
    @apply text-2xl font-bold text-white mb-4;
}

.section-subtitle {
    @apply text-gray-400 mt-4 max-w-2xl mx-auto;
}

/* 分割线 */
.section-divider {
    @apply w-20 h-1 bg-primary mx-auto;
}

/* 图标背景 */
.icon-bg {
    @apply w-16 h-16 rounded-full flex items-center justify-center mb-4;
}

/* 表单样式 */
.form-input {
    @apply w-full px-4 py-3 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary bg-gray-800 text-white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        @apply text-xl;
    }
    
    .btn-primary,
    .btn-secondary {
        @apply px-4 py-2;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1F2937;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #1E40AF;
}

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

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

/* 悬停效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* 文本截断 */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 背景渐变 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
}

/* 阴影效果 */
.shadow-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-card-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 文本阴影 */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 间距工具类 */
.mt-12 {
    margin-top: 3rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* 响应式工具类 */
@media (max-width: 640px) {
    .sm:text-center {
        text-align: center;
    }
    
    .sm:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .md:text-center {
        text-align: center;
    }
    
    .md:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {
    .lg:text-center {
        text-align: center;
    }
    
    .lg:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

/* 剧集卡片样式 */
.movie-card {
    transition: all 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 分类卡片样式 */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 导航栏激活状态 */
.nav-active {
    @apply text-primary font-medium;
}

/* 标签样式 */
.tag {
    @apply px-2 py-1 rounded text-xs font-medium;
}

.tag-primary {
    @apply bg-primary text-white;
}

.tag-secondary {
    @apply bg-secondary text-white;
}

.tag-accent {
    @apply bg-accent text-dark;
}

/* 搜索框样式 */
.search-input {
    @apply bg-gray-800 text-white px-4 py-2 rounded-full focus:outline-none focus:ring-2 focus:ring-primary w-48 md:w-64;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* 评分星星样式 */
.stars {
    color: #F59E0B;
}

/* 加载更多按钮 */
.load-more {
    @apply bg-gray-800 text-white px-6 py-3 rounded-lg font-medium hover:bg-gray-700 transition-colors w-full text-center;
}

/* 分页样式 */
.pagination {
    @apply flex justify-center space-x-2 mt-8;
}

.pagination button {
    @apply bg-gray-800 text-white px-4 py-2 rounded-lg hover:bg-primary transition-colors;
}

.pagination button.active {
    @apply bg-primary;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1F2937;
    border-radius: 8px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* 视频播放器样式 */
.video-player {
    @apply w-full aspect-video bg-black rounded-lg overflow-hidden;
}

/* 评论样式 */
.comment {
    @apply bg-gray-800 rounded-lg p-4 mb-4;
}

.comment-author {
    @apply font-semibold text-white;
}

.comment-content {
    @apply text-gray-400 mt-2;
}

.comment-time {
    @apply text-gray-500 text-xs mt-2;
}

/* 排行榜样式 */
.ranking-item {
    @apply flex items-center p-4 border-b border-gray-800 hover:bg-gray-700 transition-colors;
}

.ranking-number {
    @apply text-accent font-bold text-xl mr-4;
}

.ranking-title {
    @apply text-white font-medium;
}

.ranking-score {
    @apply text-gray-400 ml-auto;
}