* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    background-color: #000;
    color: #fff;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 保持3列 */
    gap: 1rem;
    margin-top: 1.5rem;
    max-width: 1200px; /* 增加最大宽度 */
    margin-left: auto;
    margin-right: auto;
    /* 移除 aspect-ratio 属性，让网格自然扩展 */
}

.product-card {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* 防止内容溢出 */
    /* 不再强制卡片为正方形，让它根据内容自然扩展 */
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.price {
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.description {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    /* 限制描述文字行数 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #2980b9;
}

.product-detail {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.error-page {
    text-align: center;
    padding: 3rem 0;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

/* 添加视频缩略图样式 */
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 保持16:9的宽高比 */
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration {
    bottom: 5px;
    right: 5px;
    color: white;
    padding: 2px 5px;
    border-radius: 2px;
    font-size: 0.8rem;
}

/* 视频播放页样式 */
.video-player-container {
    width: 100%;
    margin-bottom: 1rem;
    background-color: #000; /* 播放器背景色 */
}

.video-info {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

/* 视频信息标题 */
.video-info h2 {
    color: #000;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* 视频描述 */
.video-info .description {
    color: #666;
    line-height: 1.6;
}

/* 视频页面样式 */
.video-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.breadcrumb > span {
    color: #333;
    font-weight: 500;
}

/* 视频容器 - 固定水平布局 */
.video-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 2rem;
    width: 100%;
}

/* 主视频区域 - 固定宽度比例 */
.main-video {
    flex: 7; /* 占据70%的空间 */
    min-width: 0;
}

/* 视频播放器容器 */
.video-player-container {
    width: 100%;
    margin-bottom: 1rem;
    background-color: #000; /* 播放器背景色 */
}

/* 视频列表区域 - 固定宽度比例 */
.episodes-list {
    flex: 3; /* 占据30%的空间 */
    min-width: 250px;
    max-width: 300px;
    background: #222;
    color: #fff;
    padding: 1rem;
    border-radius: 5px;
    overflow-y: auto;
    max-height: 600px;
}

.episodes-tabs {
    display: flex;
    margin: 1rem 0;
    border-bottom: 1px solid #444;
}

.episodes-tabs a {
    padding: 0.5rem 1rem;
    color: #ccc;
    text-decoration: none;
}

.episodes-tabs a.active {
    color: #fff;
    border-bottom: 2px solid #e74c3c;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.episode-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

.episode-item.active {
    background: #e74c3c;
}

.episode-item:hover {
    background: #444;
}

.episode-item.active:hover {
    background: #c0392b;
}

/* 媒体查询 - 确保在较小屏幕上仍然保持水平布局 */
@media (max-width: 992px) {
    .main-video {
        flex: 6; /* 在中等屏幕上调整比例 */
    }

    .episodes-list {
        flex: 4;
    }
}

/* 只有在非常小的屏幕上才改为垂直布局 */
@media (max-width: 800px) {
    .video-container {
        flex-direction: column;
    }

    .main-video, .episodes-list {
        width: 100%;
        max-width: 100%;
    }

    .episodes-list {
        margin-top: 1rem;
        max-height: 400px;
    }
}

/* 修改轮播图样式，使其显示多个幻灯片 */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
    padding: 0 50px; /* 添加左右内边距，为左右两侧的幻灯片留出空间 */
}

.carousel-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 80%; /* 主幻灯片占据80%宽度 */
    margin: 0 10px; /* 幻灯片之间的间距 */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

/* 视频部分样式 */
.video-section {
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.section-controls {
    right: 20px;
    top: 0;
}

.section-button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin-left: 5px;
}

.video-row {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #666 #333;
}

/* 隐藏滚动条但保持功能 */
.video-row::-webkit-scrollbar {
    height: 5px;
}

.video-row::-webkit-scrollbar-track {
    background: #333;
}

.video-row::-webkit-scrollbar-thumb {
    background: #666;
}

.video-card {
    flex: 0 0 auto;
    width: 200px;
    margin-bottom: 15px;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 5px;
}

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

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

.video-title {
    font-size: 14px;
    margin: 8px 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 视频卡片链接样式 */
.video-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-slide a {
    text-decoration: none;
    color: white;
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* 确保轮播图中的链接不会改变图片和文字的布局 */
.carousel-slide a:hover {
    text-decoration: none;
}

/* 添加鼠标悬停效果 */
.video-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.category-section {
}

.category-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
}

.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.video-description {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

/* Home Page Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    padding: 40px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.02"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.03"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.03"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FF4463 0%, #FF6B8A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #ccc;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Search Section */
.search-section {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 50px;
    padding: 16px 60px 16px 24px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #FF4463;
    box-shadow: 0 0 0 4px rgba(255, 68, 99, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-icon:hover {
    color: #FF4463;
}

/* Category Tabs */
.category-section {
    background: #000;
    padding: 0;
    height: 36px;
    display: flex;
    align-items: center;
    position: relative;
}

.category-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 9px;
    align-items: center;
    height: 100%;
    width: calc(100% - 60px);
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 5px 12px;
    color: #FFFFFF;
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0;
    white-space: nowrap;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    flex-shrink: 0;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: fit-content;
    text-decoration: none;
}

.category-tab.active {
    color: #330D15;
    background: #330D15;
}

.category-tab.active .category-name {
    font-size: 12px;
    font-weight: normal;
    line-height: normal;
    letter-spacing: 0.4px;
    font-variation-settings: "opsz" auto;
    color: #FF4463;
}

.category-tab:hover:not(.active) {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.15);
}

.category-dropdown {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.category-dropdown:hover {
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.category-dropdown i {
    color: #FFFFFF;
}

/* Filter Modal */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.filter-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 80vh;
    background: #171717;
    border-radius: 8px 8px 0 0;
    box-shadow: 0px 0px 10px 0px #000000;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.filter-header {
    position: relative;
    padding: 19px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.filter-close {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.filter-title {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    color: #FFFFFF;
    margin: 0;
}

.filter-body {
    padding: 20px 14px;
}

.filter-section {
    margin-bottom: 32px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 21px;
    color: #FFFFFF;
    margin: 0 0 12px 0;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 30px;
    white-space: nowrap;
    text-decoration: none;
}

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    color: #FFFFFF;
}

.filter-tag-active {
    background: rgba(255, 68, 99, 0.2) !important;
    color: #FF4463 !important;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
    border-radius: 8px !important;
}

.filter-tag-active:hover {
    background: rgba(255, 68, 99, 0.3) !important;
}

/* Content Section */
.content-section {
    padding: 10px 16px 32px 16px;
    background: #000;
}

.drama-grid {
    margin-bottom: 40px;
}

/* First 12 cards - 3 columns on mobile, show 9 cards (3 rows) */
.drama-grid-first {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    justify-items: center;
}

/* Hide cards 10-12 on mobile (show only first 9) */
.drama-grid-first .drama-card:nth-child(n+10) {
    display: none;
}

/* Remaining cards - 2 columns on mobile, more on larger screens */
.drama-grid-remaining {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-items: center;
}

/* Tablet and larger screens (639-1024px) - show all 12 cards in 4 columns (3 rows) */
@media (min-width: 639px) and (max-width: 1024px) {
    .drama-grid-first {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        max-width: none;
        margin: 0 0 20px 0;
        justify-items: stretch;
    }

    /* Show all 12 cards */
    .drama-grid-first .drama-card:nth-child(n+10) {
        display: block;
    }

    .drama-grid-remaining {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        justify-items: stretch;
    }

    /* Hide first 3 cards in remaining to avoid duplication */
    .drama-grid-remaining .drama-card:nth-child(1),
    .drama-grid-remaining .drama-card:nth-child(2),
    .drama-grid-remaining .drama-card:nth-child(3) {
        display: none;
    }
}

/* Desktop screens - 2 rows x 6 columns (12 cards total) */
@media (min-width: 1025px) {
    .drama-grid-first {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
        margin-bottom: 20px;
    }

    /* Show all 12 cards on desktop */
    .drama-grid-first .drama-card:nth-child(n+10) {
        display: block;
    }

    .drama-grid-remaining {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 24px;
    }

    /* Hide first 3 cards in remaining to avoid duplication */
    .drama-grid-remaining .drama-card:nth-child(1),
    .drama-grid-remaining .drama-card:nth-child(2),
    .drama-grid-remaining .drama-card:nth-child(3) {
        display: none;
    }
}


/* Fine-tune typography for different screen sizes */
@media (min-width: 640px) {
    .drama-title {
        font-size: 12px;
        margin-top: 6px;
    }

    .drama-category {
        font-size: 11px;
    }
}

@media (min-width: 1024px) {
    .drama-title {
        font-size: 13px;
        margin-top: 8px;
    }

    .drama-category {
        font-size: 12px;
    }
}

.drama-card {
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.drama-card:hover {
    opacity: 0.8;
    text-decoration: none;
    color: inherit;
}

.drama-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 110/154;
    overflow: hidden;
    border-radius: 10px;
}

.drama-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.drama-title {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.3;
    letter-spacing: 0%;
    margin-top: 8px;
    margin-bottom: 2px;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drama-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.drama-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.drama-category {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(9px, 2vw, 11px);
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.4;
    letter-spacing: 0%;
    opacity: 0.44;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
}

.load-more-container {
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}

.load-more-btn {
    background: transparent;
    border: 2px solid #333;
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.load-more-btn:hover {
    border-color: #FF4463;
    color: #FF4463;
    background: rgba(255, 68, 99, 0.1);
    transform: translateY(-2px);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #FF4463;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 16px 16px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.search-suggestion {
    padding: 16px 24px;
    color: #ccc;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #333;
    font-size: 15px;
}

.search-suggestion:hover {
    background: #333;
    color: #fff;
}

.search-suggestion:last-child {
    border-bottom: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 16px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #444;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #888;
}

.empty-state p {
    font-size: 16px;
    color: #666;
}

/* 滚动加载指示器样式 */
.scroll-load-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    margin: 8px 0;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #FF4463;
    border-radius: 50%;
    animation: spin 1.2s ease-in-out infinite;
    margin-right: 10px;
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.error-text {
    color: #FF4463;
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.load-complete-indicator {
    text-align: center;
    padding: 8px 0;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.2px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-input {
        padding: 14px 50px 14px 20px;
        font-size: 15px;
    }

    .category-tab {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 16px;
    }

    .drama-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .scroll-load-indicator {
        padding: 6px 0;
        margin: 6px 0;
    }

    .loading-spinner {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }

    .loading-text, .error-text {
        font-size: 13px;
    }

    .load-complete-indicator {
        padding: 6px 0;
        margin: 6px 0;
        font-size: 13px;
    }
}

/* ==================== RTL（阿拉伯语）适配 ====================*/
[dir="rtl"] body,
[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

/* 分类标签 - RTL适配 */
[dir="rtl"] .category-tabs,
[lang="ar"] .category-tabs {
    flex-direction: row-reverse;
    padding: 5px 9px 5px 60px; /* 左侧留空间给下拉按钮 */
}

[dir="rtl"] .category-dropdown,
[lang="ar"] .category-dropdown {
    right: auto;
    left: 0; /* 下拉按钮移到左侧 */
}

/* 导航 - RTL适配 */
[dir="rtl"] nav ul li,
[lang="ar"] nav ul li {
    margin-left: 0;
    margin-right: 1rem;
}

/* 剧集网格保持从右到左 */
[dir="rtl"] .drama-grid-first,
[lang="ar"] .drama-grid-first,
[dir="rtl"] .drama-grid-remaining,
[lang="ar"] .drama-grid-remaining {
    direction: rtl;
}

/* 文本对齐 - RTL */
[dir="rtl"] .drama-title,
[lang="ar"] .drama-title,
[dir="rtl"] .drama-category,
[lang="ar"] .drama-category {
    text-align: right;
}

/* 加载指示器 - RTL适配 */
[dir="rtl"] .loading-spinner,
[lang="ar"] .loading-spinner {
    margin-right: 0;
    margin-left: 10px;
}

/* 筛选弹窗 - RTL适配 */
[dir="rtl"] .filter-content,
[lang="ar"] .filter-content {
    right: auto;
    left: 0;
}

[dir="rtl"] .filter-header,
[lang="ar"] .filter-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .filter-close,
[lang="ar"] .filter-close {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .filter-tags,
[lang="ar"] .filter-tags {
    flex-direction: row-reverse;
}

/* Icon翻转 - 某些图标需要在RTL下翻转 */
[dir="rtl"] .fa-chevron-left::before,
[lang="ar"] .fa-chevron-left::before {
    content: "\f054"; /* chevron-right */
}

[dir="rtl"] .fa-chevron-right::before,
[lang="ar"] .fa-chevron-right::before {
    content: "\f053"; /* chevron-left */
}

/* 面包屑导航 - RTL适配 */
[dir="rtl"] .breadcrumb,
[lang="ar"] .breadcrumb {
    direction: rtl;
}

/* 视频列表 - RTL适配 */
[dir="rtl"] .episodes-list,
[lang="ar"] .episodes-list {
    direction: rtl;
}

[dir="rtl"] .episodes-grid,
[lang="ar"] .episodes-grid {
    direction: rtl;
}

/* 时长标签位置 - RTL */
[dir="rtl"] .duration,
[lang="ar"] .duration {
    right: auto;
    left: 5px;
}

/* 响应式RTL适配 */
@media (min-width: 639px) and (max-width: 1024px) {
    [dir="rtl"] .category-tabs,
    [lang="ar"] .category-tabs {
        padding: 5px 69px 5px 9px;
    }
}

@media (min-width: 1025px) {
    [dir="rtl"] .category-tabs,
    [lang="ar"] .category-tabs {
        padding: 5px 69px 5px 9px;
    }
}
