/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Arabic', sans-serif;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d1b69 100%);
    color: white;
    min-height: 100vh;
}

/* 电影统计样式 */
.movie-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #a855f7;
}

.stat-label {
    font-size: 0.75rem;
    color: #d1d5db;
    margin-top: 0.25rem;
}

/* 电影网格样式 */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.movie-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    overflow: hidden;
    background: #374151;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.3);
}

.movie-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(168, 85, 247, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.movie-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-info-overlay {
    opacity: 1;
}

.quick-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(168, 85, 247, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.movie-card:hover .quick-play-btn {
    opacity: 1;
}

/* 分类按钮样式 */
.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.category-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.custom-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-all { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.icon-movie { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.icon-series { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.icon-new { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

/* 模态框样式 */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* 动画效果 */
.smooth-transition {
    transition: all 0.3s ease;
}

.card-appear {
    animation: cardAppear 0.5s ease-out;
}

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

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

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

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 轮播图样式 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-indicator.active {
    background: white !important;
}

/* 底部导航栏 */
.bottom-nav {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.nav-item {
    flex-direction: column;
    padding: 0.5rem;
    border-radius: 0.5rem;
    flex: 1;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

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

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    background: #a855f7;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top:hover {
    background: #9333ea;
    transform: translateY(-2px);
}

/* 加载动画 */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

.player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.player-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* 播放器控制 */
.player-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.player-btn-primary {
    background: #a855f7;
    color: white;
}

.player-btn-primary:hover {
    background: #9333ea;
}

.player-btn-secondary {
    background: #374151;
    color: white;
    border: 1px solid #4b5563;
}

.player-btn-secondary:hover {
    background: #4b5563;
}

/* 滚动条隐藏 */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* 浮动按钮效果 */
.floating-btn {
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 搜索栏样式 */
.search-bar::placeholder {
    color: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .movie-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .carousel-container {
        height: 35vh !important;
    }
}

@media (max-width: 480px) {
    .movie-stats {
        grid-template-columns: 1fr;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
}