/* Utluk 全局样式 — RTL / 维语字体 / 底栏 */
@font-face {
  font-family: "UyghurUI";
  src: url("../fonts/alkatip-tor-tom.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "UyghurUINazuk";
  src: url("../fonts/izbol-nazuk.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-primary: #c10d17;
  --c-accent: #e91e63;
  --c-bg: #fafafa;
  --c-bg-soft: #fff5f7;
  --c-text: #111111;
  --c-muted: #888888;
  --c-border: #eeeeee;
  --radius-poster: 10px;
  --radius-card: 14px;
  --radius-pill: 25px;
  --nav-h: 56px;
  --page-pad: 12px;
  --max-w: 480px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  -webkit-text-size-adjust: 100%;
}

body {
  direction: rtl;
  font-family: "UyghurUI", "UyghurUINazuk", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.5;
  min-height: 100vh;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

.page {
  min-height: 100vh;
}

.page-pad {
  padding: var(--page-pad);
}

/* ========== 搜索框 ========== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--c-accent);
  border-radius: var(--radius-pill);
  background: #fff;
}

.search-bar .ri-search-line {
  color: var(--c-accent);
  font-size: 18px;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  text-align: right;
  font-size: 14px;
  color: var(--c-text);
}

.search-bar input::placeholder {
  color: #b0b0b0;
}

.search-bar-wrap {
  padding: 10px var(--page-pad) 8px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ========== 分区标题 ========== */
.section-title {
  font-size: 16px;
  font-weight: bold;
  text-align: right;
  padding: 14px var(--page-pad) 10px;
  color: var(--c-text);
}

/* ========== 3 列海报网格 ========== */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
  padding: 0 var(--page-pad) 18px;
}

.poster-card {
  display: block;
}

.poster-card .cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-poster);
  overflow: hidden;
  background: #f2f2f2;
}

.poster-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-card .cover .cover-empty {
  width: 100%;
  height: 100%;
  background: #e8e8e8;
}

.poster-card .cover .badge {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}

.poster-card .title {
  margin-top: 6px;
  font-size: 12px;
  text-align: right;
  color: var(--c-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 2px;
}

/* ========== 横向滚动海报 ========== */
.h-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--page-pad) 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.h-scroll::-webkit-scrollbar {
  display: none;
}

.h-scroll .poster-card {
  flex: 0 0 100px;
  width: 100px;
}

/* ========== 空态 ========== */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--c-muted);
  font-size: 14px;
}

/* ========== 底部导航 ========== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--c-border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #777;
  font-size: 11px;
  transition: color 0.15s ease;
}

.tabbar a i {
  font-size: 22px;
  line-height: 1;
}

.tabbar a.active {
  color: var(--c-accent);
}

.tabbar.play-tabbar a {
  color: #555;
}

.tabbar.play-tabbar a i {
  font-size: 20px;
}

/* ========== 通用按钮 ========== */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
}

.btn-primary i {
  font-size: 18px;
}

/* ========== 加载 ========== */
.loading-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-wrap img {
  width: 36px;
  height: 36px;
}

/* ========== 页面专用占位骨架 ========== */
.skeleton-banner {
  margin: 8px var(--page-pad);
  height: 160px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0f0f0, #fafafa, #f0f0f0);
  background-size: 200% 100%;
}

.page-placeholder {
  padding: 40px var(--page-pad);
  text-align: center;
  color: var(--c-muted);
  font-size: 13px;
}

/* ========== 开发者声明 ========== */
.dev-footer {
  margin: 16px var(--page-pad) 24px;
  padding: 14px 12px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  text-align: center;
  color: #666;
  font-size: 12px;
  line-height: 1.7;
}

.dev-footer .brand {
  font-size: 14px;
  font-weight: bold;
  color: var(--c-primary);
  margin-bottom: 6px;
}

.dev-footer .contacts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
  color: #333;
}

.dev-footer .contacts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dev-footer .contacts i {
  color: var(--c-primary);
  font-size: 14px;
}

.dev-footer .notice {
  color: #888;
  font-size: 11px;
}
