/* ================================================
   人教培训服务 - 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: 'Noto Serif SC', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 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;
}

/* ==================== 当前项目顶部标签 ==================== */
.project-tag-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 16px;
    background: #fff9f6;
    border: 1px solid #fae2d8;
    border-radius: 30px;
    box-shadow: 0 1px 4px rgba(216, 120, 94, 0.08);
    transition: all 0.3s ease;
}

.project-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(216, 120, 94, 0.2);
}

.project-tag-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.project-tag-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

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

.main-icon {
    width: 52px;
    height: 52px;
    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: clamp(22px, 3.6vw, 34px);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

p#sub-prompt {
    font-size: 16px;
    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);
}

/* OTP 填字格样式 */
.otp-box {
    width: 32px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    outline: none;
    padding: 0;
}
@media (max-width: 400px) {
    .otp-box {
        width: 26px;
        height: 36px;
        font-size: 16px;
    }
}
.otp-box:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(221, 133, 96, 0.2);
}
.otp-box:disabled {
    background: #f3f4f6;
    color: var(--text-secondary);
    border-color: #e5e7eb;
}

/* 年度完成情况表格样式 */
.yc-table th, .yc-table td {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 8px;
}
.yc-table tbody tr:hover {
    background-color: #fafafa;
}

/* 年度完成情况 - 手机端自适应 */
.yc-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

@media (max-width: 768px) {
    /* 顶部假导航栏：强制每个项目内容不换行 */
    .yc-nav-bar > div {
        padding: 0 10px !important;
        flex-shrink: 0 !important;
    }
    .yc-nav-bar > div > span {
        white-space: nowrap !important;
        font-size: 11px !important;
        margin-top: 2px !important;
    }
    .yc-nav-bar > div > svg {
        width: 18px !important;
        height: 18px !important;
    }
    .yc-filter-bar input {
        width: 80px !important;
    }
    .yc-table th, .yc-table td {
        white-space: nowrap;
        padding: 12px 6px;
        font-size: 12px;
    }
}

/* ==================== 课程卡片自适应布局 ==================== */
.course-card-content {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    flex-wrap: nowrap;
}

.course-cover-img {
    width: 240px;
    height: 135px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
}

.course-info-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    text-align: left;
}

