/* ================= 竖版视频站 · 深色主题 ================= */
:root {
    --bg: #0b0d14;
    --bg-soft: #10131d;
    --card: #161a28;
    --card-hover: #1c2133;
    --border: #232941;
    --text: #e8eaf2;
    --muted: #9aa1b5;
    --accent: #7c6cf0;
    --accent-2: #4aa3ff;
    --grad: linear-gradient(135deg, #7c6cf0 0%, #4aa3ff 100%);
    --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 13, 20, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand-logo { height: 34px; max-width: 140px; object-fit: contain; }

.brand-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff;
}

.brand-name { font-size: 19px; font-weight: 700; letter-spacing: 1px; }

.nav { display: flex; gap: 6px; flex: 1; overflow: hidden; }

.nav a {
    padding: 7px 15px;
    border-radius: 20px;
    color: var(--muted);
    font-size: 14.5px;
    white-space: nowrap;
    transition: all .2s;
}

.nav a:hover { color: var(--text); background: var(--card); }

.nav a.active {
    color: #fff;
    background: var(--grad);
    font-weight: 600;
}

.search { display: flex; flex-shrink: 0; }

.search input {
    width: 220px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 22px 0 0 22px;
    background: var(--bg-soft);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.search input:focus { border-color: var(--accent); }
.search input::placeholder { color: #5a6076; }

.search button {
    padding: 0 18px;
    border: none;
    border-radius: 0 22px 22px 0;
    background: var(--grad);
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center;
    transition: opacity .2s;
}

.search button:hover { opacity: .85; }

/* ---------------- 主体容器 ---------------- */
.container {
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 48px;
    flex: 1;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
}

.title-bar {
    width: 5px; height: 22px;
    border-radius: 3px;
    background: var(--grad);
}

.page-sub { color: var(--muted); font-size: 14px; }

.sort-tabs { margin-left: auto; display: flex; gap: 8px; }

.sort-tabs a {
    padding: 6px 18px;
    border-radius: 18px;
    font-size: 14px;
    color: var(--muted);
    border: 1px solid var(--border);
    transition: all .2s;
}

.sort-tabs a:hover { color: var(--text); }

.sort-tabs a.active {
    color: #fff;
    background: var(--grad);
    border-color: transparent;
    font-weight: 600;
}

/* ---------------- 视频卡片网格（竖版 9:16） ---------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 22px;
}

.video-card { display: block; }

.cover {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
}

.cover img,
.cover-placeholder {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.cover-placeholder {
    background: linear-gradient(160deg, #1a1f33 0%, #23294a 60%, #1a1f33 100%);
}

.cover-mask {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45) 100%);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity .25s;
}

.play-ico {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.35);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; padding-left: 4px;
    transform: scale(.8);
    transition: transform .25s;
}

.views-badge {
    position: absolute;
    right: 8px; bottom: 8px;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    font-size: 11.5px;
    color: #dfe3f0;
}

.video-card:hover .cover img,
.video-card:hover .cover-placeholder { transform: scale(1.06); }
.video-card:hover .cover-mask { opacity: 1; }
.video-card:hover .play-ico { transform: scale(1); }

.card-title {
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
    transition: color .2s;
}

.video-card:hover .card-title { color: var(--accent-2); }

.empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    color: var(--muted);
}

.empty-icon { font-size: 48px; display: block; margin-bottom: 14px; opacity: .7; }

/* ---------------- 分页 ---------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    min-width: 38px;
    padding: 8px 14px;
    text-align: center;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    transition: all .2s;
}

.pagination a:hover { color: var(--text); border-color: var(--accent); }

.pagination a.current {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* ---------------- 播放页 ---------------- */
.play-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.play-main { flex: 1; display: flex; flex-direction: column; align-items: center; }

.player-wrap {
    width: min(46vh, 440px);
    aspect-ratio: 9 / 16;
    max-height: 82vh;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.video-meta { width: min(46vh, 440px); margin-top: 18px; }

.video-title { font-size: 19px; font-weight: 700; line-height: 1.5; }

.video-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13.5px;
}

.stat-item { display: inline-flex; align-items: center; gap: 5px; }

.category-link {
    padding: 4px 14px;
    border-radius: 16px;
    background: rgba(124, 108, 240, .14);
    border: 1px solid rgba(124, 108, 240, .35);
    color: var(--accent);
    font-size: 13px;
    transition: all .2s;
}

.category-link:hover { background: rgba(124, 108, 240, .28); color: #fff; }

.play-side { width: 340px; flex-shrink: 0; }

.side-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    margin-bottom: 16px;
}

.related-list { display: flex; flex-direction: column; gap: 12px; }

.related-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    transition: all .2s;
}

.related-item:hover { background: var(--card-hover); border-color: var(--accent); }

.related-cover {
    width: 72px; height: 128px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-cover img,
.related-cover .cover-placeholder { width: 100%; height: 100%; object-fit: cover; }

.related-info { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }

.related-title {
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-views { color: var(--muted); font-size: 12.5px; }

/* ---------------- 页脚 ---------------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 26px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}

.site-footer p + p { margin-top: 6px; }

/* ---------------- 响应式基础 ---------------- */
@media (max-width: 1100px) {
    .play-layout { flex-direction: column; align-items: center; }
    .play-side { width: 100%; max-width: 640px; }
}

@media (max-width: 768px) {
    .header-inner { gap: 16px; }
    .nav { display: none; }
    .search input { width: 140px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
