/* ============================================================
   直播数据平台 - 暗色科技感主题
   原生 CSS 变量 + 玻璃拟态 + 渐变点缀
   ============================================================ */
:root {
    /* 背景层次 */
    --bg-deep: #070b16;
    --bg-base: #0b1120;
    --bg-card: rgba(255, 255, 255, 0.045);
    --bg-card-hover: rgba(255, 255, 255, 0.075);
    --bg-soft: rgba(255, 255, 255, 0.03);

    /* 边框与阴影 */
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 24px rgba(34, 211, 238, 0.12);

    /* 主色（青 / 紫渐变点缀） */
    --primary: #22d3ee;
    --accent: #a78bfa;
    --gradient: linear-gradient(135deg, #22d3ee 0%, #818cf8 55%, #a78bfa 100%);

    /* 文本 */
    --text: #e6edf7;
    --text-sub: #93a1bd;
    --text-dim: #64748b;

    /* 状态色 */
    --live: #f43f5e;
    --live-glow: rgba(244, 63, 94, 0.28);
    --ok: #34d399;
    --warn: #fbbf24;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
                 "Liberation Mono", monospace;

    /* 圆角与间距 */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --gap: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
        radial-gradient(1000px 520px at 85% -5%, rgba(167, 139, 250, 0.10), transparent 60%),
        linear-gradient(180deg, var(--bg-base) 0%, var(--bg-deep) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* 细网格纹理（科技感） */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 70%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 70%);
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 18px; }

/* ============ 顶部导航 ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 13, 25, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text);
}
.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--gradient);
    position: relative;
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.45);
    flex: none;
}
.brand-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 9px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), transparent 42%),
        radial-gradient(circle at 72% 74%, rgba(255,255,255,.55), transparent 40%);
}
.brand-name { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 11px; font-weight: 500; color: var(--text-dim); letter-spacing: 1.6px; text-transform: uppercase; }

.nav { display: flex; gap: 4px; }
.nav a {
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 14px;
    transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(34,211,238,.16), rgba(167,139,250,.16));
    border: 1px solid rgba(129, 140, 248, 0.35);
}

/* ============ 页面头部 ============ */
.page-head {
    padding: 34px 0 22px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.page-head h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.page-head .sub {
    color: var(--text-sub);
    font-size: 13px;
    margin-top: 6px;
}
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-sub);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 13px;
}
.live-pill .pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 10px var(--ok);
    animation: pulse 2s infinite;
}

/* ============ 直播列表 ============ */
.live-list { padding-bottom: 48px; }

.day-group { margin-bottom: 26px; }
.day-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}
.day-title .bar {
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--gradient);
}
.day-badge {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-sub);
    letter-spacing: 0.4px;
}
.day-badge.today {
    color: #08131f;
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 0 16px rgba(129, 140, 248, 0.35);
}

/* --- 直播卡片 --- */
.live-card {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 16px 18px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-card);
    transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.live-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

/* 品牌徽标 */
.brand-chip {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
    letter-spacing: 0.4px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
/* 品牌头像/名称跳转 TikTok 直播页链接 */
.brand-chip-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 50%;
}
.brand-chip-link:hover .brand-chip {
    transform: translateY(-2px) scale(1.06);
    filter: brightness(1.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 26px rgba(0, 0, 0, 0.38);
}
.brand-name-link {
    text-decoration: none;
    color: inherit;
    transition: color .2s ease;
}
.brand-name-link:hover {
    color: var(--primary);
}
.brand-chip .ring {
    position: absolute;
    inset: -3px;
    border-radius: 17px;
    border: 1px solid currentColor;
    opacity: 0.35;
}

/* 品牌图片头像：圆形 + 差异化光晕；加载失败回退首字母色块 */
.brand-chip.brand-img { border-radius: 50%; overflow: hidden; }
.brand-chip.brand-img .ring { border-radius: 50%; }
.brand-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}
.brand-chip.brand-img.brand-SnackHouse { box-shadow: 0 0 18px rgba(245, 158, 11, 0.45), 0 6px 18px rgba(0, 0, 0, 0.3); }
.brand-chip.brand-img.brand-Declassified { box-shadow: 0 0 18px rgba(139, 92, 246, 0.5), 0 6px 18px rgba(0, 0, 0, 0.3); }
.brand-chip.brand-img.brand-SoloEnIbiza { box-shadow: 0 0 18px rgba(6, 182, 212, 0.5), 0 6px 18px rgba(0, 0, 0, 0.3); }
.brand-chip.brand-img.brand-Wish { box-shadow: 0 0 18px rgba(236, 72, 153, 0.5), 0 6px 18px rgba(0, 0, 0, 0.3); }
.brand-chip.img-failed img { display: none; }
.brand-chip.img-failed::after {
    content: attr(data-abbr);
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
    letter-spacing: 0.4px;
}
.brand-chip.img-failed { border-radius: 14px; }