.course-title-text {
    margin: 0;
    font-size: 16px;
    color: #333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}

.course-tags-area {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.course-action-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

.course-progress-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #b71c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b71c1c;
    font-weight: bold;
    font-size: 15px;
    background: #fff;
    flex-shrink: 0;
}

.course-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-btn-outline {
    background: #fff;
    color: #0c568f;
    border: 1px solid #0c568f;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.course-btn-solid {
    background: #0c568f;
    color: #fff;
    border: 1px solid #0c568f;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

/* 手机端响应式布局 (紧凑横排布局) */
@media (max-width: 768px) {
    .course-card-content {
        gap: 10px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .course-cover-img {
        width: 100px;
        height: 56px;
        border-radius: 4px;
    }
    
    .course-info-area {
        gap: 6px;
    }
    
    .course-title-text {
        font-size: 13px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.3;
    }
    
    .course-tags-area {
        gap: 4px;
    }
    
    .course-tags-area span {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
    
    .course-info-area > div:last-child {
        font-size: 11px !important;
    }
    
    .course-action-area {
        gap: 8px;
    }
    
    .course-progress-ring {
        width: 44px;
        height: 44px;
        border-width: 3px;
        font-size: 11px;
    }
    
    .course-btn-outline, .course-btn-solid {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .course-action-buttons {
        gap: 6px;
    }
}
@media (max-width: 380px) {
    .course-card-content {
        gap: 6px;
    }
    .course-cover-img {
        width: 80px;
        height: 45px;
    }
    .course-title-text {
        font-size: 12px;
    }
    .course-progress-ring {
        width: 36px;
        height: 36px;
        font-size: 10px;
        border-width: 2px;
    }
}

/* ==================== 昆明师训工作室嵌入容器 ==================== */
.studio-embed-container {
    width: 100%;
    max-width: 1080px;
    margin: 24px auto 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: none;
    text-align: left;
}

.studio-embed-header {
    background: #0c568f;
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.studio-embed-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-embed-actions {
    display: flex;
    gap: 10px;
}

.studio-embed-actions a, .studio-embed-actions button {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.studio-embed-actions a:hover, .studio-embed-actions button:hover {
    background: rgba(255, 255, 255, 0.35);
}

.studio-iframe {
    width: 100%;
    height: 780px;
    border: none;
    display: block;
    background: #f7f9fa;
}

@media (max-width: 768px) {
    .studio-iframe {
        height: 600px;
    }
}

/* ==================== 最终结果三张卡片样式 ==================== */
.btn-text-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}
.btn-text-logout:hover {
    color: var(--text-primary);
}

.card-item {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- 卡片 1：报名成功 (图 3) --- */
.card-success {
    background: #ffffff;
    border: 1px solid #ebd9c8;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.card-success-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.card-success-divider {
    border-bottom: 1px dashed #f0eee6;
    margin-bottom: 10px;
}

.card-success-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f0eee6;
    font-size: 15px;
}

.cs-label {
    color: #6e6b66;
    font-weight: 400;
    flex-shrink: 0;
    width: 75px;
}

.cs-value {
    color: #2d2825;
    font-weight: 500;
    word-break: break-all;
}

.cs-project {
    font-weight: 600;
    color: #2d2825;
    font-size: 14px;
    text-align: right;
}

.cs-copy-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-code {
    font-family: monospace;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.cs-idcard {
    font-size: 15px;
    font-weight: 600;
    color: #bb5a3c;
    letter-spacing: 0.5px;
}

.btn-mini-copy {
    background: #fdfbf7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-mini-copy:hover {
    background: #f0eee6;
    color: #333;
}

.cs-tip-text {
    font-size: 12px;
    color: #a3a09b;
    text-align: right;
    margin-top: 6px;
    margin-bottom: 14px;
}

.cs-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-view-password {
    background: #b5624a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-view-password:hover {
    background: #9f503a;
}

/* --- 卡片 2：平台信息 (图 1) --- */
.card-platform {
    background: #f6f6f6;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 16px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

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

.cp-top {
    display: flex;
    gap: 16px;
    align-items: center;
}

.cp-avatar-box {
    width: 80px;
    height: 80px;
    background: #e3e3e3;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-avatar-svg {
    width: 70px;
    height: 70px;
}

.cp-name {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
}

.cp-role {
    font-size: 14px;
    color: #333;
}

.cp-details {
    margin-top: 12px;
    font-size: 14px;
    color: #333;
}

.cp-row {
    margin-bottom: 6px;
}

.cp-link {
    color: #0288d1;
    text-decoration: none;
}
.cp-link:hover {
    text-decoration: underline;
}

.cp-link-disabled {
    color: #0288d1;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
    user-select: text;
}

/* 快照截图右侧操作区 (位于卡片2右侧) */
.cp-snapshot-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 8px;
}

.cp-snapshot-tip {
    color: #e53935;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}


/* --- 卡片 3：学情统计 (图 2) --- */
.card-statistics {
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stat-tabs {
    display: flex;
    background: #fafafa;
    border-bottom: 1px solid #dcdcdc;
}

.stat-tab {
    padding: 9px 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.stat-tab.active {
    background: #ffffff;
    border-top: 3px solid #c61218;
    border-right: 1px solid #dcdcdc;
    font-weight: bold;
    color: #222;
    margin-top: -1px;
}

.stat-tab.inactive {
    background: #f4f4f4;
    color: #666;
    border-right: 1px solid #dcdcdc;
}

.stat-tab-indicator {
    color: #c61218;
    font-size: 14px;
    font-weight: bold;
}
.stat-tab-indicator.gray {
    color: #bbb;
    font-size: 14px;
}

.stat-content {
    padding: 24px 22px 20px;
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.stat-row-label {
    font-size: 14px;
    color: #333;
    width: 75px;
    flex-shrink: 0;
}

.stat-progress-bar {
    flex: 1;
    height: 18px;
    border: 1px solid #c0c0c0;
    border-radius: 9px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    margin: 0 14px;
}

.stat-progress-fill {
    background: linear-gradient(to bottom, #8dbf43, #6fa32c);
    height: 100%;
    border-radius: 8px;
    transition: width 0.4s ease;
}

.stat-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #333;
    font-weight: 500;
    pointer-events: none;
}

.stat-ratio {
    font-size: 14px;
    color: #333;
    width: 55px;
    text-align: right;
    flex-shrink: 0;
}

.stat-action-link {
    font-size: 14px;
    color: #0288d1;
    text-decoration: none;
    margin-left: 20px;
    flex-shrink: 0;
}
.stat-action-link:hover {
    text-decoration: underline;
}

.stat-footer-note {
    color: #e53935;
    font-size: 13px;
    margin-top: 20px;
    text-align: left;
}

/* --- 密码弹窗 Modal (图 4) --- */
.pwd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwd-modal-box {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwd-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.pwd-modal-value {
    font-size: 32px;
    font-weight: 700;
    color: #d8785e;
    margin: 18px 0;
    letter-spacing: 2px;
    font-family: monospace, sans-serif;
}

.pwd-modal-warning {
    font-size: 13px;
    color: #e53935;
    line-height: 1.5;
    margin-bottom: 24px;
}

.pwd-modal-btn {
    background: #d8785e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 44px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.pwd-modal-btn:hover {
    background: #c4664c;
}

/* ==================== 快照截图按钮与弹窗 ==================== */
.btn-snapshot {
    background: #c61218;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(198, 18, 24, 0.22);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.btn-snapshot:hover {
    background: #ad0f14;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(198, 18, 24, 0.32);
}
.btn-snapshot:active {
    transform: translateY(0);
}

.snapshot-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.snapshot-modal-box {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 880px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.snapshot-modal-header {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.snapshot-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.snapshot-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
}
.snapshot-modal-close:hover {
    background: #eee;
    color: #222;
}

.snapshot-modal-body {
    padding: 16px;
    overflow-y: auto;
    text-align: center;
    background: #4b515d;
}

.snapshot-modal-footer {
    padding: 14px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    text-align: center;
}

.btn-download-snapshot {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: background 0.2s;
}
.btn-download-snapshot:hover {
    background: #1d4ed8;
}

/* ==========================================================================
   全量移动端自适应系统 (Mobile Responsive Adaptation System)
   ========================================================================== */

@media (max-width: 600px) {
    .centered-container {
        padding: 16px 12px 36px;
    }
    #final-result-container {
        max-width: 100%;
        margin: 8px auto 20px;
    }
}

@media (max-width: 480px) {
    /* 容器与头部 */
    .prompt-container {
        gap: 8px;
        margin-bottom: 6px;
    }
    .main-icon {
        width: 32px;
        height: 32px;
    }
    h1#main-prompt {
        font-size: 22px;
        line-height: 1.3;
    }
    p#sub-prompt {
        font-size: 13px;
        line-height: 1.4;
        padding: 0 4px;
        margin-bottom: 12px;
    }
    .input-wrapper {
        margin: 10px 0 8px;
    }
    #user-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* 卡片通用 */
    .card-item {
        margin-bottom: 10px;
    }

    /* 卡片 1：报名成功 */
    .card-success {
        padding: 16px 14px;
        border-radius: 12px;
    }
    .card-success-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    .card-success-row {
        padding: 8px 0;
        font-size: 13px;
    }
    .cs-label {
        width: 66px;
        font-size: 13px;
    }
    .cs-value {
        font-size: 13px;
        text-align: right;
        flex: 1;
    }
    .cs-project {
        font-size: 13px;
        line-height: 1.4;
    }
    .cs-code {
        font-size: 13px;
    }
    .cs-idcard {
        font-size: 13px;
        letter-spacing: 0;
    }
    .btn-mini-copy {
        padding: 2px 6px;
        font-size: 11px;
    }
    .cs-tip-text {
        font-size: 11px;
        margin-top: 6px;
        margin-bottom: 10px;
    }
    .btn-view-password {
        padding: 7px 16px;
        font-size: 13px;
        border-radius: 6px;
    }

    /* 卡片 2：平台信息 + 快照截图下载 (保持右侧横排排版，避免挤压) */
    .card-platform {
        padding: 12px 12px;
        gap: 8px;
        align-items: center;
    }
    .cp-top {
        gap: 10px;
    }
    .cp-avatar-box {
        width: 52px;
        height: 52px;
    }
    .cp-avatar-svg {
        width: 44px;
        height: 44px;
    }
    .cp-name {
        font-size: 15px;
        margin-bottom: 3px;
    }
    .cp-role {
        font-size: 12px;
    }
    .cp-details {
        margin-top: 6px;
        font-size: 12px;
    }
    .cp-row {
        margin-bottom: 2px;
    }
    .cp-snapshot-action {
        padding-left: 0;
        flex-shrink: 0;
    }
    .btn-snapshot {
        padding: 7px 10px;
        font-size: 12px;
        border-radius: 5px;
    }
    .btn-snapshot svg {
        width: 14px;
        height: 14px;
        margin-right: 3px;
    }
    .cp-snapshot-tip {
        font-size: 10px;
        margin-top: 3px;
    }

    /* 卡片 3：学情统计 */
    .stat-tab {
        padding: 7px 14px;
        font-size: 13px;
    }
    .stat-content {
        padding: 14px 12px 12px;
    }
    .stat-row {
        margin-bottom: 10px;
    }
    .stat-row-label {
        font-size: 12px;
        width: 58px;
    }
    .stat-progress-bar {
        margin: 0 6px;
        height: 15px;
    }
    .stat-progress-text {
        font-size: 10px;
    }
    .stat-ratio {
        font-size: 12px;
        width: 38px;
    }
    .stat-footer-note {
        font-size: 11px;
        line-height: 1.5;
        margin-top: 12px;
        word-break: break-all;
    }

    /* 密码弹窗 Modal */
    .pwd-modal-overlay {
        padding: 14px;
    }
    .pwd-modal-box {
        padding: 22px 18px 18px;
        border-radius: 12px;
        max-width: 320px;
    }
    .pwd-modal-title {
        font-size: 16px;
    }
    .pwd-modal-value {
        font-size: 28px;
        margin: 14px 0;
        letter-spacing: 1.5px;
    }
    .pwd-modal-warning {
        font-size: 12px;
        margin-bottom: 18px;
    }
    .pwd-modal-btn {
        width: 100%;
        padding: 10px 20px;
    }

    /* 快照截图弹窗 Modal */
    .snapshot-modal-overlay {
        padding: 8px;
    }
    .snapshot-modal-box {
        max-height: 96vh;
        border-radius: 8px;
    }
    .snapshot-modal-header {
        padding: 10px 12px;
    }
    .snapshot-modal-title {
        font-size: 14px;
    }
    .snapshot-modal-body {
        padding: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .snapshot-modal-footer {
        padding: 10px 12px;
    }
    .btn-download-snapshot {
        width: 100%;
        padding: 9px 14px;
        font-size: 13px;
        justify-content: center;
    }
}

/* 超窄屏幕额外适配 (<= 340px) */
@media (max-width: 340px) {
    .card-platform {
        flex-wrap: wrap;
    }
    .cp-snapshot-action {
        width: 100%;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed #e0e0e0;
    }
    .btn-snapshot {
        width: 100%;
    }
    .card-success-row {
        flex-wrap: wrap;
        gap: 4px;
    }
    .cs-label {
        width: 100%;
    }
    .cs-value {
        width: 100%;
        text-align: left;
    }
    .cs-copy-group {
        justify-content: flex-start;
    }
    .card-success-btn-row {
        text-align: center;
    }
    .btn-view-password {
        width: 100%;
    }
}

