/* ===== 全新风格：简洁暗色卡片风 ===== */

:root {
    --bg-body: #050816;
    --bg-elevated: #0b1220;
    --bg-card: #111827;
    --border-subtle: #1f2937;
    --primary: #3b82f6;
    --primary-soft: rgba(59, 130, 246, 0.15);
    --accent: #f97316;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.7);
    --transition-fast: all 0.18s ease-out;
    --transition-med: all 0.25s ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: radial-gradient(circle at top, #1d283a 0, #050816 55%, #020617 100%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
}

/* ===== 顶部导航 ===== */

header.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.96),
        rgba(15, 23, 42, 0.92)
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.site-header h1 {
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f9fafb;
}

.site-header h1 span {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    font-size: 0.7rem;
    color: #7dd3fc;
}

.site-header nav {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.site-header nav::-webkit-scrollbar {
    display: none;
}

.site-header nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 500;
    color: #e5e7eb;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.site-header nav a:hover {
    border-color: rgba(59, 130, 246, 0.8);
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.25), transparent 55%);
    color: #f9fafb;
    transform: translateY(-1px);
}

.site-header nav a::after {
    content: '';
    position: absolute;
    inset-inline: 20%;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition: var(--transition-fast);
}

.site-header nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

/* ===== 主内容框架 ===== */

main {
    max-width: 1200px;
    margin: 1.75rem auto 2.5rem;
    padding: 1.75rem 1.25rem 2rem;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.98));
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

section {
    margin-bottom: 2.5rem;
}

section:last-of-type {
    margin-bottom: 0;
}

section h2 {
    margin: 0 0 1.25rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: #f9fafb;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

section h2::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.8);
}

section h2::after {
    content: '';
    height: 1px;
    width: 88px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.6), transparent);
    margin-left: 0.35rem;
}

/* ===== 标签区域 ===== */

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.8);
    transition: var(--transition-fast);
}

.btn-outline-primary:hover {
    border-color: rgba(59, 130, 246, 0.9);
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.22), rgba(15, 23, 42, 0.95));
    color: #e5f2ff;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.8);
    transition: var(--transition-fast);
}

.btn-outline-secondary:hover {
    border-color: rgba(96, 165, 250, 0.9);
    background: radial-gradient(circle at top, rgba(96, 165, 250, 0.22), rgba(15, 23, 42, 0.95));
    color: #e5f2ff;
}

/* ===== 搜索表单 ===== */

.input-group {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.85);
    overflow: hidden;
}

/* ===== 热门搜索关键字样式 ===== */
.hot-keyword {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e6eefc;
    text-decoration: none;
    /* 改为带颜色的半透明背景，避免白字白底的问题，同时在深色主题下可读性更好 */
    background: linear-gradient(90deg, rgba(56,189,248,0.10), rgba(168,85,247,0.06));
    border: 1px solid rgba(59,130,246,0.14);
    transition: var(--transition-fast);
    margin-right: 0.45rem;
    box-shadow: 0 8px 20px rgba(2,6,23,0.45);
}

.hot-keyword:hover {
    transform: translateY(-3px);
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    color: #051023;
    border-color: transparent;
    box-shadow: 0 18px 45px rgba(56, 189, 248, 0.12);
}

.hot-keywords-block .hot-keyword-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    /* 自动换行时左右对齐并在窄屏下换行排布 */
    align-items: center;
    justify-content: flex-start;
}

.form-control {
    border: none;
    background: transparent;
    color: var(--text-main);
    padding: 0.8rem 1.2rem;
    font-size: 0.92rem;
}

.form-control::placeholder {
    color: rgba(148, 163, 184, 0.9);
}

.form-control:focus {
    outline: none;
    box-shadow: none;
}

.btn-primary {
    border-radius: 999px;
    border: none;
    padding-inline: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: conic-gradient(from 160deg, #38bdf8, #a855f7, #22c55e, #38bdf8);
    color: #0b1220;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8);
    transition: var(--transition-med);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 45px rgba(56, 189, 248, 0.45);
}

/* ===== 视频卡片 ===== */

.video-card {
    background: radial-gradient(circle at top left, #111827, #020617);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding-bottom: 0.4rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.9);
    border-color: rgba(59, 130, 246, 0.8);
}

.video-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.video-card-body {
    padding: 0.75rem 0.85rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.video-card h5,
.video-card h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.video-card h5 a,
.video-card h6 a {
    text-decoration: none;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card h5 a:hover,
.video-card h6 a:hover {
    color: #bfdbfe;
}

.video-card .video-tags {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.video-card p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.video-duration {
    position: absolute;
    right: 0.55rem;
    bottom: 4.1rem;
    font-size: 0.72rem;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(148, 163, 184, 0.7);
}

/* ===== 视频播放器与封面 ===== */

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(30, 64, 175, 0.65);
}

.video-container video,
.video-container .video-js {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.video-poster {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.1), #020617);
    cursor: pointer;
    transition: opacity 0.25s ease-out;
}

.video-poster .poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.video-poster .poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.6), transparent 55%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-poster .poster-play-icon {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: radial-gradient(circle at top, #e5e7eb, #cbd5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.video-poster .poster-play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 26px solid #1e293b;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    margin-left: 4px;
}

.video-poster.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-js {
    width: 100% !important;
    height: 100% !important;
}

.video-js .vjs-big-play-button {
    border-radius: 999px !important;
    border: 1px solid rgba(148, 163, 184, 0.9) !important;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.98)) !important;
    width: 3em !important;
}

.video-js.vjs-playing .vjs-big-play-button {
    display: none !important;
}

.video-js.vjs-paused .vjs-big-play-button {
    display: flex !important;
}

/* ===== 页脚与友情链接 ===== */

footer {
    background: radial-gradient(circle at top, #020617, #020617);
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    padding: 1.6rem 0;
    margin-top: 2.5rem;
}

footer p {
    margin: 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.list-inline {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0.3rem 0 0;
}

.list-inline-item a {
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    color: #93c5fd;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(37, 99, 235, 0.6);
    transition: var(--transition-fast);
}

.list-inline-item a:hover {
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
}

/* ===== 空状态 ===== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state p {
    margin: 0.5rem 0 0;
}

/* ===== 动画 & 响应式 ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.35s ease-out;
}

@media (max-width: 768px) {
    .site-header .container {
        padding-inline: 1rem;
    }

    main {
        margin: 1.1rem 0.8rem 2.1rem;
        padding: 1.4rem 1rem 1.7rem;
    }

    .video-card img {
        height: 165px;
    }
}
