/* ============================================================
   Sakura 短视频主题 —— 全站样式
   ============================================================ */

/* ============================================================
   基础重置
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; }
img { max-width: 100%; height: auto; }

/* ============================================================
   顶栏
   ============================================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e9edf2;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
}
.site-brand:hover { color: #2563eb; }
.brand-icon { color: #2563eb; font-size: 1.4rem; }
.brand-text { white-space: nowrap; }

.site-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}
.site-nav > .nav-link,
.site-nav > .nav-dropdown > .nav-link {
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.site-nav > .nav-link:hover,
.site-nav > .nav-dropdown > .nav-link:hover {
    color: #2563eb;
}

/* ---------- 下拉菜单 ---------- */
.nav-dropdown {
    position: relative;
    display: inline-block;
}
.nav-dropdown .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.nav-arrow {
    font-size: 0.7em;
    opacity: 0.6;
    transition: transform 0.2s;
    display: inline-block;
}
.nav-dropdown:hover .nav-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 12px 6px 6px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(2px);
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 10px;
}
.nav-dropdown-item {
    display: block;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #475569;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nav-dropdown-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ---------- 用户菜单 ---------- */
.user-menu {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
}
.avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: background 0.2s, color 0.2s;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
}
.avatar-btn:hover {
    background: #d1d5db;
    color: #0f172a;
}
.avatar-char {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}
.avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 200;
}
.user-menu:hover .user-popup,
.user-popup:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-popup::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}
.user-popup-header { padding: 10px 12px 8px; }
.user-popup-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}
.user-popup-role {
    color: #94a3b8;
    font-size: 0.78rem;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-popup-divider {
    height: 1px;
    background: #eef2f6;
    margin: 4px 0;
}
.popup-btn {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #334155;
    transition: background 0.15s;
}
.popup-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.popup-btn-primary {
    color: #2563eb;
    font-weight: 500;
}
.popup-btn-primary:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

/* ============================================================
   主内容区 & 三区域布局
   ============================================================ */
.site-main { flex: 1; }

.theme-area-hero {
    width: 100%;
}
.theme-area-hero.is-empty {
    display: none;
}

.theme-content-grid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 40px 24px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}
.theme-content-grid.no-sidebar {
    grid-template-columns: 1fr;
}
.theme-content-grid.no-main {
    grid-template-columns: 1fr;
    max-width: 100%;
}
.theme-area-main,
.theme-area-sidebar {
    min-width: 0;
}

/* ============================================================
   欢迎介绍小工具
   ============================================================ */
