/* ============================
   辩论计时器 · 学术专业风格
   设计定位：学术、国际化、专业、沉稳
   主色：#003366 海军蓝 | 强调色：#B8905B 典雅金
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #003366;
    --primary-light: #1a4d80;
    --primary-dark: #001f3f;
    --accent: #B8905B;
    --accent-light: #CFA874;
    --accent-dark: #9A7545;
    --bg: #F8F6F0;
    --surface: #FFFFFF;
    --text-main: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: rgba(0, 51, 102, 0.12);
    --border-accent: rgba(184, 144, 91, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 3px;
    --radius-md: 4px;
    --custom-font: inherit;
    --custom-color: #003366;
    --bg-image: none;
}

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

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', 'PingFang SC', -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    transition: background-color 0.3s ease;
}

body.has-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}
body.has-bg::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(248, 246, 240, 0.88);
    z-index: -1;
}
body.has-bg { background: transparent; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Times New Roman', 'Songti SC', serif;
    color: var(--primary);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ---------- Banner 区 ---------- */
.banner {
    background: var(--primary);
    padding: 56px 24px;
    border-bottom: 2px solid var(--accent);
}

.banner-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
}

.banner-logo {
    height: 150px;
    width: auto;
    flex-shrink: 0;
}

.banner-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.banner-title {
    font-family: 'Playfair Display', 'Times New Roman', 'Songti SC', serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 6px;
    line-height: 1.3;
    margin: 0;
}

.banner-subtitle {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1.5px;
    font-style: italic;
    margin: 0;
}

/* ---------- 导航栏 ---------- */
.navbar {
    background: var(--bg);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    text-decoration: none;
    transition: color 0.2s;
}

.navbar-brand:hover {
    color: var(--accent);
}

.lang-btn {
    background: var(--surface);
    border: 1px solid var(--border-accent);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}

.navbar-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer-topbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(184, 144, 91, 0.3);
    margin: 0 4px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: rgba(0, 51, 102, 0.08);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(184, 144, 91, 0.3);
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.navbar-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: var(--accent);
}

.admin-topbar .navbar-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(184, 144, 91, 0.3);
    color: var(--accent);
}
.admin-topbar .navbar-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: var(--accent);
}

/* ---------- 计时器展示区 ---------- */
.timer-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
}

.round-info { margin-bottom: 20px; }

#round-name {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 6px;
}

.round-position {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.timer-display { margin: 40px 0; }

#timer {
    font-size: 7rem;
    font-weight: 700;
    font-family: 'Courier New', 'SF Mono', Menlo, Consolas, monospace;
    color: var(--accent);
    letter-spacing: 6px;
    transition: color 0.3s ease;
}

#timer.warning { color: #E8A838; }
#timer.danger { color: #C0392B; animation: pulse 1s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ---------- 按钮 ---------- */
.btn {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--accent);
    background: var(--primary);
    font-family: 'Inter', 'PingFang SC', sans-serif;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.btn:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--accent-light);
}

.btn:active:not(:disabled) {
    background: var(--primary-dark);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.btn-primary {
    background: var(--primary);
    color: var(--accent);
    border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--border-accent);
}
.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: #FDF8F0;
}

.btn-warning {
    background: var(--surface);
    color: #B8860B;
    border-color: #B8860B;
}
.btn-warning:hover:not(:disabled) {
    background: #FFF8E7;
}

.btn-info {
    background: var(--surface);
    color: var(--primary);
    border-color: var(--primary);
}
.btn-info:hover:not(:disabled) {
    background: #F0F4F8;
}

.btn-danger {
    background: var(--surface);
    color: #C0392B;
    border-color: #C0392B;
}
.btn-danger:hover:not(:disabled) {
    background: #FDF0EF;
}

.btn-success {
    background: #1B5E20;
    color: #FFFFFF;
    border-color: #1B5E20;
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.82rem;
    min-width: auto;
}

.btn-wide {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
}

.btn-huge {
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 2px solid var(--accent);
}

.btn-huge:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.2);
}

/* ---------- 面板通用样式 ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
}

.panel h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ---------- 功能介绍区 ---------- */
.panel-intro { padding: 18px 20px; }

.intro-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.intro-item {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.intro-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.intro-icon { font-size: 1.6rem; margin-bottom: 4px; }

.intro-item h4 {
    color: var(--primary);
    margin: 4px 0 6px;
    font-size: 0.98rem;
    font-family: 'Inter', 'PingFang SC', sans-serif;
    font-weight: 600;
}

.intro-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.intro-item p strong {
    color: var(--accent);
    font-weight: 600;
}

.intro-item.intro-feature {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--surface) 0%, #FDF8F0 100%);
}

.intro-item.intro-feature h4 { color: var(--accent-dark); }

