/* ============================================================
   鑫鸿教学网 · 简约白色主题（用于申请/备案审核）
   设计 Token：白底 + 中性灰 + 单一蓝色强调，禁用紫粉渐变、禁用 emoji 图标
   说明：仅页面框架走白底；直播间舞台为视频画面，保留深色蒙版以保证文字可读
   ============================================================ */
:root {
    --bg: #FFFFFF;          /* 页面主背景 */
    --bg-soft: #F4F6F9;     /* 浅灰区块 / 聊天区 */
    --surface: #FFFFFF;     /* 卡片表面 */
    --surface-2: #FAFBFC;   /* 次级表面 / 输入区 */
    --text: #1F2329;        /* 主文字 */
    --text-2: #4B5563;      /* 次文字 */
    --text-muted: #8A9099;  /* 弱文字 / 分隔 */
    --border: #E5E7EB;      /* 常规描边 */
    --border-2: #DCE0E6;    /* 略强调描边 */
    --accent: #2F6FE0;      /* 蓝色强调（按钮/链接/焦点） */
    --accent-dark: #1E57C0;
    --accent-soft: #EEF3FD;
    --live-red: #E5484D;    /* 直播标记 */
    --r: 14px;
    --r-sm: 8px;
    --r-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06);
    --shadow: 0 6px 20px rgba(16, 24, 40, .08);
    --shadow-strong: 0 12px 32px rgba(16, 24, 40, .12);
    --t: .2s ease;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif; color: var(--text); line-height: 1.6; }

/* 顶部导航：白底深字 */
.navbar.navbar-white.navbar-fixed-top {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.navbar .navbar-brand {
    color: var(--text) !important; font-weight: 700; letter-spacing: 1px; font-size: 18px;
}
.navbar .navbar-brand:before {
    content: "\f001"; font-family: "FontAwesome"; margin-right: 8px; color: var(--accent);
}
.navbar .navbar-nav > li > a { color: var(--text-2) !important; transition: color var(--t); font-size: 15px; }
.navbar .navbar-nav > li > a:hover,
.navbar .navbar-nav > li > a:focus { color: var(--accent) !important; }
.navbar .navbar-toggle .icon-bar { background: var(--text-2); }

/* 通用区块 */
.xh-section { padding: 44px 0 12px; }
.xh-section-title {
    display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px;
    padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.xh-section-title h2 { font-size: 24px; margin: 0; color: var(--text); letter-spacing: .5px; font-weight: 700; }
.xh-section-title .xh-sub { color: var(--text-muted); font-size: 14px; }

/* Hero 主视觉：白底浅灰，干净 */
.xh-hero {
    background: var(--bg-soft);
    color: var(--text); border-bottom: 1px solid var(--border);
    padding: 72px 0 64px; position: relative; overflow: hidden; text-align: center;
}
.xh-hero .container { position: relative; z-index: 2; }
.xh-hero-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px;
    border: 1px solid var(--border-2); border-radius: 999px; background: #fff;
    color: var(--text-2); font-size: 14px; letter-spacing: .5px; margin-bottom: 20px;
}
.xh-hero-badge i { font-size: 13px; color: var(--accent); }
.xh-hero h1 { font-size: 42px; line-height: 1.2; letter-spacing: 2px; margin: 0 0 14px; color: var(--text); font-weight: 800; }
.xh-hero h1 .xh-gold { color: var(--accent); }
.xh-hero-sub { max-width: 680px; margin: 0 auto; color: var(--text-2); font-size: 16px; line-height: 1.9; }
.xh-hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.xh-btn-gold {
    display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff;
    padding: 12px 28px; border-radius: var(--r-sm); font-weight: 600; font-size: 15px; text-decoration: none;
    transition: background var(--t), transform var(--t);
}
.xh-btn-gold:hover { background: var(--accent-dark); text-decoration: none; color: #fff; transform: translateY(-2px); }
.xh-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px; color: var(--text-2);
    padding: 12px 28px; border: 1px solid var(--border-2); border-radius: var(--r-sm);
    text-decoration: none; font-size: 15px; background: #fff; transition: border-color var(--t), color var(--t);
}
.xh-btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* 直播网格 */
.xh-live-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 1000px) { .xh-live-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .xh-live-grid { grid-template-columns: 1fr; } }
.xh-live-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
    overflow: hidden; box-shadow: var(--shadow); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    display: flex; flex-direction: column;
}
.xh-live-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-strong); border-color: var(--border-2); }
.xh-live-cover { position: relative; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.xh-live-cover:after {
    content: "\f03d"; font-family: "FontAwesome"; position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center; font-size: 56px; color: rgba(47, 111, 224, .08);
}
.xh-live-cover img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.xh-live-card:hover .xh-live-cover img { transform: scale(1.04); }
.xh-live-badge {
    position: absolute; left: 12px; top: 12px; z-index: 3; background: var(--live-red); color: #fff;
    font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; letter-spacing: 1px;
    display: inline-flex; align-items: center; gap: 5px;
}
.xh-live-badge:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: xh-blink 1.3s infinite; }
.xh-live-viewers {
    position: absolute; right: 12px; bottom: 12px; z-index: 3; background: rgba(255, 255, 255, .9);
    color: var(--text); font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
    display: flex; align-items: center; gap: 5px;
}
.xh-live-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.xh-live-anchor-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xh-live-anchor {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 17px; font-weight: 700; color: var(--text);
}
.xh-live-anchor i { color: var(--accent); font-size: 18px; }
.xh-live-enter {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto;
    color: #fff; background: var(--accent); padding: 10px 14px; border-radius: var(--r-sm);
    font-size: 14px; font-weight: 600; text-decoration: none; transition: background var(--t);
}
.xh-live-enter:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }

