/* ================================================
   人教培训服务 - Claude 浅色优雅主题 (Mobile First)
   ================================================ */

:root {
    --bg-primary: #fdfcf5;
    --bg-surface: #ffffff;
    --border: #e8e6df;
    --border-focus: #d8785e;
    --text-primary: #2d2825;
    --text-secondary: #6e6b66;
    --text-muted: #a3a09b;
    --accent: #d8785e;
    --accent-hover: #c4664c;
    --accent-glow: rgba(216, 120, 94, 0.15);
    --success: #4a8b5e;
    --error: #cc4f4f;
    --font-serif: -apple-system, BlinkMacSystemFont, "Songti SC", "SimSun", "STSong", "Noto Serif SC", Georgia, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --radius-lg: 24px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

html, body {
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* ==================== 居中容器 ==================== */
.centered-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 60px;
    width: 100%;
    min-width: 0;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ==================== 核心提示区域 ==================== */
.prompt-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.main-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ==================== 文本排版 ==================== */
h1#main-prompt {
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

p#sub-prompt {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

/* ==================== 输入区域 ==================== */
.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    position: absolute;
}

#user-input {
    width: 100%;
    padding: 22px 28px;
    padding-right: 60px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 19px;
    font-family: var(--font-sans);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
}

#user-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
}

#user-input::placeholder {
    color: var(--text-muted);
}

#user-input:disabled {
    background: #f5f4ef;
    color: var(--text-secondary);
    cursor: not-allowed;
}

.unified-input {
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 17px;
    font-family: var(--font-sans);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type="number"] {
    -moz-appearance: textfield;
}

.unified-input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
}

.unified-input::placeholder {
    color: var(--text-muted);
}

#resend-btn {
    position: absolute;
    right: 68px; /* 位于右箭头左侧 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--accent);
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 6px;
}

#resend-btn:hover:not(:disabled) {
    background: rgba(216, 120, 94, 0.1);
}

#resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    background: none;
}

#send-btn {
    position: absolute;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: 44px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: var(--bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#send-btn:hover:not(:disabled) {
    background: #e3866d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 120, 94, 0.3);
}

#send-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: none;
}

#send-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==================== 选项按钮（学段/学科等） ==================== */
.choices-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    margin-bottom: 24px;
    transition: opacity 0.3s ease;
}

.choice-btn {
    padding: 16px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.choice-btn:hover {
    border-color: var(--border-focus);
    background: #fffafa;
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.choice-btn:active {
    transform: translateY(0);
}

.choice-btn.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.choice-btn.selected span {
    color: white !important;
}

.action-btn.primary {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: var(--bg-surface);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn.primary:hover {
    background: #e3866d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 120, 94, 0.3);
}

.action-btn.primary:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ==================== 状态提示 ==================== */
.status-message {
    font-size: 15px;
    font-weight: 500;
    min-height: 24px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.status-message:empty {
    display: none;
}

.status-message.success { color: var(--success); }
.status-message.error { color: var(--error); }
.status-message.loading { color: var(--text-secondary); }

/* ==================== 用户信息卡片 ==================== */
.info-card {
    width: 100%;
    min-width: 0;
    max-width: 800px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
    text-align: left;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.info-card h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 16px;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== 动画 ==================== */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}

/* ==================== 页脚 ==================== */
.site-footer {
    position: static;
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.thinking-text {
    display: inline-block;
    position: relative;
    color: var(--accent);
    animation: text-breathe 1.8s ease-in-out infinite;
    font-weight: 500;
}
@keyframes text-breathe {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 8px rgba(216, 120, 94, 0.3);
    }
    50% { 
        opacity: 0.4; 
        text-shadow: 0 0 0px rgba(216, 120, 94, 0);
    }
}

.claude-icon {
    animation: breathe 2.5s ease-in-out infinite;
    transform-origin: center;
}

.inline-claude-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    animation: breathe 2.5s ease-in-out infinite;
    transform-origin: center;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .main-icon { width: 44px; height: 44px; }
    h1#main-prompt { font-size: 32px; }
    p#sub-prompt { font-size: 16px; }
    #user-input { padding: 18px 24px; font-size: 17px; }
    .choice-btn { padding: 14px 24px; font-size: 16px; }
}

@media (max-width: 480px) {
    .prompt-container { gap: 10px; }
    .main-icon { width: 36px; height: 36px; }
    h1#main-prompt { font-size: 28px; }
    #user-input { padding: 16px 20px; font-size: 16px; }
    .choice-btn { padding: 12px 20px; font-size: 15px; width: 100%; }
    .info-card { padding: 24px 20px; }
    .site-footer { position: static; margin-top: auto; padding-bottom: 16px; }
}

/* 返回按钮样式（文字超链接） */
.back-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-top: 15px;
    padding: 8px;
    transition: all 0.2s;
    width: 100%;
}
.back-btn:hover {
    color: var(--accent);
}

@media (max-width: 360px) {
    h1#main-prompt { font-size: 24px; }
    .main-icon { width: 32px; height: 32px; }
    .info-card { padding: 20px 15px; }
    #user-input { padding: 14px 16px; font-size: 15px; }
    .choice-btn { padding: 10px 16px; font-size: 14px; }
    .centered-container { padding: 20px 12px 60px; }
}

/* ==================== 套餐选择页 ==================== */
.plan-screen {
    width: 100%;
    max-width: 600px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
    text-align: center;
}

.plan-screen h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.plan-subtitle {
    color: var(--error);
    font-size: 13px;
    margin-bottom: 24px;
    font-weight: 500;
}

.plan-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #faf9f5;
}

.plan-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.plan-card h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Lite 专属高亮 */
.lite-plan {
    border-color: var(--accent);
    background: rgba(216, 120, 94, 0.05);
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(216, 120, 94, 0.4);
}

.plus-inputs {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: popIn 0.3s ease;
}

.plus-inputs input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    text-align: center;
    font-size: 14px;
}