.widget-welcome {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
}
.widget-welcome-inner {
    max-width: 780px;
    margin: 0 auto;
}
.hero-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.hero-title span { color: #60a5fa; }
.hero-subtitle {
    font-size: 1.15rem;
    color: #cbd5e1;
    letter-spacing: 8px;
    margin-bottom: 32px;
}
.hero-desc {
    font-size: 1.02rem;
    color: #cbd5e1;
    line-height: 2;
    margin-bottom: 32px;
}
.hero-desc strong { color: #fff; }
.hero-desc em {
    color: #60a5fa;
    font-style: normal;
    font-weight: 500;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.hero-badge {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #e2e8f0;
}

/* ============================================================
   侧边栏中的小工具
   ============================================================ */
.theme-area-sidebar .widget {
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.theme-area-sidebar .widget-latest-videos .section-header h2 {
    font-size: 1.1rem;
}
.theme-area-sidebar .widget-latest-videos .pagination {
    display: none;
}

/* ============================================================
   首页空状态提示
   ============================================================ */
.theme-empty-hint {
    max-width: 560px;
    margin: 80px auto;
    padding: 40px 32px;
    background: #fff;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    text-align: center;
    color: #64748b;
}
.theme-empty-hint h2 {
    font-size: 1.3rem;
    color: #0f172a;
    margin-bottom: 12px;
}
.theme-empty-hint p {
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 0.95rem;
}
.theme-empty-hint strong { color: #2563eb; }
.theme-empty-hint .btn { margin-top: 16px; }

/* ============================================================
   分类页页头
   ============================================================ */
.category-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 60px 24px 50px;
}
.category-header-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}
.category-breadcrumb {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}
.category-breadcrumb a { color: #cbd5e1; }
.category-breadcrumb a:hover { color: #fff; }
.category-breadcrumb .sep {
    margin: 0 8px;
    opacity: 0.5;
}
.category-breadcrumb .current { color: #93c5fd; }
.category-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.category-desc {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}
.category-count {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* ============================================================
   通用区块
   ============================================================ */
.article-section {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 24px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9edf2;
}
.section-header h2 {
    font-size: 1.5rem;
    color: #0f172a;
}
.section-count {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ============================================================
   视频卡片网格
   ============================================================ */
.video-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.theme-area-main .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.theme-area-sidebar .video-grid {
    grid-template-columns: 1fr;
}

.video-card {
    display: block;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    color: inherit;
    text-decoration: none;
}

.video-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
    overflow: hidden;
}
.video-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.video-card:hover .video-card-cover img {
    transform: scale(1.05);
}
.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}
.video-card-duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}
.video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.video-card:hover .video-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-card-body {
    padding: 12px 14px 14px;
}
.video-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.78rem;
    align-items: center;
}
.video-card-tax {
    margin-left: auto;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* ============================================================
   分类标签
   ============================================================ */
.tax-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #eff6ff;
    color: #1d4ed8;
    transition: background 0.15s, color 0.15s;
}
.tax-badge:hover {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================================
   详情页 - 全宽布局
   ============================================================ */
.single-video {
    width: 100%;
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.single-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9edf2;
}
.single-taxonomies {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.single-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 12px;
}
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #94a3b8;
    font-size: 0.88rem;
}

/* ============================================================
   主区域：播放器（左）+ 侧栏（右）
   ============================================================ */
.single-video-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    margin: 0 0 28px;
    align-items: stretch;
}

/* ---------- 左：播放器容器 ---------- */
.single-video-player-wrap {
    min-width: 0;
    display: flex;
}

.single-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
}
@supports not (aspect-ratio: 16 / 9) {
    .single-video-player {
        height: 0;
        padding-top: 56.25%;
    }
}

.single-video-player video,
.single-video-player .sakura-video {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    background: #000;
    border: 0;
}
.single-video-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
    background: #000;
}

.sakura-player {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: block;
}
.sakura-player video,
.sakura-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
    background: #000;
}
.sakura-player video { object-fit: cover; }

.sakura-player-loading {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
}

.player-empty {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #94a3b8;
    gap: 12px;
    padding: 20px;
    text-align: center;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.player-empty code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #cbd5e1;
}

/* ============================================================
   右侧栏：播放源 + 季 + 剧集（视觉上是一张整体卡片）
   ============================================================ */
.single-video-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.side-panel {
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.side-block {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
}
.side-block:last-child {
    border-bottom: none;
}

.side-block-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.side-block-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: #94a3b8;
}

/* ---------- 播放源 / 季 按钮列表 ---------- */
.side-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.source-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.5;
}
.source-pill:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    text-decoration: none;
}
.source-pill.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ---------- 剧集列表 ---------- */
.side-block-episodes {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.side-episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 6px;
    overflow-y: auto;
    padding-right: 4px;
    align-content: start;
    min-height: 0;
    max-height: 100%;
}
.side-episode-grid::-webkit-scrollbar { width: 5px; }
.side-episode-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.side-episode-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.side-episode-grid .episode-item {
    display: block;
    width: 100%;
    padding: 6px 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    color: #334155;
    font-size: 0.78rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.3;
}
.side-episode-grid .episode-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.side-episode-grid .episode-item.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* ============================================================
   详情页正文
   ============================================================ */
.single-content {
    font-size: 1.02rem;
    color: #334155;
    line-height: 1.9;
    max-width: 100%;
}
.single-content p { margin-bottom: 18px; }
.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4 {
    color: #0f172a;
    margin: 28px 0 14px;
    line-height: 1.4;
}
.single-content h1 { font-size: 1.7rem; }
.single-content h2 { font-size: 1.45rem; }
.single-content h3 { font-size: 1.2rem; }
.single-content h4 { font-size: 1.05rem; }
.single-content ul,
.single-content ol {
    margin: 12px 0 18px;
    padding-left: 24px;
}
.single-content li { margin-bottom: 6px; }
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}
.single-content a {
    color: #2563eb;
    text-decoration: underline;
}
.single-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', Consolas, monospace;
}
.single-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}
.single-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}
.single-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 8px 16px;
    margin: 16px 0;
    background: #f8fafc;
    color: #475569;
    border-radius: 0 6px 6px 0;
}
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}
.single-content th,
.single-content td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}
.single-content th {
    background: #f8fafc;
    font-weight: 600;
}

