/* 搜索页样式 */
html, body {
    background-color: #000;
    color: #fff;
}

.highlight {
    color: #FF4463;
}

/* 标题样式 */
.section-title {
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0em;
    font-variation-settings: "opsz" auto;
    color: #FFFFFF;
}

/* Popular searches 样式 */
.drama-card-popular {
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.drama-card-popular:hover {
    transform: translateY(-4px);
}

.drama-poster-popular {
    width: 100%;
    aspect-ratio: 2/3;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.drama-title-popular {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.drama-category-popular {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 搜索页导航栏样式 */
nav {
    height: auto;
}

/* 搜索输入框样式优化 */
input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input[type="text"]:focus {
    background-color: rgba(26, 26, 26, 0.15) !important;
}

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

/* 搜索结果列表 - RTL适配 */
[dir="rtl"] .space-y-4 > a,
[lang="ar"] .space-y-4 > a {
    flex-direction: row-reverse;
}

/* 搜索历史标签 - RTL适配 */
[dir="rtl"] #historyList,
[lang="ar"] #historyList {
    direction: rtl;
}

/* 热门搜索网格 - RTL适配 */
[dir="rtl"] .grid,
[lang="ar"] .grid {
    direction: rtl;
}

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

/* Play按钮 - RTL适配 */
[dir="rtl"] .flex.items-center.gap-4,
[lang="ar"] .flex.items-center.gap-4 {
    flex-direction: row-reverse;
}

/* 搜索结果标题对齐 */
[dir="rtl"] h2,
[lang="ar"] h2 {
    text-align: right;
}

/* 清除按钮位置 */
[dir="rtl"] .flex.items-center.justify-between,
[lang="ar"] .flex.items-center.justify-between {
    flex-direction: row-reverse;
}