/* 品牌差异化配色 */
.brand-SnackHouse { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #ffedd5; }
.brand-Declassified { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #ede9fe; }
.brand-SoloEnIbiza { background: linear-gradient(135deg, #06b6d4, #3b82f6); color: #cffafe; }
.brand-Wish { background: linear-gradient(135deg, #ec4899, #a855f7); color: #fce7f3; }
.brand-idealhome { background: linear-gradient(135deg, #10b981, #14b8a6); color: #d1fae5; }
.brand-Odosbeauty { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #e0e7ff; }
.brand-default { background: linear-gradient(135deg, #475569, #334155); color: #e2e8f0; }

/* 卡片主体 */
.live-main { flex: 1 1 210px; min-width: 180px; }
.live-title {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 15.5px;
    font-weight: 700;
}
.live-title .account-name {
    font-size: 13px;
    color: var(--text-sub);
    font-weight: 500;
    font-family: var(--font-mono);
    opacity: 0.85;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}
.live-title .account-name:hover {
    color: var(--primary);
    opacity: 1;
}

/* 进行中徽标 */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--live), #f97316);
    padding: 3px 11px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    box-shadow: 0 0 18px var(--live-glow);
}
.live-badge .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff;
    animation: pulse 1.1s infinite;
}
/* 进行中卡片高亮 + 呼吸边框 */
.live-card.live-now {
    background: linear-gradient(160deg, rgba(244, 63, 94, 0.12), rgba(249, 115, 22, 0.05) 45%, var(--bg-card));
    border-color: rgba(244, 63, 94, 0.55);
    animation: breathe 2.2s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 0 1px rgba(244,63,94,.35), 0 0 22px var(--live-glow); }
    50%      { box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 0 1px rgba(244,63,94,.75), 0 0 36px var(--live-glow); }
}

/* 人员行 */
.live-people {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}
.person-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
}
.person-tag .role { color: var(--text-dim); font-size: 11px; }
.person-tag .name { font-weight: 600; }
.person-tag .role::after { content: "·"; margin: 0 3px; color: var(--text-dim); }

/* 时间块 */
.live-time {
    flex: none;
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 18px;
    row-gap: 2px;
    align-items: center;
    padding-left: 18px;
    border-left: 1px solid var(--border);
}
.tz-col { display: flex; flex-direction: column; gap: 2px; }
.tz-label {
    font-size: 10.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.tz-time {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.tz-time small { color: var(--text-sub); font-size: 11.5px; font-weight: 500; }
.tz-time.primary { color: #fff; font-size: 15px; }
.tz-time.primary b { color: var(--primary); }
.tz-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg, rgba(34,211,238,.35), rgba(167,139,250,.35), transparent);
    margin: 2px 0;
}

/* 空状态 */
.empty-day {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    background: var(--bg-soft);
}
.empty-day .glyph {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    position: relative;
    margin-bottom: 6px;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.06), transparent 70%);
}
.empty-day .glyph::after {
    content: "";
    position: absolute;
    left: 7px; right: 7px; top: 7px; bottom: 7px;
    border-radius: 4px;
    background: var(--border-strong);
    opacity: .5;
}

.loading, .error-tip { text-align: center; color: var(--text-sub); padding: 70px 0; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; }
.spinner {
    width: 22px; height: 22px;
    border: 2px solid rgba(255,255,255,.14);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ============ 页脚 ============ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0 40px;
    color: var(--text-dim);
    font-size: 12px;
    text-align: center;
    letter-spacing: 0.4px;
}

/* ============ 占位页 ============ */
.placeholder-card {
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 60px;
    text-align: center;
    color: var(--text-sub);
    box-shadow: var(--shadow-card);
}

/* ============ 移动端 ============ */
@media (max-width: 720px) {
    .header-inner { height: 54px; }
    .brand-name { font-size: 16px; }
    .brand-sub { display: none; }
    .nav a { padding: 6px 10px; font-size: 13px; }
    .page-head { padding: 24px 0 16px; }
    .page-head h1 { font-size: 22px; }
    .live-time {
        width: 100%;
        padding-left: 0;
        border-left: none;
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .tz-divider { margin: 4px 0; }
    .live-card { padding: 14px; }
}

/* ============ 管理后台 ============ */
.auth-wrap { display: flex; justify-content: center; padding: 48px 0 64px; }
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-badge {
    display: inline-block; padding: 4px 12px; margin-bottom: 14px;
    font-size: 11px; letter-spacing: 2px; color: var(--primary);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 999px;
}
.auth-head h1 { font-size: 22px; margin-bottom: 6px; }
.auth-head .sub { color: var(--text-sub); font-size: 13px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-sub); }
.field input {
    background: var(--bg-deep);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text);
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.field input:focus { border-color: var(--primary); }
.btn-primary {
    background: var(--gradient);
    color: #fff; border: none; border-radius: 10px;
    padding: 12px 0; font-size: 14px; font-weight: 600;
    cursor: pointer; letter-spacing: 1px;
    transition: filter .2s, transform .15s;
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ghost {
    display: inline-block;
    border: 1px solid var(--border-strong);
    border-radius: 10px; padding: 10px 22px;
    color: var(--text); text-decoration: none;
    font-size: 14px; transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--primary); background: rgba(34, 211, 238, 0.08); }
.form-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.45);
    color: #ff8a8a; border-radius: 10px;
    padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
}
.auth-tip { margin-top: 18px; text-align: center; color: var(--text-dim); font-size: 12px; line-height: 1.8; }
.upload-wrap { max-width: 560px; margin: 0 auto; }
.upload-card { max-width: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; text-align: center;
    box-shadow: var(--shadow-card);
}
.stat-num { display: block; font-size: 30px; font-weight: 700; color: var(--primary); }
.stat-card.good .stat-num { color: var(--ok); }
.stat-card.warn .stat-num { color: var(--warn); }
.stat-card.mute .stat-num { color: var(--text-sub); }
.stat-label { display: block; margin-top: 6px; color: var(--text-sub); font-size: 13px; }
.list-error { margin: 0 0 24px; }
.result-actions { display: flex; gap: 12px; justify-content: center; }