/* 直播间布局：深色主题，参考常见直播产品 */
.xh-room {
    display: grid; grid-template-columns: 1fr 360px; gap: 16px; margin-top: 20px;
}
@media (max-width: 900px) { .xh-room { grid-template-columns: 1fr; } }
.xh-room-main {
    background: #141416; border: 1px solid #2a2a2e; border-radius: var(--r); overflow: hidden;
    display: flex; flex-direction: column;
}
.xh-room-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #1a1a1e; border-bottom: 1px solid #2a2a2e;
}
.xh-room-anchor { display: flex; align-items: center; gap: 12px; }
.xh-room-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.xh-room-meta { display: flex; flex-direction: column; gap: 3px; }
.xh-room-name {
    color: #fff; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
}
.xh-room-live {
    background: var(--live-red); color: #fff; font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 4px; letter-spacing: .5px; display: inline-flex; align-items: center; gap: 4px;
}
.xh-room-live .xh-dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: xh-blink 1.3s infinite; }
@keyframes xh-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.xh-room-title { color: rgba(255, 255, 255, .55); font-size: 13px; }
.xh-room-viewers { color: rgba(255, 255, 255, .55); font-size: 13px; }

.xh-stage {
    background: #0a0a0c; position: relative; aspect-ratio: 16 / 9; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.xh-stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0a0a0c; z-index: 0; }
.xh-stage-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 12, .15), rgba(10, 10, 12, .45)); z-index: 1; }
.xh-danmaku-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.xh-danmaku { position: absolute; left: 100%; white-space: nowrap; color: #fff; font-size: 14px; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); will-change: transform; animation-name: xh-danmaku-move; animation-timing-function: linear; animation-fill-mode: forwards; }
.xh-danmaku-gift { color: #ff7a8a; font-weight: 700; }
@keyframes xh-danmaku-move { from { transform: translateX(0); } to { transform: translateX(-120vw); } }

/* 声音开关（默认静音自动播放，点击开启声音） */
.xh-sound-btn {
    position: absolute; right: 14px; bottom: 14px; z-index: 6;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px;
    background: rgba(10, 10, 12, .55); color: #fff; font-size: 13px; cursor: pointer;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    transition: background var(--t), border-color var(--t);
}
.xh-sound-btn:hover { background: rgba(10, 10, 12, .8); border-color: rgba(255, 255, 255, .5); }
.xh-sound-btn i { font-size: 15px; }
.xh-sound-btn.on { background: rgba(255, 95, 109, .85); border-color: rgba(255, 95, 109, .95); }
.xh-sound-btn.on:hover { background: rgba(255, 95, 109, .95); }

/* 礼物区 */
.xh-gift-bar { padding: 16px 18px; background: #141416; border-top: 1px solid #2a2a2e; }
.xh-gift-title { color: rgba(255, 255, 255, .45); font-size: 13px; margin-bottom: 12px; }
.xh-gift-list { display: flex; flex-wrap: wrap; gap: 10px; }
.xh-gift-btn {
    display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
    border: 1px solid #2f2f35; border-radius: 12px; padding: 11px 14px; cursor: pointer;
    background: #1e1e22; color: rgba(255, 255, 255, .8); transition: all var(--t); min-width: 72px;
}
.xh-gift-btn:hover { border-color: #ff5f6d; background: #2a2224; color: #fff; }
.xh-gift-btn i { font-size: 20px; color: #ff7a8a; }
.xh-gift-btn span { font-size: 13px; }
.xh-gift-btn small { font-size: 11px; color: rgba(255, 255, 255, .45); }
.xh-gift-float {
    position: absolute; right: 24px; top: 24px; color: #fff; font-weight: 700; font-size: 15px;
    animation: xh-float 1.6s ease-out forwards; pointer-events: none; z-index: 5;
    display: flex; align-items: center; gap: 6px; text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
@keyframes xh-float { 0% { opacity: 0; transform: translateY(10px) scale(.85); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-64px) scale(1.1); } }

/* 聊天区 */
.xh-chat { background: #141416; border: 1px solid #2a2a2e; border-radius: var(--r); display: flex; flex-direction: column; height: 600px; }
@media (max-width: 900px) { .xh-chat { height: 520px; } }
.xh-chat-head { padding: 14px 18px; border-bottom: 1px solid #2a2a2e; font-weight: 700; color: rgba(255, 255, 255, .85); font-size: 15px; }
.xh-chat-list { flex: 1; overflow-y: auto; padding: 14px 16px; background: #101012; }
.xh-msg { margin-bottom: 14px; display: flex; gap: 10px; font-size: 13px; line-height: 1.5; word-break: break-word; color: rgba(255, 255, 255, .85); }
.xh-msg-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px;
}
.xh-msg-avatar.xh-avatar-1 { background: #ef4444; }
.xh-msg-avatar.xh-avatar-2 { background: #f97316; }
.xh-msg-avatar.xh-avatar-3 { background: #eab308; }
.xh-msg-avatar.xh-avatar-4 { background: #22c55e; }
.xh-msg-avatar.xh-avatar-5 { background: #06b6d4; }
.xh-msg-avatar.xh-avatar-6 { background: #3b82f6; }
.xh-msg-avatar.xh-avatar-7 { background: #a855f7; }
.xh-msg-body { display: flex; flex-direction: column; gap: 3px; }
.xh-msg-user { color: rgba(255, 255, 255, .55); font-size: 12px; }
.xh-msg-user .xh-name { color: #ff7a8a; font-weight: 600; margin-right: 6px; }
.xh-msg-time { color: rgba(255, 255, 255, .35); }
.xh-msg-text { color: rgba(255, 255, 255, .85); }
.xh-msg.xh-msg-system .xh-msg-text { color: rgba(255, 255, 255, .45); font-style: italic; }
.xh-msg.xh-msg-gift .xh-msg-text { color: #ffd479; font-weight: 600; }
.xh-msg-gift .xh-msg-text i { color: #ff7a8a; }
.xh-chat-input { padding: 12px 14px; border-top: 1px solid #2a2a2e; display: flex; gap: 8px; background: #1a1a1e; }
.xh-chat-input input { flex: 1; border: 1px solid #2f2f35; border-radius: 8px; padding: 9px 12px; outline: none; background: #101012; color: #fff; }
.xh-chat-input input::placeholder { color: rgba(255, 255, 255, .35); }
.xh-chat-input input:focus { border-color: #ff5f6d; }
.xh-chat-input button {
    border: 0; background: #ff5f6d; color: #fff; font-weight: 600;
    padding: 9px 20px; border-radius: 8px; cursor: pointer; transition: background var(--t);
}
.xh-chat-input button:hover { background: #ff4a5a; }
.xh-chat-input button:disabled { opacity: .6; cursor: not-allowed; }
.xh-chat-tip { padding: 12px 14px; color: rgba(255, 255, 255, .45); font-size: 13px; background: #1a1a1e; border-top: 1px solid #2a2a2e; }
.xh-chat-tip a { color: #ff7a8a; }

.xh-room-back { margin: 16px 0 30px; }
.xh-room-back a { color: var(--text-2); text-decoration: none; font-size: 14px; }
.xh-room-back a:hover { color: var(--accent); }

/* 用户协议 */
.xh-agreement-main { margin-bottom: 6px; }
.xh-agreement-main-card {
    flex-direction: row; align-items: center; gap: 24px; padding: 28px;
    border-left: 4px solid var(--accent);
}
.xh-agreement-main-card .xh-a-icon {
    width: 68px; height: 68px; border-radius: 16px; font-size: 28px; flex-shrink: 0;
}
.xh-agreement-main-body { flex: 1; min-width: 0; }
.xh-agreement-main-body h3 { font-size: 20px; margin: 0 0 8px; }
.xh-agreement-main-body p { font-size: 14px; margin: 0 0 14px; color: var(--text-2); line-height: 1.75; }
@media (max-width: 640px) {
    .xh-agreement-main-card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
    .xh-agreement-main-card .xh-a-icon { width: 56px; height: 56px; font-size: 24px; }
}
.xh-agreement-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.xh-agreement-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px;
    box-shadow: var(--shadow); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    display: flex; flex-direction: column; gap: 12px;
}
.xh-agreement-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); border-color: var(--border-2); }
.xh-agreement-card .xh-a-icon {
    width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
    color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.xh-agreement-card h3 { margin: 0; font-size: 17px; color: var(--text); font-weight: 600; }
.xh-agreement-card p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.7; flex: 1; }
.xh-agreement-card a { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.xh-agreement-card a:hover { text-decoration: underline; }
.xh-agreement-detail { max-width: 840px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 34px 38px; box-shadow: var(--shadow); }
.xh-agreement-detail h1 { color: var(--text); font-size: 26px; margin: 0 0 8px; font-weight: 700; }
.xh-agreement-detail .xh-ad-summary { color: var(--text-2); margin-bottom: 24px; font-size: 15px; border-left: 3px solid var(--accent); padding-left: 12px; }
.xh-agreement-detail .xh-ad-body p { line-height: 1.95; margin: 0 0 14px; color: var(--text-2); font-size: 15px; }

/* 页脚：统一黑底白字，覆盖 frontend.css 中 .copyright 的独立深灰背景 */
footer.footer {
    background: #000;
    color: #fff;
    padding: 24px 0;
    margin-top: 40px;
    text-align: center;
}
footer.footer .copyright {
    background: transparent;
    color: #fff;
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}
footer.footer .copyright a {
    color: #fff;
    text-decoration: none;
}
footer.footer .copyright a:hover {
    text-decoration: underline;
}
footer.footer .footer-sep {
    color: rgba(255,255,255,.5);
    margin: 0 10px;
}
footer.footer .copyright-tip {
    background: transparent;
    color: rgba(255,255,255,.7);
    font-size: 12px;
    margin: 8px auto 0;
    max-width: 760px;
    text-align: center;
}

/* 通用容器微调 */
.content { min-height: calc(100vh - 140px); }

/* 移动端：公司全称较长，缩小导航与 Hero 字号避免溢出/折行难看 */
@media (max-width: 767px) {
    .navbar .navbar-brand { font-size: 15px; letter-spacing: 0; }
    .navbar .navbar-brand:before { margin-right: 5px; }
    .xh-hero h1 { font-size: 25px; letter-spacing: 1px; }
    .xh-hero-sub { font-size: 14px; }
}
