/**
 * 全站配色对齐 /seedance2.0（seedance2_bundle/static/style.css）
 * 需在 body 上加 class="theme-seedance"，并在 site-nav.css 之后引入。
 */
:root {
    --sd-bg: #0b1020;
    --sd-bg-soft: #121a2f;
    --sd-panel: rgba(18, 26, 47, 0.82);
    --sd-panel-hover: rgba(22, 32, 58, 0.92);
    --sd-border: rgba(148, 163, 184, 0.28);
    --sd-text: #e5e7eb;
    --sd-muted: #94a3b8;
    --sd-primary: #4f7cff;
    --sd-primary-2: #7c5cff;
    --sd-focus: rgba(99, 102, 241, 0.35);
}

body.theme-seedance {
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    color: var(--sd-text) !important;
    background: var(--sd-bg) !important;
    background-image:
        radial-gradient(1200px 600px at 20% -20%, rgba(29, 45, 90, 0.92) 0%, transparent 58%),
        radial-gradient(1200px 600px at 100% -20%, rgba(44, 32, 80, 0.88) 0%, transparent 58%),
        radial-gradient(900px 500px at 50% 110%, rgba(79, 124, 255, 0.07) 0%, transparent 45%) !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

body.theme-seedance::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(29, 45, 90, 0.4) 0%, transparent 52%),
        radial-gradient(circle at 80% 20%, rgba(44, 32, 80, 0.32) 0%, transparent 52%),
        radial-gradient(circle at 40% 80%, rgba(79, 124, 255, 0.12) 0%, transparent 52%) !important;
    opacity: 1 !important;
}

/* 玻璃卡片（覆盖各页内联 .card） */
body.theme-seedance .card {
    background: var(--sd-panel) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid var(--sd-border) !important;
    box-shadow: 0 10px 32px rgba(2, 6, 23, 0.42) !important;
}

body.theme-seedance .card:hover {
    transform: translateY(-2px);
    background: var(--sd-panel-hover) !important;
    box-shadow: 0 14px 42px rgba(2, 6, 23, 0.5) !important;
}

body.theme-seedance h1,
body.theme-seedance h2,
body.theme-seedance h3,
body.theme-seedance .card-title,
body.theme-seedance .logo {
    color: var(--sd-text) !important;
}

body.theme-seedance p,
body.theme-seedance .section-hint,
body.theme-seedance .subtitle {
    color: var(--sd-muted) !important;
}

/* 旧版横向 nav-link（首页用户信息区等若仍存在） */
body.theme-seedance .nav-link {
    background: rgba(11, 18, 32, 0.72) !important;
    border: 1px solid var(--sd-border) !important;
    color: #cbd5e1 !important;
}

body.theme-seedance .nav-link:hover {
    border-color: rgba(99, 102, 241, 0.55) !important;
    color: #fff !important;
}

body.theme-seedance label {
    color: #cbd5e1 !important;
}

body.theme-seedance input[type="text"],
body.theme-seedance input[type="password"],
body.theme-seedance input[type="email"],
body.theme-seedance input[type="number"],
body.theme-seedance input[type="file"],
body.theme-seedance select,
body.theme-seedance textarea {
    border-color: var(--sd-border) !important;
    background: rgba(11, 18, 32, 0.78) !important;
    color: var(--sd-text) !important;
}

body.theme-seedance select option {
    background: #121a2f;
    color: var(--sd-text);
}

body.theme-seedance input:focus,
body.theme-seedance select:focus,
body.theme-seedance textarea:focus {
    border-color: rgba(99, 102, 241, 0.75) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    outline: none !important;
}

body.theme-seedance button[type="submit"],
body.theme-seedance .btn-primary {
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-primary-2)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 28px rgba(79, 124, 255, 0.28);
}

body.theme-seedance button[type="submit"]:hover,
body.theme-seedance .btn-primary:hover {
    filter: brightness(1.06);
}

body.theme-seedance .btn,
body.theme-seedance .btn-secondary {
    border-radius: 10px;
}

body.theme-seedance .btn-secondary {
    background: rgba(11, 18, 32, 0.75) !important;
    border: 1px solid var(--sd-border) !important;
    color: #dbeafe !important;
}

