/* ===== uyxj_web 主题样式（复刻 m.uyxj.cn）===== */
:root {
    --bg-primary: #0f0f14;
    --bg-secondary: #16161d;
    --bg-card: #1c1c25;
    --bg-hover: #23232e;
    --text-primary: #f0f0f5;
    --text-secondary: #b8b8c4;
    --text-muted: #777784;
    --accent: #E91E63;
    --gold: #FFD700;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'UKIJ Ekran', 'Noto Sans Arabic', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app-container { display: flex; min-height: 100vh; }
.desktop-main { flex: 1; min-width: 0; }

/* ===== 底部导航（移动端）===== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; z-index: 9999;
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
}
.bottom-nav.float-nav {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(360px, calc(100% - 32px));
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03) 25%, rgba(10,10,15,0.32) 55%, rgba(10,10,15,0.38));
    border-top: none; border-radius: 20px; margin-bottom: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25), 0 8px 48px rgba(0,0,0,0.15);
    border: 0.5px solid rgba(255,255,255,0.18);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 8px 0; color: var(--text-muted); font-size: 11px; gap: 4px;
    cursor: pointer; transition: color 0.2s; background: none; border: none; font-family: inherit;
}
.nav-item.active { color: var(--accent); }
.nav-item svg { width: 22px; height: 22px; fill: currentColor; }

/* ===== 页面 Tab ===== */
.tab-page { display: none; padding-bottom: 80px; }
.tab-page.active { display: block; }
.content { padding-bottom: 100px; }

/* ===== 首页头部 ===== */
.home-header { padding: 16px 16px 0; display: flex; align-items: center; justify-content: space-between; }
.home-logo {
    font-size: 22px; font-weight: bold;
    background: linear-gradient(135deg, var(--gold), var(--accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.theme-toggle {
    width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.06); color: var(--text-secondary); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== 搜索栏 ===== */
.search-bar {
    margin: 14px 16px; display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border-radius: 24px; padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.06);
}
.search-bar svg { width: 18px; height: 18px; fill: var(--text-muted); flex-shrink: 0; }
.search-bar input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-size: 14px; font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
    background: var(--accent); border: none; color: #fff; border-radius: 16px;
    padding: 6px 16px; font-size: 13px; font-family: inherit; cursor: pointer;
}

/* ===== Banner 轮播（孔雀尾扇形）===== */
.banner-section { margin: 0 0 16px; padding: 12px 0 0; }
.banner-carousel { position: relative; width: 100%; overflow: hidden; }
.banner-track { position: relative; width: 100%; height: 230px; margin: 0 auto; }
.banner-card {
    position: absolute; top: 50%; transition: all 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
    cursor: pointer; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5); transform-origin: center center;
    background: var(--bg-secondary);
}
.banner-card.active { box-shadow: 0 8px 30px rgba(233,30,99,0.4); }
.banner-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.banner-card .banner-info {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 8px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9)); pointer-events: none;
}
.banner-card .banner-title {
    font-size: 11px; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.banner-card.active .banner-title { font-size: 15px; }
.banner-indicators { display: flex; justify-content: center; gap: 5px; padding: 8px 0 2px; }
.banner-indicators .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.3s; cursor: pointer; }
.banner-indicators .dot.active { width: 18px; border-radius: 3px; background: var(--accent); }