.intro-item.intro-feature .btn {
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ---------- 赛制选择面板 ---------- */
.panel-format-list {
    border-color: var(--border);
}

.format-row {
    align-items: center;
}

.auth-guest {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 960px) {
    .intro-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .intro-grid { grid-template-columns: 1fr; }
    .panel-intro { padding: 14px; }
    .intro-item { padding: 12px; }
}

/* ---------- 表单 ---------- */
.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.form-row label {
    min-width: 80px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-row-actions {
    justify-content: flex-start;
    margin-top: 10px;
    gap: 10px;
}

.form-control {
    flex: 1;
    min-width: 150px;
    padding: 9px 12px;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(184, 144, 91, 0.15);
}

select.form-control {
    cursor: pointer;
    height: 38px;
    min-height: 38px;
}

/* ---------- 自定义赛制环节输入 ---------- */
.custom-rounds {
    margin-top: 20px;
    padding: 15px;
    background: #FAFAF7;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.round-input-row {
    display: grid;
    grid-template-columns: 36px 400px 90px 100px 32px 32px;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
    justify-content: start;
}

.round-input-row .round-name {
    width: 100%;
    max-width: 400px;
}

.round-input-row .form-control {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.round-input-row .round-duration {
    width: 100%;
}

.round-input-row:last-child { margin-bottom: 0; }

.round-input-row .seq {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.round-duration {
    width: 100%;
    max-width: 90px;
    min-width: 70px;
    box-sizing: border-box;
}

.round-timer-type {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 38px;
    min-height: 38px;
    line-height: 1.3;
    padding: 4px 22px 4px 6px;
    font-size: 0.82rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 6px center;
    background-size: 10px 6px;
    cursor: pointer;
}

.btn-round-add,
.btn-round-remove {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    min-width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 46px;
}

.btn-round-add {
    background: var(--surface);
    color: #2E7D32;
    border: 1px solid #2E7D32;
}

.btn-round-add:hover {
    background: #F0F9F0;
}

.btn-round-remove {
    background: var(--surface);
    color: #C0392B;
    border: 1px solid #C0392B;
}

.btn-round-remove:hover {
    background: #FDF0EF;
}

.panel-custom {
    border: 1px solid var(--border-accent);
    background: var(--surface);
    padding: 25px;
    margin-bottom: 20px;
}

/* ---------- 消息提示 ---------- */
.message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    display: none;
    line-height: 1.5;
}

.message.show { display: block; }

.message-error {
    background: #FDF0EF;
    border-left: 3px solid #C0392B;
    color: #C0392B;
}

.message-success {
    background: #F0F9F0;
    border-left: 3px solid #2E7D32;
    color: #2E7D32;
}

/* ---------- 代码展示 ---------- */
.code-display {
    margin-top: 15px;
    padding: 12px 16px;
    background: var(--primary-dark);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    font-family: 'Courier New', 'SF Mono', Menlo, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    letter-spacing: 8px;
    display: none;
}

.code-display.show { display: block; }

.decode-result {
    margin-top: 15px;
    padding: 12px 16px;
    background: #FAFAF7;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.decode-result.success {
    border-left: 3px solid #2E7D32;
    color: #2E7D32;
}

.decode-result.error {
    border-left: 3px solid #C0392B;
    color: #C0392B;
}

/* ---------- 状态栏 ---------- */
.status {
    margin-top: 30px;
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ---------- 代码分享区 ---------- */
.code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px 0;
}

.code-text {
    flex: 1;
    min-height: 36px;
    padding: 8px 16px;
    background: #FAFAF7;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    font-family: 'Courier New', Menlo, Consolas, monospace;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 6px;
    color: var(--accent);
    text-align: left;
    user-select: all;
}

.code-text.has-code {
    border-color: var(--accent);
    border-style: solid;
    background: #FDF8F0;
}

.code-input {
    font-family: 'Courier New', Menlo, Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1rem;
}

input.code-input {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

/* ---------- 视觉定制区 ---------- */
.panel-customize {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.panel-customize .subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 10px;
}

.form-row-sub {
    margin-top: -8px;
    margin-bottom: 12px;
    padding-left: 8px;
}

.hint {
    font-size: 0.82rem;
    color: var(--text-light);
    font-style: italic;
}

.file-input {
    padding: 6px 10px;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.file-input::file-selector-button {
    padding: 6px 14px;
    margin-right: 10px;
    background: var(--primary);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
}

.file-input::file-selector-button:hover {
    background: var(--primary-light);
}

.color-input {
    width: 44px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    min-width: 44px;
}

.color-input:hover { border-color: var(--accent); }

.color-text {
    font-family: 'Courier New', Menlo, monospace;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    max-width: 120px;
}

.visual-status {
    display: inline-block;
    margin-left: 12px;
    font-size: 0.85rem;
    color: #2E7D32;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2px 8px;
    background: #F0F9F0;
    border-radius: var(--radius);
    min-height: 20px;
}

.visual-status.success { color: #2E7D32; opacity: 1; }
.visual-status.error { color: #C0392B; opacity: 1; background: #FDF0EF; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .container { padding: 12px; }
    .banner { padding: 24px 12px; }
    .banner-inner { flex-direction: column; text-align: center; gap: 14px; }
    .banner-logo { height: 65px; }
    .banner-title { font-size: 1.3rem; letter-spacing: 2px; }
    .banner-subtitle { font-size: 0.75rem; }
    #timer { font-size: 4rem; letter-spacing: 3px; }
    .timer-section { padding: 20px 12px; }
    .controls { gap: 8px; }
    .btn { padding: 10px 16px; font-size: 0.9rem; min-height: 44px; }
    .btn-huge { padding: 14px 28px; font-size: 1.1rem; }
    .btn-wide { width: 100%; min-height: 44px; }
    .form-row { flex-direction: column; align-items: stretch; }
    .form-row label { min-width: 100%; margin-bottom: 6px; }
    .form-control { width: 100%; min-width: 100%; }
    .round-input-row {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 8px;
    }
    .round-input-row .seq { grid-column: 1; grid-row: 1; }
    .round-input-row input:nth-child(2) { grid-column: 2; grid-row: 1; }
    .round-input-row input:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; }
    .round-input-row select { grid-column: 1 / span 2; grid-row: 3; }
    .round-input-row .btn-round-add,
    .round-input-row .btn-round-remove { grid-row: 4; margin-left: 0; }
    .round-input-row .btn-round-add { grid-column: 1; }
    .round-input-row .btn-round-remove { grid-column: 2; }
    .two-col { grid-template-columns: 1fr; gap: 12px; }
    .panel-current { flex-direction: column; padding: 16px; }
    .panel-current .current-name { font-size: 1.2rem; }
    .panel-current .current-actions { justify-content: stretch; margin-top: 12px; }
    .panel-current .btn-huge { width: 100%; }
    .panel { padding: 14px; }
    .panel-custom { padding: 14px; }
    .intro-grid { grid-template-columns: 1fr; gap: 10px; }
    .intro-item { padding: 12px; }
    .navbar { 
        padding: 0 12px; 
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }
    .navbar-brand {
        padding: 12px 0;
    }
    .hamburger-btn { 
        display: block; 
        position: absolute;
        top: 12px;
        right: 12px;
    }
    .navbar-menu {
        position: relative;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 8px 12px;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .navbar-menu.collapsed { display: none; }
    .navbar-right { gap: 6px; }
    .navbar-link { padding: 10px 12px; font-size: 0.9rem; width: 100%; text-align: left; border-radius: var(--radius); }
    .lang-btn { padding: 10px 12px; font-size: 0.85rem; width: 100%; }
    .navbar-auth { gap: 8px; flex-wrap: wrap; }
    .modal-content { width: 92%; max-width: 400px; padding: 20px; }
    .auth-tabs { gap: 4px; }
    .auth-tab { padding: 10px 12px; font-size: 0.9rem; }
    .form-row-actions { flex-direction: column; gap: 8px; }
    .form-row-actions .btn { width: 100%; }
    .code-text { font-size: 1rem; padding: 8px 12px; }
    .decode-input { font-size: 0.9rem; }
    .debate-card { padding: 14px; flex-direction: column; gap: 12px; }
    .debate-card-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .debate-card-meta { gap: 12px; }
    .debate-card-actions { justify-content: flex-start; }
    .order-row { padding: 12px; }
    .admin-topbar { padding: 0 12px; }
    .admin-main { padding: 12px; }
    .admin-table { overflow-x: auto; display: block; }
    .admin-table th, .admin-table td { padding: 8px 10px; font-size: 0.82rem; }
    .dashboard-cards { grid-template-columns: 1fr; gap: 12px; }
    .dashboard-card { padding: 14px; }
    .score-summary { grid-template-columns: 1fr; }
    .score-card { padding: 14px; }
    .payment-options { grid-template-columns: 1fr 1fr; }
    .payment-option { padding: 12px 8px; }
    .site-footer { padding: 14px 12px; font-size: 0.78rem; }
    .site-footer .footer-main { flex-direction: column; gap: 4px; }
    .site-footer .footer-sep { display: none; }
    .debates-toolbar { padding: 10px 12px; }
    .debates-toolbar-actions { flex-wrap: wrap; }
    .debates-toolbar-actions .btn { flex: 1; min-width: 45%; }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .container { padding: 20px 16px; }
    .banner { padding: 40px 20px; }
    .banner-inner { gap: 24px; }
    .banner-logo { height: 85px; }
    .banner-title { font-size: 1.8rem; letter-spacing: 4px; }
    .banner-subtitle { font-size: 0.95rem; }
    .navbar { padding: 0 16px; }
    .navbar-right { gap: 8px; }
    .navbar-link { padding: 4px 10px; font-size: 0.85rem; }
    .lang-btn { padding: 4px 10px; font-size: 0.78rem; }
    .panel { padding: 20px; }
    .panel-current { padding: 24px; gap: 20px; }
    .panel-current .current-name { font-size: 1.6rem; }
    .two-col { grid-template-columns: 1fr 1fr; gap: 16px; }
    .btn { padding: 10px 20px; font-size: 0.92rem; }
    .btn-huge { padding: 16px 32px; font-size: 1.1rem; }
    .form-control { min-width: 120px; }
    .intro-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-content { width: 85%; max-width: 460px; }
    .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
    .admin-main { padding: 20px; }
    .admin-table { font-size: 0.88rem; }
    .admin-table th, .admin-table td { padding: 10px 12px; }
    .payment-options { grid-template-columns: repeat(2, 1fr); }
    .score-summary { grid-template-columns: 1fr 1fr; }
    .site-footer { padding: 18px 20px; }
}

/* ---------- 当前赛制摘要面板 ---------- */
.panel-current {
    display: flex;
    align-items: stretch;
    gap: 24px;
    padding: 32px 36px;
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(184, 144, 91, 0.1);
}

.panel-current .current-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.panel-current .current-label {
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.panel-current .current-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px;
}

.panel-current .current-rounds {
    font-size: 1rem;
    color: var(--text-secondary);
}

.panel-current .current-code {
    font-family: 'Courier New', Menlo, Consolas, monospace;
    font-size: 0.95rem;
    color: var(--text-light);
    letter-spacing: 2px;
    margin-top: 4px;
}

.panel-current .current-actions {
    display: flex;
    align-items: center;
}

/* ---------- 双列并排布局 ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-code-load {
    border-color: var(--border-accent);
}

.panel-code-load h3 {
    color: var(--accent-dark);
}

/* ---------- 折叠面板 ---------- */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}

.collapsible-header:hover {
    color: var(--accent-dark);
}

.collapsible-icon {
    font-size: 1rem;
    color: var(--text-light);
    transition: transform 0.25s ease;
}

.collapsible-header.open .collapsible-icon {
    transform: rotate(90deg);
}

.collapsible-body {
    max-height: 2000px;
    overflow: visible;
    opacity: 1;
    padding-top: 18px;
}

/* ============================================================
   计时页（timer.html）：翻页钟风格
   ============================================================ */
body.timer-page {
    background: var(--primary-dark);
    color: #E8ECF4;
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
    font-family: 'Inter', 'PingFang SC', sans-serif;
    display: flex;
    flex-direction: column;
}

body.timer-page.has-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: -2;
}
body.timer-page.has-bg::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 31, 63, 0.85);
    z-index: -1;
}
body.timer-page.has-bg { background: transparent; }

/* 顶部信息栏 */
.timer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--primary-dark);
    border-bottom: 1px solid rgba(184, 144, 91, 0.25);
    position: sticky;
    top: 0;
    z-index: 10;
}