body.theme-seedance .tabs .tab,
body.theme-seedance .tab {
    border: 1px solid var(--sd-border) !important;
    background: rgba(11, 18, 32, 0.78) !important;
    color: #cbd5e1 !important;
}

body.theme-seedance .tabs .tab.active,
body.theme-seedance .tab.active {
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-primary-2)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 28px rgba(79, 124, 255, 0.32);
}

body.theme-seedance .paste-area,
body.theme-seedance .recharge-section {
    border-color: var(--sd-border) !important;
    background: rgba(15, 23, 42, 0.55) !important;
}

body.theme-seedance .modal-content {
    background: rgba(18, 26, 47, 0.98) !important;
    border: 1px solid var(--sd-border) !important;
    color: var(--sd-text) !important;
}

/* ========== 登录 / 配额错误页（浅色内容块保留可读性，外围已是 Seedance 背景） ========== */
body.theme-seedance .login-card {
    background: var(--sd-panel) !important;
    border: 1px solid var(--sd-border) !important;
}

body.theme-seedance .login-card .logo {
    color: var(--sd-text) !important;
}

body.theme-seedance .error-container {
    border: 1px solid var(--sd-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* ========== 管理后台：与其它页面一致的深色玻璃 ========== */
body.theme-seedance.page-theme-admin .container {
    background: var(--sd-panel) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid var(--sd-border) !important;
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.42) !important;
    color: var(--sd-text) !important;
}

body.theme-seedance.page-theme-admin .header {
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-primary-2)) !important;
    color: #fff !important;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(79, 124, 255, 0.22);
}

body.theme-seedance.page-theme-admin .header h1,
body.theme-seedance.page-theme-admin .header p {
    color: #fff !important;
}

body.theme-seedance.page-theme-admin .section {
    border-color: var(--sd-border) !important;
    background: rgba(11, 18, 32, 0.38) !important;
    border-radius: 12px;
}

body.theme-seedance.page-theme-admin .api-section {
    background: rgba(11, 18, 32, 0.5) !important;
    border: 1px solid var(--sd-border) !important;
    border-radius: 10px;
}

body.theme-seedance.page-theme-admin .section h2,
body.theme-seedance.page-theme-admin .section h3,
body.theme-seedance.page-theme-admin .api-section h3 {
    color: var(--sd-text) !important;
}

body.theme-seedance.page-theme-admin code {
    background: rgba(79, 124, 255, 0.14) !important;
    color: #c7d2fe !important;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.1em 0.4em;
    border-radius: 6px;
    font-size: 0.92em;
}

body.theme-seedance.page-theme-admin table thead tr {
    background: rgba(79, 124, 255, 0.16) !important;
}

body.theme-seedance.page-theme-admin table th,
body.theme-seedance.page-theme-admin table td {
    border-color: var(--sd-border) !important;
    color: var(--sd-text) !important;
}

body.theme-seedance.page-theme-admin table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04) !important;
}

/* 内联灰字在深色底上改为 Seedance 次要色 */
body.theme-seedance.page-theme-admin [style*="color:#666"],
body.theme-seedance.page-theme-admin [style*="color: #666"] {
    color: var(--sd-muted) !important;
}

body.theme-seedance.page-theme-admin [style*="color:#333"],
body.theme-seedance.page-theme-admin [style*="color: #333"] {
    color: var(--sd-text) !important;
}

/* ========== 顶栏变量（与 Seedance .topbar 一致） ========== */
body.theme-seedance {
    --site-nav-bg: rgba(18, 26, 47, 0.9);
    --site-nav-border: rgba(148, 163, 184, 0.28);
    --site-nav-link: #e5e7eb;
    --site-nav-link-hover-bg: rgba(79, 124, 255, 0.22);
    --site-nav-active-bg: rgba(79, 124, 255, 0.42);
    --site-nav-shadow: 0 8px 28px rgba(2, 6, 23, 0.45);
}

body.theme-seedance .site-nav {
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.14), rgba(124, 92, 255, 0.11)),
        rgba(18, 26, 47, 0.88) !important;
}

body.theme-seedance .site-nav-link.is-active {
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-primary-2)) !important;
    color: #fff !important;
}

body.theme-seedance .site-nav-toggle:focus-visible {
    outline-color: rgba(79, 124, 255, 0.85);
}