.plus-inputs input:focus {
    border-color: var(--accent);
}

.plus-inputs button {
    margin-left: auto;
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.plus-inputs button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.plus-inputs button:hover:not(:disabled) {
    background: var(--accent-hover);
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ==================== 2026 暑期证书直接下载专属样式 ==================== */
.cert-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(216, 120, 94, 0.08);
    border: 1px solid rgba(216, 120, 94, 0.28);
    border-radius: 24px;
    color: var(--accent);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(216, 120, 94, 0.08);
}

.cert-nav-btn:hover {
    background: rgba(216, 120, 94, 0.15);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 120, 94, 0.18);
}

.cert-nav-btn:active {
    transform: translateY(1px);
}

/* 图2 经典红框报错样式 */
.cert-error-box {
    display: inline-block;
    border: 1.5px solid #d32f2f;
    color: #d32f2f;
    background: #ffffff;
    padding: 11px 22px;
    border-radius: 6px;
    margin: 18px auto 8px;
    font-size: 14.5px;
    font-weight: 500;
    max-width: 90%;
    line-height: 1.5;
    box-sizing: border-box;
    animation: popIn 0.3s ease;
}

.cert-retry-link {
    display: inline-block;
    margin-top: 8px;
    color: #4CAF50;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.cert-retry-link:hover {
    opacity: 0.8;
}

/* 平滑拟真进度条 */
.cert-progress-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 18px auto 10px;
    padding: 18px 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    text-align: left;
    box-sizing: border-box;
    animation: popIn 0.3s ease;
}

.cert-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13.5px;
}

.cert-progress-text {
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-progress-pct {
    color: var(--accent);
    font-weight: 700;
    font-family: Monaco, monospace;
    font-size: 14.5px;
}

.cert-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #f0ede6;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.cert-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d8785e, #f29c84);
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(216, 120, 94, 0.45);
}

.cert-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ecd8d2;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* 证书成功面板 */
.cert-success-box {
    width: 100%;
    max-width: 480px;
    margin: 18px auto;
    padding: 24px 20px;
    background: #ffffff;
    border: 1px solid rgba(74, 139, 94, 0.3);
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(74, 139, 94, 0.1);
    text-align: center;
    box-sizing: border-box;
    animation: popIn 0.4s ease;
}

.cert-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #d8785e;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(216, 120, 94, 0.3);
    transition: all 0.2s ease;
}

.cert-reset-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}



/* ==================== 法宣 7080 增强样式 ==================== */
#toggle-pwd-btn {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
#toggle-pwd-btn:hover {
    color: var(--accent);
    background: rgba(216, 120, 94, 0.08);
}