.single-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e9edf2;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
}
.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}
.btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
}
.btn-secondary:hover { background: #cbd5e1; }
.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    display: block;
}

/* ============================================================
   空状态
   ============================================================ */
.empty-state {
    background: #fff;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 60px 24px;
    text-align: center;
    color: #94a3b8;
}
.empty-state p { margin-bottom: 12px; }
.empty-state .btn { margin-top: 12px; }
.empty-hint { font-size: 0.88rem; }

/* ============================================================
   分页
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}
.page-link {
    padding: 8px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #2563eb;
    background: #fff;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.page-link:hover { background: #f1f5f9; }
.page-info {
    color: #94a3b8;
    font-size: 0.88rem;
}

/* ============================================================
   登录 / 注册
   ============================================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 60px 24px;
}
.auth-card {
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
}
.auth-title {
    font-size: 1.8rem;
    color: #0f172a;
    margin-bottom: 6px;
}
.auth-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 28px;
}
.auth-form .form-group { margin-bottom: 18px; }
.auth-form label {
    display: block;
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: #f8fafc;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    background: #fff;
}
.form-hint {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 5px;
}
.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}
.auth-footer a {
    color: #2563eb;
    font-weight: 500;
}
.auth-disabled {
    text-align: center;
    color: #94a3b8;
    padding: 20px 0;
}

/* ============================================================
   提示框
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #16a34a;
}
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #2563eb;
}

/* ============================================================
   404
   ============================================================ */
.error-page {
    text-align: center;
    padding: 100px 24px;
}
.error-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}
.error-code {
    font-size: 5rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 8px;
    line-height: 1;
}
.error-message {
    color: #64748b;
    margin-bottom: 28px;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
    border-top: 1px solid #e9edf2;
    background: #fff;
    padding: 24px 0;
    margin-top: auto;
}
.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
}
.site-footer strong {
    color: #64748b;
    font-weight: 600;
}

/* ============================================================
   响应式
   ============================================================ */

/* 详情页：中屏（平板）改为上下布局 */
@media (max-width: 1100px) {
    .single-video-main {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}
@media (max-width: 900px) {
    .single-video-main {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .single-video-side {
        order: 2;
    }
    .side-episode-grid {
        max-height: 320px;
    }
    .theme-content-grid {
        grid-template-columns: 1fr;
    }
    .theme-content-grid.no-main {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        padding: 12px 16px;
        gap: 16px;
    }
    .site-nav {
        gap: 16px;
    }
    .site-nav > .nav-link,
    .site-nav > .nav-dropdown > .nav-link {
        font-size: 0.9rem;
    }
    .article-section {
        margin: 40px auto;
        padding: 0 16px;
    }
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .single-title {
        font-size: 1.6rem;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 4px;
    }
    .category-header {
        padding: 40px 20px 30px;
    }
    .category-title {
        font-size: 1.5rem;
    }
    .auth-card {
        padding: 28px 20px;
    }
    .site-footer-inner {
        padding: 0 16px;
    }
}

@media (max-width: 640px) {
    .site-nav {
        display: none;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-desc {
        font-size: 0.95rem;
    }
    .single-video {
        padding: 0 16px;
        margin: 16px auto;
    }
    .single-title {
        font-size: 1.4rem;
    }
    .single-content {
        font-size: 0.98rem;
    }
    .single-video-player {
        border-radius: 8px;
    }
    .side-panel {
        border-radius: 10px;
    }
    .side-episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
        max-height: 260px;
    }
    .side-episode-grid .episode-item {
        font-size: 0.75rem;
        padding: 5px 3px;
    }
    .error-code {
        font-size: 3.5rem;
    }
    .widget-welcome {
        padding: 60px 20px;
    }
    .theme-content-grid {
        padding: 24px 16px;
        gap: 24px;
    }
    .video-grid,
    .theme-area-main .video-grid {
        grid-template-columns: 1fr;
    }
    .single-footer {
        flex-direction: column;
    }
    .single-footer .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-brand {
        font-size: 1.1rem;
    }
    .brand-icon {
        font-size: 1.2rem;
    }
    .avatar-btn {
        width: 36px;
        height: 36px;
    }
    .user-popup {
        min-width: 180px;
    }
    .auth-card {
        padding: 24px 18px;
    }
    .source-pill {
        font-size: 0.78rem;
        padding: 4px 10px;
    }
}