.timer-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer-topbar .format-name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 2px;
    white-space: nowrap;
}

.btn-back {
    background: rgba(255, 255, 255, 0.06);
    color: #C0C8D5;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(184, 144, 91, 0.2);
    transition: background 0.2s ease;
    font-size: 0.9rem;
}
.btn-back:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border-color: var(--accent);
}

.btn-reset-all {
    background: rgba(192, 57, 43, 0.12);
    color: #E8A8A0;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(192, 57, 43, 0.3);
    transition: background 0.2s ease;
    font-size: 0.9rem;
}
.btn-reset-all:hover:not(:disabled) {
    background: rgba(192, 57, 43, 0.25);
    color: #F0B0A8;
}

.timer-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-sound {
    background: rgba(184, 144, 91, 0.1);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(184, 144, 91, 0.25);
    transition: background 0.2s ease;
    font-size: 0.9rem;
}
.btn-sound:hover:not(:disabled) {
    background: rgba(184, 144, 91, 0.2);
}
.btn-sound.sound-off {
    background: rgba(255, 255, 255, 0.04);
    color: #8C97AB;
    border-color: rgba(255, 255, 255, 0.1);
}

/* 大屏展示端按钮 */
.btn-stage {
    background: linear-gradient(135deg, rgba(184, 144, 91, 0.15), rgba(184, 144, 91, 0.08));
    color: #B8905B;
    border-color: rgba(184, 144, 91, 0.3);
    font-weight: 500;
}