/* ===== 区块标题 ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 12px; }
.section-title { font-size: 17px; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); display: inline-block; }
.section-more { font-size: 13px; color: var(--text-muted); }

/* ===== 电影网格 ===== */
.movies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px; }
.movie-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); transition: transform 0.2s; }
.movie-card:active { transform: scale(0.96); }
.movie-card .poster { position: relative; aspect-ratio: 2/3; background: var(--bg-secondary); overflow: hidden; }
.movie-card .poster img { width: 100%; height: 100%; object-fit: cover; }
.movie-card .poster .vip-tag {
    position: absolute; top: 6px; right: 6px; background: linear-gradient(135deg, var(--gold), #FFA500);
    color: #000; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 4px;
}
.movie-card .poster .play-mask {
    position: absolute; inset: 0; background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.movie-card:active .play-mask { opacity: 1; }
.movie-card .poster .play-mask svg { width: 32px; height: 32px; fill: #fff; }
.movie-card .m-title {
    padding: 8px 6px 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-align: center;
}

/* ===== 分类页 ===== */
.category-header { padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.category-title { font-size: 20px; font-weight: bold; }
.source-tabs {
    display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.source-tabs::-webkit-scrollbar { display: none; }
.source-tab {
    flex-shrink: 0; padding: 8px 16px; border-radius: 18px; background: var(--bg-card);
    color: var(--text-secondary); font-size: 13px; cursor: pointer; border: 1px solid transparent;
    white-space: nowrap; font-family: inherit; transition: all 0.2s;
}
.source-tab.active { background: rgba(233,30,99,0.15); color: var(--accent); border-color: var(--accent); }
.source-tab .count { font-size: 11px; opacity: 0.7; margin-left: 4px; }

/* 筛选 */
.filter-section { padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
    padding: 6px 14px; border-radius: 16px; background: var(--bg-card); color: var(--text-secondary);
    font-size: 12px; cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: all 0.2s;
}
.filter-btn.active { background: rgba(233,30,99,0.15); color: var(--accent); border-color: var(--accent); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 10px; padding: 20px 16px; }
.page-btn {
    padding: 8px 20px; border-radius: 18px; background: var(--bg-card); color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.08); font-size: 14px; cursor: pointer; font-family: inherit;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== 播放页 ===== */
.play-page { max-width: 900px; margin: 0 auto; padding: 0 16px 100px; }
.play-page .back-row { display: flex; align-items: center; gap: 8px; padding: 16px 0; }
.play-page .back-btn {
    display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); border: none;
    color: var(--text-secondary); padding: 8px 14px; border-radius: 16px; cursor: pointer; font-family: inherit;
}
.play-page .back-btn svg { width: 16px; height: 16px; fill: currentColor; }
.video-player { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.video-player video { width: 100%; height: 100%; }
.video-player .player-tip {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 14px; flex-direction: column; gap: 10px;
}
.player-loading { display: none; position: absolute; inset: 0; background: rgba(0,0,0,0.6); z-index: 5; align-items: center; justify-content: center; }
.player-loading.show { display: flex; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--bg-card); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.play-info { padding: 16px 0; }
.play-title { font-size: 20px; font-weight: bold; margin-bottom: 8px; }
.play-meta { font-size: 13px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.episodes-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.ep-btn {
    padding: 10px 6px; text-align: center; border-radius: var(--radius-sm); background: var(--bg-card);
    font-size: 13px; color: var(--text-secondary); cursor: pointer; border: 1px solid transparent; font-family: inherit;
}
.ep-btn.active { background: rgba(233,30,99,0.15); color: var(--accent); border-color: var(--accent); }

/* ===== 我的页 ===== */
.me-header { padding: 50px 16px 20px; text-align: center; background: linear-gradient(180deg, rgba(233,30,99,0.15), transparent); }
.me-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; background: linear-gradient(135deg, var(--accent), #9C27B0); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.me-nickname { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.me-uid { font-size: 12px; color: var(--text-muted); }
.me-menu { padding: 0 16px; }
.menu-group { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 12px; }
.menu-item { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.menu-item:last-child { border-bottom: none; }
.menu-item .menu-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-left: 12px; }
.menu-item .menu-icon svg { width: 20px; height: 20px; fill: #fff; }
.menu-item .menu-icon.blue { background: linear-gradient(135deg, #2196F3, #1976D2); }
.menu-item .menu-icon.green { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.menu-item .menu-icon.orange { background: linear-gradient(135deg, #FF9800, #F57C00); }
.menu-item .menu-icon.purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.menu-item .menu-text { flex: 1; }
.menu-item .menu-label { font-size: 15px; }
.menu-item .menu-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== 桌面侧边栏 ===== */
.desktop-sidebar {
    display: none; flex-direction: column; width: 220px; min-height: 100vh;
    background: var(--bg-secondary); border-left: 1px solid rgba(255,255,255,0.06);
    position: fixed; right: 0; top: 0; bottom: 0; z-index: 100; padding-top: 20px;
}
.sidebar-logo { padding: 0 20px 24px; font-size: 22px; font-weight: bold; background: linear-gradient(135deg, var(--gold), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.sidebar-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); color: var(--text-secondary); font-size: 15px; cursor: pointer; transition: all 0.2s; border: none; background: none; font-family: inherit; width: 100%; }
.sidebar-nav-item svg { width: 22px; height: 22px; fill: currentColor; }
.sidebar-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-nav-item.active { background: rgba(233,30,99,0.15); color: var(--accent); }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 12px 16px; }
.sidebar-source-section { padding: 0 12px; margin-top: auto; margin-bottom: 20px; max-height: 40vh; overflow-y: auto; scrollbar-width: thin; }
.sidebar-source-title { font-size: 12px; color: var(--text-muted); padding: 0 16px 8px; }
.sidebar-source-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: all 0.2s; border: none; background: none; font-family: inherit; width: 100%; }
.sidebar-source-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-source-item.active { color: var(--accent); }
.sidebar-source-item .source-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ===== 加载 ===== */
.loading-spinner { display: flex; justify-content: center; padding: 30px; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 15px; }
.empty-state svg { width: 48px; height: 48px; fill: var(--text-muted); margin: 0 auto 12px; }

/* ===== 响应式 ===== */
@media (min-width: 480px) {
    .movies-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
    .app-container { max-width: 100%; }
    .desktop-sidebar { display: flex; }
    .desktop-main { margin-right: 220px; }
    .bottom-nav { display: none; }
    .movies-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 24px; }
    .home-header { padding: 20px 24px 0; }
    .search-bar { margin: 14px 24px; }
    .banner-track { height: 310px; }
    .section-header { padding: 0 24px; }
    .category-header { padding: 20px 24px; }
    .source-tabs { padding: 0 24px 12px; }
    .pagination { padding: 24px; }
    .me-header { padding: 60px 24px 24px; }
    .me-menu { padding: 0 24px; }
    .play-page { padding: 0 24px 100px; }
}
@media (min-width: 1024px) {
    .movies-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
    .desktop-sidebar { width: 240px; }
    .desktop-main { margin-right: 240px; }
}