.fx-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.fx-badge-success { background: #e8f5ee; color: #2e7d47; border: 1px solid #bfe3cc; }
.fx-badge-running { background: #fff3ec; color: #d8785e; border: 1px solid #f4cbbd; }
.fx-badge-queue   { background: #f3f2ed; color: #6e6b66; border: 1px solid #dddad0; }
.fx-badge-error   { background: #fdecec; color: #cc4f4f; border: 1px solid #f5c2c2; }

.info-card.no-pop {
    animation: none !important;
}

/* 顶部客户实时主进度条卡片 */
.fx-master-progress {
    background: linear-gradient(135deg, #fffaf6 0%, #ffffff 100%);
    border: 1.5px solid #f0d7ce;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(216, 120, 94, 0.08);
}
.fx-master-progress.is-done {
    background: linear-gradient(135deg, #f3faf5 0%, #ffffff 100%);
    border-color: #bfe3cc;
    box-shadow: 0 4px 14px rgba(74, 139, 94, 0.08);
}
.fx-master-progress.is-error {
    background: linear-gradient(135deg, #fff6f6 0%, #ffffff 100%);
    border-color: #f5c2c2;
}
.fx-master-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.fx-master-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.fx-master-pct {
    font-family: Monaco, Consolas, monospace;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}
.fx-master-progress.is-done .fx-master-pct {
    color: var(--success);
}
.fx-master-bar-track {
    width: 100%;
    height: 14px;
    background: #efeae2;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.fx-master-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d8785e, #ed9a82, #f5b49f);
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}
.fx-master-bar-fill.active {
    min-width: 14px;
}
.fx-master-bar-fill.active::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.28) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.28) 50%,
        rgba(255, 255, 255, 0.28) 75%,
        transparent 75%,
        transparent
    );
    background-size: 24px 24px;
    animation: fxStripeMove 1.1s linear infinite;
}
.fx-master-bar-fill.done {
    background: linear-gradient(90deg, #4a8b5e, #66ab7b);
}
@keyframes fxStripeMove {
    from { background-position: 0 0; }
    to { background-position: 24px 0; }
}
.fx-master-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
    font-size: 12.5px;
    color: var(--text-secondary);
}
.fx-master-step {
    margin-top: 10px;
    font-size: 12.5px;
    color: #555;
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed var(--border);
    padding: 8px 11px;
    border-radius: 9px;
    line-height: 1.5;
}
.fx-recovered-banner {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #eef8f1;
    border: 1px solid #bfe3cc;
    color: #246338;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* 年度测试（正在进行 / 即将开始）专属提示区 */
.fx-exam-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.fx-exam-card {
    border-radius: 12px;
    padding: 13px 15px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1.5px solid #fde68a;
    background: linear-gradient(135deg, #fffdf4 0%, #fff8e6 100%);
}
.fx-exam-card.is-active {
    border-color: #f4b49f;
    background: linear-gradient(135deg, #fff8f5 0%, #ffefe8 100%);
    box-shadow: 0 3px 12px rgba(216, 120, 94, 0.12);
}
.fx-exam-card.is-passed {
    border-color: #bfe3cc;
    background: linear-gradient(135deg, #f3faf5 0%, #e9f6ee 100%);
}
.fx-exam-card.is-ended {
    border-color: #e2dfd7;
    background: linear-gradient(135deg, #faf9f6 0%, #f3f1ec 100%);
}
.fx-exam-pill.ended {
    background: #78746c;
    color: #fff;
}
.fx-exam-pill.passed {
    background: #4a8b5e;
    color: #fff;
}
.fx-exam-auto-tip {
    font-size: 12.5px;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px dashed rgba(180, 83, 9, 0.3);
    color: #92400e;
    font-weight: 500;
}
.fx-exam-card.is-ended .fx-exam-auto-tip {
    border-color: #d6d3cb;
    color: #57534e;
}
.fx-exam-card.is-passed .fx-exam-auto-tip {
    border-color: #a7d7b8;
    color: #246338;
}
.fx-exam-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.fx-exam-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.fx-exam-pill.active {
    background: #d8785e;
    color: #fff;
}
.fx-exam-pill.upcoming {
    background: #f59e0b;
    color: #fff;
}
.fx-exam-countdown {
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    font-family: Monaco, Consolas, monospace;
}
.fx-exam-card.is-active .fx-exam-countdown {
    color: #c2410c;
}
.fx-exam-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}
.fx-exam-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.fx-progress-track {
    width: 100%;
    height: 7px;
    background: #efede6;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 5px;
}
.fx-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d8785e, #ed9a82);
    border-radius: 999px;
    transition: width 0.35s ease;
}
.fx-progress-fill.done {
    background: linear-gradient(90deg, #4a8b5e, #66ab7b);
}

.fx-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-start;
}

.fx-btn-sm {
    padding: 8px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.fx-btn-sm:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.fx-btn-sm:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.fx-btn-sm.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.fx-btn-sm.primary:hover:not(:disabled) {
    background: var(--accent-hover);
    color: #fff;
}
.fx-btn-sm.green {
    background: #4a8b5e;
    color: #fff;
    border-color: #4a8b5e;
}
.fx-btn-sm.green:hover:not(:disabled) {
    background: #3d774f;
    color: #fff;
}

.fx-logs-box {
    margin-top: 16px;
    background: #faf9f5;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    max-height: 150px;
    overflow-y: auto;
}
.fx-log-line {
    padding: 3px 0;
    border-bottom: 1px dashed #eceae2;
    line-height: 1.5;
}
.fx-log-line:last-child { border-bottom: none; }

.highlight {
    color: var(--accent);
    font-weight: 600;
}

/* ==================== 休闲娱乐区（仅登录后个人页展示） ==================== */
.centered-container.has-entertainment {
    padding-bottom: 24px;
}

.entertainment-zone {
    width: 100%;
    max-width: 800px;
    margin-top: 22px;
    padding-top: 2px;
    text-align: left;
    animation: popIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.entertainment-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.entertainment-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(148, 163, 184, 0.45));
}

.entertainment-divider-line-right {
    background: linear-gradient(to left, transparent, rgba(148, 163, 184, 0.45));
}

.entertainment-divider-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ent-gamepad-icon {
    width: 14px;
    height: 14px;
    color: #2563eb;
    flex-shrink: 0;
}

.entertainment-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.entertainment-card:hover,
.entertainment-card:focus-visible {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.entertainment-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
    flex-shrink: 0;
}

#entertainment-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.entertainment-card:hover #entertainment-preview-img {
    transform: scale(1.03);
}

.entertainment-thumb-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.52), transparent 55%, rgba(2, 6, 23, 0.2));
}

.entertainment-live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.76);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.entertainment-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: #34d399;
    animation: entLivePulse 1.6s ease-in-out infinite;
}