.btn-stage:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(184, 144, 91, 0.25), rgba(184, 144, 91, 0.15));
    border-color: rgba(184, 144, 91, 0.5);
    box-shadow: 0 2px 12px rgba(184, 144, 91, 0.2);
}

.btn-stage.btn-connected {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
    color: #4CAF50;
    border-color: rgba(76, 175, 80, 0.3);
}

.btn-stage.btn-disconnected {
    background: rgba(255, 255, 255, 0.04);
    color: #8C97AB;
    border-color: rgba(255, 255, 255, 0.1);
}

/* 双方计时器主区域 */
/* ============================================================
   计时页 - 单计时器布局
   ============================================================ */
.timer-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 32px 16px;
    flex: 1 0 auto;
}

.timer-main-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
}

/* 中央计时器 */
.timer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 48px 20px;
    background: rgba(0, 31, 63, 0.6);
    border-radius: var(--radius-md);
    border: 1px solid rgba(184, 144, 91, 0.2);
    min-width: 420px;
}

.timer-active-side {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 6px;
    font-family: 'Playfair Display', serif;
    color: #8C97AB;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.timer-active-side.side-aff { color: #E8C77B; }
.timer-active-side.side-neg { color: #7EB8DA; }

.timer-side-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8C97AB;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.timer-side-dot.dot-aff {
    background: #E8C77B;
    box-shadow: 0 0 10px rgba(232, 199, 123, 0.5);
}

.timer-side-dot.dot-neg {
    background: #7EB8DA;
    box-shadow: 0 0 10px rgba(126, 184, 218, 0.5);
}

.timer-round-name {
    font-size: 1.5rem;
    font-weight: 500;
    color: #E8ECF4;
    text-align: center;
    margin-bottom: 4px;
}

.timer-round-position {
    font-size: 0.95rem;
    color: #8C97AB;
    margin-bottom: 16px;
}

.timer-number-main {
    font-family: 'Courier New', 'SF Mono', Menlo, Consolas, monospace;
    font-size: 10rem;
    font-weight: 800;
    letter-spacing: 10px;
    color: var(--accent);
    background: var(--primary-dark);
    padding: 20px 40px;
    border: 2px solid rgba(184, 144, 91, 0.3);
    border-radius: var(--radius-md);
    line-height: 1;
    transition: color 0.3s ease, border-color 0.3s ease;
    text-shadow: 0 0 20px rgba(184, 144, 91, 0.3);
}

.timer-number-main.warning {
    color: #E8A838;
    border-color: rgba(232, 168, 56, 0.4);
}

.timer-number-main.danger {
    color: #E05050;
    border-color: rgba(224, 80, 80, 0.4);
    animation: pulse 1s infinite;
}

/* 两侧状态栏 */
.timer-side-status {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 600px;
}

/* 普通计时模式：隐藏两侧状态栏 */
.timer-main-area.mode-normal .timer-side-status {
    display: none;
}

/* 自由辩论模式：隐藏中央大计时器 */
.timer-main-area.mode-free-debate .timer-center {
    display: none;
}

/* 自由辩论模式：放大两侧状态栏，放在大计时器位置 */
.timer-main-area.mode-free-debate .timer-side-status {
    width: 100%;
    max-width: none;
    gap: 32px;
    justify-content: center;
}

.timer-main-area.mode-free-debate {
    max-width: 900px;
}

.timer-main-area.mode-free-debate .side-status {
    flex: 1;
    padding: 32px 28px;
    border: 2px solid rgba(184, 144, 91, 0.25);
    background: rgba(0, 31, 63, 0.6);
}

.timer-main-area.mode-free-debate .side-status-label {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 6px;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.timer-main-area.mode-free-debate .side-status-time {
    font-size: 7rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: var(--accent);
    background: var(--primary-dark);
    padding: 20px 36px;
    border: 2px solid rgba(184, 144, 91, 0.3);
    border-radius: var(--radius-md);
    line-height: 1;
    text-shadow: 0 0 20px rgba(184, 144, 91, 0.3);
}

.timer-main-area.mode-free-debate .side-status-round {
    font-size: 1rem;
    margin-top: 10px;
    color: #B0BAC9;
}

.timer-main-area.mode-free-debate .side-status.side-active .side-status-time {
    border-color: rgba(184, 144, 91, 0.6);
    box-shadow: 0 0 20px rgba(184, 144, 91, 0.15);
}

.timer-main-area.mode-free-debate .side-status-aff.side-active .side-status-time {
    color: #E8C77B;
    border-color: rgba(232, 199, 123, 0.5);
}

.timer-main-area.mode-free-debate .side-status-neg.side-active .side-status-time {
    color: #7EB8DA;
    border-color: rgba(126, 184, 218, 0.5);
}

.side-status {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 31, 63, 0.4);
    border-radius: var(--radius);
    border: 1px solid rgba(184, 144, 91, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.side-status.side-active {
    border-color: rgba(184, 144, 91, 0.4);
    box-shadow: 0 0 12px rgba(184, 144, 91, 0.1);
}

.side-status.side-finished {
    opacity: 0.4;
}

.side-status-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: #8C97AB;
    margin-bottom: 6px;
}

.side-status-aff .side-status-label { color: #E8C77B; }
.side-status-neg .side-status-label { color: #7EB8DA; }

.side-status-round {
    font-size: 0.85rem;
    color: #B0BAC9;
    margin-bottom: 4px;
}

.side-status-time {
    font-family: 'Courier New', Menlo, Consolas, monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #E8ECF4;
    letter-spacing: 2px;
}

/* 控制按钮 */
.timer-controls-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
}

.btn-start-main {
    padding: 16px 48px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 6px;
    background: rgba(184, 144, 91, 0.2);
    color: #B8905B;
    border: 2px solid #B8905B;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-start-main:hover {
    background: rgba(184, 144, 91, 0.35);
    box-shadow: 0 0 20px rgba(184, 144, 91, 0.2);
}

.btn-next-round {
    border-color: #7E57C2 !important;
    color: #B39DDB !important;
}

.free-debate-label {
    display: none;
    font-size: 1rem;
    font-weight: 700;
    color: #B39DDB;
    letter-spacing: 2px;
    margin-right: 6px;
    align-self: center;
}
.free-debate-label.visible {
    display: inline;
}

.btn-start-aff {
    padding: 14px 32px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: rgba(232, 199, 123, 0.15);
    color: #E8C77B;
    border: 2px solid #E8C77B;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-start-aff:hover {
    background: rgba(232, 199, 123, 0.25);
    box-shadow: 0 0 16px rgba(232, 199, 123, 0.2);
}

.btn-start-neg {
    padding: 14px 32px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: rgba(126, 184, 218, 0.15);
    color: #7EB8DA;
    border: 2px solid #7EB8DA;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-start-neg:hover {
    background: rgba(126, 184, 218, 0.25);
    box-shadow: 0 0 16px rgba(126, 184, 218, 0.2);
}

.btn-ctrl {
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

/* 环节列表触发按钮 */
.rounds-toggle-btn {
    position: absolute;
    right: 276px;
    top: 84px;
    width: 36px;
    height: 40px;
    background: rgba(0, 15, 31, 0.7);
    border: 1px solid rgba(184, 144, 91, 0.3);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--accent);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, right 0.3s ease;
    padding: 0;
    line-height: 1;
}

.rounds-toggle-btn:hover {
    background: rgba(0, 15, 31, 0.9);
}

/* 列表收缩时，按钮移到右边缘 */
.rounds-toggle-btn.rounds-btn-collapsed {
    right: 16px;
}

/* 环节列表 */
.timer-rounds-list {
    width: 260px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 15, 31, 0.5);
    border-radius: var(--radius);
    border: 1px solid rgba(184, 144, 91, 0.1);
    position: absolute;
    right: 16px;
    top: 84px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(calc(100% + 16px));
    opacity: 0;
    z-index: 6;
}

/* 鼠标悬停不再自动展开，只通过点击触发按钮控制 */
.timer-rounds-list.rounds-pinned {
    transform: translateX(0);
    opacity: 1;
}

.round-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #8C97AB;
    transition: background 0.2s ease, color 0.2s ease;
}

.round-item .round-idx {
    font-family: 'Courier New', Menlo, Consolas, monospace;
    font-weight: 700;
    text-align: center;
    color: #5C6B7F;
}

.round-item .round-nm { color: #B0BAC9; }

.round-item .round-badge {
    font-size: 0.72rem;
    padding: 2px 6px;
    background: rgba(184, 144, 91, 0.2);
    color: #B8905B;
    border-radius: 3px;
    margin-left: 6px;
    margin-right: 6px;
}

.round-item .round-dur {
    font-family: 'Courier New', Menlo, Consolas, monospace;
    text-align: right;
    color: #8C97AB;
}

.round-item.active {
    background: rgba(184, 144, 91, 0.15);
    color: #FFFFFF;
}

.round-item.active .round-idx,
.round-item.active .round-nm,
.round-item.active .round-dur { color: var(--accent); }

.round-item.done { opacity: 0.5; }
.round-item.done .round-nm { text-decoration: line-through; }

.round-item.free-debate .round-nm { color: #B8905B; }

/* 比赛结束横幅 */
.match-finished-banner {
    position: fixed;
    inset: 0;
    background: rgba(0, 31, 63, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
}

.match-finished-text {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 12px;
    animation: pulse 1.6s infinite;
}

.match-finished-sub {
    font-size: 1.2rem;
    color: #8C97AB;
    letter-spacing: 4px;
    margin-bottom: 32px;
}

.btn-return {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 2px solid var(--accent);
}

/* 计时页响应式 */
@media (max-width: 900px) {
    .timer-layout { padding: 16px; padding-right: 16px; }
    .timer-main-area { padding: 0; max-width: none; }
    .timer-rounds-list { width: 100%; min-width: auto; max-height: 200px; position: relative; right: auto; top: auto; transform: none; opacity: 1; z-index: auto; }
    .rounds-toggle-btn { display: none; }
    .timer-center { min-width: auto; padding: 24px 20px; }
    .timer-number-main { font-size: 6rem; letter-spacing: 6px; padding: 14px 24px; }
    .timer-topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
    .timer-topbar .format-name { display: none; }
    .timer-topbar-left { flex: 1; }
    .timer-topbar-right { flex: 1; justify-content: flex-end; }
    .btn-back, .btn-reset-all, .btn-sound, .btn-stage { padding: 6px 10px; font-size: 0.82rem; }
    .match-finished-text { font-size: 3rem; letter-spacing: 6px; }
    .timer-main-area.mode-free-debate .side-status-time { font-size: 4.5rem; padding: 14px 20px; letter-spacing: 4px; }
    .timer-main-area.mode-free-debate .side-status-label { font-size: 1rem; letter-spacing: 3px; }
    .timer-main-area.mode-free-debate .side-status { padding: 20px 16px; }
}

@media (max-width: 520px) {
    .timer-number-main { font-size: 4rem; letter-spacing: 4px; padding: 10px 16px; }
    .timer-center { padding: 16px 12px; }
    .timer-active-side { font-size: 1rem; letter-spacing: 3px; }
    .timer-round-name { font-size: 1.15rem; }
    .btn-start-aff, .btn-start-neg { padding: 10px 20px; font-size: 0.92rem; letter-spacing: 2px; }
    .btn-ctrl { padding: 8px 14px; font-size: 0.85rem; }
    .timer-side-status { gap: 12px; }
    .side-status { padding: 10px 12px; }
    .side-status-time { font-size: 1.2rem; }
    .timer-main-area.mode-free-debate .side-status-time { font-size: 3rem; padding: 8px 12px; letter-spacing: 2px; }
    .timer-main-area.mode-free-debate .side-status-label { font-size: 0.9rem; letter-spacing: 2px; }
    .timer-main-area.mode-free-debate .side-status { padding: 14px 10px; }
    .timer-main-area.mode-free-debate .timer-side-status { gap: 12px; }
}

/* ---------- 用户认证 ---------- */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.auth-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.auth-user {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-quota {
    color: var(--accent-dark);
    background: #FDF8F0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-accent);
}

.auth-quota-premium {
    color: var(--primary);
    background: #F0F4F8;
    border-color: var(--border);
}

.payment-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 10px 0 20px 0;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.payment-option {
    padding: 16px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.payment-option small {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-option:hover {
    border-color: var(--accent);
    background: #FDF8F0;
}

.payment-option.active {
    border-color: var(--accent);
    background: #FDF8F0;
}

.order-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.order-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.order-no {
    font-size: 0.9rem;
    color: var(--text-main);
    font-family: 'Courier New', monospace;
}

.order-meta {
    font-size: 0.85rem;
    color: var(--primary);
}

.order-dates {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ---------- 弹窗 ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 31, 63, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    border: 1px solid var(--border);
    position: relative;
    color: var(--text-main);
    line-height: 1.7;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-content p {
    color: var(--text-main);
    font-size: 1rem;
    margin: 12px 0;
}

.modal-content ul {
    color: var(--text-secondary);
    padding-left: 24px;
    margin: 16px 0;
}

.modal-content ul li {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1rem;
}

.modal-content ul li strong,
.modal-content ul li b {
    color: var(--primary);
}

.modal-content .payment-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.modal-close:hover {
    background: #F0F0EC;
    color: var(--text-main);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.auth-tab:hover { color: var(--text-secondary); }

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.auth-form { animation: fadeIn 0.3s ease; }

.forgot-password-link {
    color: var(--accent);
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}
.forgot-password-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.forgot-hint {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

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

#auth-message {
    margin-top: 16px;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* ============================================================
   后台管理页面样式
   ============================================================ */
body.admin-page {
    background: var(--bg);
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--primary);
    border-bottom: 2px solid var(--accent);
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #FFFFFF;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.admin-topbar .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 2px;
    text-decoration: none;
    transition: color 0.2s;
}

.admin-topbar .navbar-brand:hover {
    color: var(--accent);
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-topbar-right .btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(184, 144, 91, 0.3);
    color: var(--accent);
}
.admin-topbar-right .btn:hover {
    background: rgba(255,255,255,0.18);
}
.admin-topbar-right .btn-danger {
    border-color: rgba(192, 57, 43, 0.5);
    color: #E8A8A0;
}

.admin-topbar-user {
    font-size: 0.92rem;
    color: #C0C8D5;
}

.admin-main {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-login {
    max-width: 420px;
    margin: 60px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 28px;
}

.admin-login h2 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.3rem;
    color: var(--primary);
}

.admin-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.admin-hint code {
    background: #F0F0EC;
    padding: 2px 6px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--accent-dark);
}

.form-field { margin-bottom: 14px; }

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
}

.form-field input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Tab 导航 */
.admin-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
}

.admin-tab:hover { color: var(--text-main); }
.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.admin-tab-pane { display: none; }
.admin-tab-pane.active { display: block; }

/* 筛选栏 */
.admin-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.admin-filters input,
.admin-filters select {
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: inherit;
    min-width: 160px;
}

.admin-filters input:focus,
.admin-filters select:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-count {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: auto;
}

/* 表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table thead { background: #F0F0EC; }

.admin-table th {
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 14px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:hover td { background: #FAFAF7; }
.admin-table tr:last-child td { border-bottom: none; }

.admin-table-condensed th,
.admin-table-condensed td {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* 状态徽章 */
.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.admin-badge-pending { background: #FDF8F0; color: var(--accent-dark); }
.admin-badge-paid { background: #F0F9F0; color: #2E7D32; }
.admin-badge-active { background: #F0F4F8; color: var(--primary); }
.admin-badge-banned { background: #FDF0EF; color: #C0392B; }

/* 空状态 */
.admin-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

/* 弹窗 */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 31, 63, 0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding: 40px 20px;
    overflow-y: auto;
}

.admin-modal.admin-modal-open { display: flex; }

.admin-modal-body {
    width: 100%;
    max-width: 1100px;
    background: var(--surface);
    border-radius: var(--radius-md);
    position: relative;
    padding: 24px 28px;
    border: 1px solid var(--border);
}

.admin-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.admin-modal-close:hover {
    background: #F0F0EC;
    color: var(--text-main);
}

.admin-modal-loading {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.admin-detail-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.admin-detail-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.admin-detail-section h3 {
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 14px;
    margin-top: 0;
}

.admin-detail-section h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 12px;
}

.guide-editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid rgba(0, 51, 102, 0.15);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.guide-editor-toolbar .btn {
    min-width: 36px;
    padding: 4px 8px;
    font-size: 0.85rem;
}
.guide-editor {
    min-height: 400px;
    padding: 16px;
    border: 1px solid rgba(0, 51, 102, 0.15);
    border-radius: 0 0 4px 4px;
    background: var(--surface);
    outline: none;
    line-height: 1.8;
    color: var(--text-main);
    overflow-y: auto;
}
.guide-editor:focus {
    border-color: var(--accent);
}
.guide-editor h2 {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-top: 24px;
}
.guide-editor h3 {
    color: var(--primary);
    margin-top: 16px;
}
.guide-editor ul, .guide-editor ol {
    padding-left: 24px;
}
.guide-editor .guide-contact {
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    padding: 24px 28px;
    margin-top: 32px;
}
.guide-editor .guide-contact h2 {
    color: var(--accent);
    border-left: none;
    padding-left: 0;
}
.guide-editor .guide-contact a {
    color: var(--accent);
}
.guide-source-editor textarea {
    resize: vertical;
}

.admin-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.admin-meta-item {
    background: #FAFAF7;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    border: 1px solid var(--border);
}

.admin-meta-item span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-detail-actions { margin-top: 12px; }

.admin-speech-list {
    background: #FAFAF7;
    border-radius: var(--radius);
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.admin-speech-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.admin-speech-item:last-child { border-bottom: none; }

.admin-speech-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-speech-meta .admin-badge { font-size: 0.72rem; }

.admin-speech-transcript {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-placeholder-block {
    background: #FAFAF7;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.admin-placeholder-title {
    font-size: 0.92rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.admin-placeholder-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.admin-placeholder-content { margin-top: 8px; font-size: 0.85rem; }

.admin-placeholder-content pre {
    background: var(--primary-dark);
    color: var(--accent);
    padding: 12px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: 'Courier New', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-mt { margin-top: 14px; }

.admin-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    z-index: 2000;
    animation: admin-toast-in 0.2s ease-out;
}

@keyframes admin-toast-in {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.admin-toast-success { background: #F0F9F0; color: #2E7D32; border: 1px solid #2E7D32; }
.admin-toast-error { background: #FDF0EF; color: #C0392B; border: 1px solid #C0392B; }

.admin-mono {
    font-family: 'Courier New', Menlo, Consolas, monospace;
    font-size: 0.85rem;
    background: #FAFAF7;
    padding: 2px 6px;
    border-radius: var(--radius);
    color: var(--accent-dark);
}

.admin-muted { color: var(--text-secondary); font-size: 0.88rem; }
.admin-muted.small { font-size: 0.78rem; }

/* ---------- 评分卡片 ---------- */
.score-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 14px 0;
}

.score-card {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.score-card h4 { margin: 0 0 6px; font-size: 1rem; }

.score-card .score-total {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 4px 0 6px;
    font-family: 'Courier New', monospace;
}

.score-card.pro { border-left: 4px solid var(--primary); }
.score-card.pro .score-total { color: var(--primary); }
.score-card.con { border-left: 4px solid var(--accent); }
.score-card.con .score-total { color: var(--accent); }

.arg-list { padding-left: 22px; line-height: 1.7; }
.arg-list li { margin-bottom: 6px; }

/* ---------- 反馈卡片 ---------- */
.feedback-card { background: #F8F9FA; border-radius: 8px; padding: 16px 20px; }
.feedback-input { width: 100%; padding: 8px 12px; border: 1px solid #D0D7DE; border-radius: 4px; font-size: 0.9rem; margin-bottom: 8px; box-sizing: border-box; }
.feedback-textarea { width: 100%; padding: 8px 12px; border: 1px solid #D0D7DE; border-radius: 4px; font-size: 0.9rem; margin-bottom: 8px; resize: vertical; box-sizing: border-box; font-family: inherit; }
.feedback-msg { margin-left: 12px; font-size: 0.88rem; }

/* ---------- 录音状态条 ---------- */
.recording-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: var(--primary-dark);
    border-bottom: 2px solid var(--accent);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
}

.recording-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #C0392B;
    display: inline-block;
    animation: recording-pulse 1.2s infinite;
}

.recording-indicator.idle {
    background: #5C6B7F;
    animation: none;
}

.recording-indicator.recording {
    background: #C0392B;
    animation: recording-pulse 1.2s infinite;
}

@keyframes recording-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.recording-text {
    color: #C0C8D5;
    font-weight: 500;
    min-width: 200px;
}

.recording-text.active {
    color: var(--accent);
    font-weight: 700;
}

.recording-duration {
    color: #8C97AB;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin-left: auto;
}

/* ---------- 麦克风测试弹窗 ---------- */
.mic-intro {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 12px 0 20px 0;
    font-size: 1rem;
}

.mic-status {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #FAFAF7;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.mic-status-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.mic-status-text {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
}

.mic-meter-container { margin-bottom: 20px; }

.mic-meter-bg {
    width: 100%;
    height: 18px;
    background: #F0F0EC;
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.mic-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E7D32 0%, var(--accent) 60%, #C0392B 100%);
    transition: width 0.08s ease-out;
    border-radius: 9px;
}

.mic-meter-label {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
}

.mic-hints {
    background: #F0F4F8;
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.mic-hint-item {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 0.95rem;
    padding-left: 8px;
}

.mic-hint-icon { margin-right: 8px; }

.modal-content .mic-intro,
.modal-content .payment-note {
    color: var(--text-secondary);
}

/* ---------- 我的辩论列表页 ---------- */
.debates-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.debates-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.debates-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.debates-toolbar-actions {
    display: flex;
    gap: 8px;
}

.debates-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.debates-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding: 12px 0;
}

.debates-page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.debate-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    cursor: pointer;
    transition: border-color 0.2s;
    border: 1px solid var(--border);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.debate-card:hover {
    border-color: var(--accent);
}

.debate-checkbox {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.debate-card-body {
    flex: 1;
    min-width: 0;
}

.debate-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.debate-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.debate-status {
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.debate-status.status-created { background: #F0F0EC; color: var(--text-secondary); }
.debate-status.status-progress { background: #F0F4F8; color: var(--primary); }
.debate-status.status-completed { background: #F0F9F0; color: #2E7D32; }
.debate-status.status-analysed { background: #FDF8F0; color: var(--accent-dark); }

.debate-card-meta {
    display: flex;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.debate-format-code {
    display: inline-block;
    background: rgba(184, 144, 91, 0.1);
    color: var(--accent);
    border: 1px solid rgba(184, 144, 91, 0.3);
    border-radius: 4px;
    padding: 1px 8px;
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.debate-card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ---------- 我的比赛记录弹窗条目 ---------- */
.debate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.debate-row:hover {
    border-color: var(--accent);
}

.debate-row:last-child {
    margin-bottom: 0;
}

.debate-main {
    flex: 1;
    min-width: 0;
}

.debate-main .debate-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.debate-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.debate-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .admin-topbar { padding: 0 16px; flex-direction: column; gap: 10px; align-items: flex-start; height: auto; padding-top: 10px; padding-bottom: 10px; }
    .admin-main { padding: 16px; }
    .admin-login { margin: 30px auto; padding: 24px 20px; }
    .admin-meta-grid { grid-template-columns: 1fr; }
    .admin-table { font-size: 0.82rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    .admin-filters input, .admin-filters select { min-width: 140px; }
    .admin-modal { padding: 20px 10px; }
    .admin-modal-body { padding: 18px 16px; }
    .score-summary { grid-template-columns: 1fr; }
}

/* ============================================================
   打印 / PDF 导出样式
   ============================================================ */
@media print {
    @page {
        size: A4 portrait;
        margin: 20mm 18mm 28mm 18mm;
    }

    body {
        background: #FFFFFF !important;
        color: #222222 !important;
        font-size: 11pt;
        line-height: 1.6;
    }

    body::before,
    body::after {
        display: none !important;
    }

    .admin-topbar,
    .no-print,
    .btn,
    .lang-btn,
    .modal,
    .admin-modal {
        display: none !important;
    }

    .admin-main {
        padding: 0 !important;
        max-width: 100% !important;
    }

    a {
        color: #003366 !important;
        text-decoration: none !important;
    }

    table {
        page-break-inside: avoid;
    }

    .admin-detail-section {
        page-break-inside: avoid;
        border-bottom: 1px solid #d0d7de !important;
    }

    .score-card {
        page-break-inside: avoid;
    }

    .score-summary {
        page-break-inside: avoid;
    }

    .admin-table {
        page-break-inside: avoid;
    }

    .admin-table th {
        background: #eaf3fb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .score-card.pro {
        border-left: 4px solid #003366 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .score-card.con {
        border-left: 4px solid #B8905B !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .node-title {
        background: #F0F4F8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-banner {
        display: block !important;
        text-align: center;
        padding: 30px 20px 20px;
        border-bottom: 3px solid #B8905B;
        margin-bottom: 24px;
    }

    .print-banner-logo {
        height: 80px;
        margin-bottom: 12px;
    }

    .print-banner-title {
        font-family: 'Playfair Display', 'Times New Roman', serif;
        font-size: 22pt;
        font-weight: 700;
        color: #003366;
        letter-spacing: 4px;
        margin-bottom: 6px;
    }

    .print-banner-slogan {
        font-family: 'Playfair Display', 'Times New Roman', serif;
        font-size: 10pt;
        color: #666666;
        font-style: italic;
        letter-spacing: 1px;
        margin-bottom: 4px;
    }

    .print-banner-report-title {
        font-family: 'Inter', 'PingFang SC', sans-serif;
        font-size: 14pt;
        font-weight: 600;
        color: #B8905B;
        margin-top: 16px;
        letter-spacing: 2px;
    }

    .print-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #d0d7de;
        padding: 6px 0;
        margin-bottom: 12px;
        font-size: 9pt;
        color: #666666;
    }

    .print-header-logo {
        height: 24px;
    }

    .print-header-topic {
        font-weight: 500;
        color: #003366;
    }

    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 8pt;
        color: #999999;
        padding: 8px 0;
    }

    .print-footer-line1 {
        margin-bottom: 2px;
    }

    .print-footer-line2 {
        color: #003366;
        font-weight: 500;
    }
}

.print-banner,
.print-header,
.print-footer {
    display: none;
}

/* ============================
   页脚样式
   ============================ */

.site-footer {
    background: var(--primary);
    border-top: 2px solid var(--accent);
    padding: 20px 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.8;
    margin-top: auto;
}

.site-footer .footer-inner {
    max-width: 960px;
    margin: 0 auto;
}

.site-footer .footer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.site-footer .footer-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.site-footer .footer-sep {
    color: rgba(184, 144, 91, 0.5);
    margin: 0 4px;
    font-size: 0.8rem;
}

.site-footer .footer-link {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.site-footer .footer-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.site-footer .footer-sub {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer .footer-icp,
.site-footer .footer-extra {
    font-size: 0.78rem;
}

.site-footer.site-footer-dark {
    background: #001a33;
    border-top-color: rgba(184, 144, 91, 0.4);
}

@media (max-width: 768px) {
    .site-footer {
        padding: 16px 20px;
        font-size: 0.78rem;
    }

    .site-footer .footer-main {
        flex-direction: column;
        gap: 4px;
    }

    .site-footer .footer-sep {
        display: none;
    }
}

@media print {
    .site-footer {
        display: none;
    }
}

/* ============================
   仪表盘卡片
   ============================ */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    text-align: center;
}

.dashboard-card-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.dashboard-card-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.dashboard-card-sub {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================
   分页
   ============================ */

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-ellipsis {
    padding: 0 6px;
    color: var(--text-secondary);
}

/* ============================
   维护模块
   ============================ */

.maintenance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.maintenance-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: var(--primary);
}

.maintenance-item-info p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ============================
   按钮补充
   ============================ */

.btn-success {
    background: #4CAF50;
    color: #fff;
    border: 1px solid #4CAF50;
}

.btn-success:hover {
    background: #43a047;
}

.btn-info {
    background: var(--primary);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-info:hover {
    background: var(--primary-dark);
}

.btn-warning {
    background: #f0ad4e;
    color: #fff;
    border: 1px solid #f0ad4e;
}

.btn-warning:hover {
    background: #ec971f;
}

/* ============================
   评分卡片（管理后台）
   ============================ */

.score-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
}

.score-card {
    text-align: center;
    padding: 20px 32px;
    border-radius: var(--radius-sm);
    min-width: 160px;
}

.score-card-aff {
    background: rgba(0, 51, 102, 0.08);
    border: 2px solid var(--primary);
}

.score-card-neg {
    background: rgba(184, 144, 91, 0.08);
    border: 2px solid var(--accent);
}

.score-card-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.score-card-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.score-card-neg .score-card-value {
    color: var(--accent);
}

.score-card-vs {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.score-comments {
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(0, 51, 102, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.score-comment {
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
}

.score-comment:last-child {
    margin-bottom: 0;
}

.score-details {
    margin-top: 12px;
}

.score-details summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--accent);
    padding: 4px 0;
}

.score-details pre {
    margin-top: 8px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.report-preview {
    margin-top: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.report-preview h5 {
    margin: 0 0 8px 0;
    color: var(--primary);
    font-size: 0.95rem;
}

.report-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.report-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.admin-mt {
    margin-top: 16px;
}

.admin-placeholder-hint {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-style: italic;
}