@keyframes entLivePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.entertainment-play-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.entertainment-card:hover .entertainment-play-badge {
    transform: scale(1.1);
    background: #3b82f6;
}

.entertainment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px;
}

.entertainment-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.entertainment-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0;
    transition: color 0.2s ease;
}

.entertainment-card:hover .entertainment-title {
    color: #1d4ed8;
}

.entertainment-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 6px;
    background: #fffbeb;
    color: #b45309;
    border: 1px solid rgba(253, 230, 138, 0.9);
    font-size: 10px;
    font-weight: 700;
}

.entertainment-desc {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.entertainment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 2px;
}

.entertainment-hint {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.entertainment-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, #2563eb, #4f46e5, #0ea5e9);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.entertainment-card:active .entertainment-cta {
    transform: scale(0.96);
}

@media (min-width: 640px) {
    .entertainment-card {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 15px 16px;
    }
    .entertainment-thumb-wrap {
        width: 196px;
    }
    .entertainment-body {
        padding: 0;
        align-self: stretch;
    }
}

/* ==================== 全屏页内游戏浮层 ==================== */
.game-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99990;
    display: none;
    flex-direction: column;
    background: #020617;
}

.game-overlay-bar {
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.game-overlay-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.game-overlay-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-overlay-ext {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.game-overlay-ext:hover {
    background: rgba(255, 255, 255, 0.2);
}

.game-overlay-close {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: rgba(225, 29, 72, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.game-overlay-close:hover {
    background: #f43f5e;
}

#game-overlay-iframe {
    width: 100%;
    flex: 1;
    border: 0;
    background: #020617;
    display: block;
}
