/**
 * 中医体质判定 — 前端样式
 */

/* ======================== 问卷区域 ======================== */
.tcm-question-area {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.tcm-question-item {
    background: #fff;
    border: 1px solid #e8d5c4;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.tcm-question-item:hover {
    border-color: #c8a882;
}

.tcm-question-item.answered {
    border-left: 4px solid #27ae60;
}

.tcm-question-item.tcm-filtered-highlight {
    border-left: 4px solid #3498db;
    background: #f0f7ff;
}

.tcm-question-number {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

.tcm-question-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.5;
}

.tcm-question-desc {
    font-size: 13px;
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
}

.tcm-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tcm-option-label {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    user-select: none;
}

.tcm-option-label:hover {
    border-color: #c8a882;
    background: #fef9f4;
}

.tcm-option-label.checked,
.tcm-option-label:has(input:checked) {
    border-color: #8b4513;
    background: #fef5ec;
}

.tcm-option-label input[type="radio"] {
    display: none;
}

.tcm-option-text {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.tcm-option-score {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.tcm-option-label.checked .tcm-option-text,
.tcm-option-label:has(input:checked) .tcm-option-text {
    color: #8b4513;
    font-weight: bold;
}

/* ======================== 进度条 ======================== */
.tcm-progress-wrap {
    background: #fff;
    border: 1px solid #e8d5c4;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tcm-progress-track {
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tcm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b4513, #d35400);
    border-radius: 5px;
    width: 0;
    transition: width 0.3s ease;
}

.tcm-progress-text {
    font-size: 13px;
    color: #888;
}

/* ======================== 提交按钮区 ======================== */
.tcm-submit-wrap {
    text-align: center;
    margin: 20px 0;
}

.tcm-submit-btn {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.tcm-submit-btn:hover {
    background: linear-gradient(135deg, #6b3410, #8b4513);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
}

.tcm-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ======================== 分页组件 ======================== */
.tcm-pagination-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
}

.tcm-pagination-search {
    flex: 1;
    min-width: 180px;
    position: relative;
}

.tcm-search-input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.tcm-search-input:focus {
    border-color: #8b4513;
    box-shadow: 0 0 0 2px rgba(139,69,19,0.1);
}

.tcm-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
}

.tcm-pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.tcm-page-size-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.tcm-pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tcm-page-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
    min-width: 36px;
    text-align: center;
}

.tcm-page-btn:hover:not(.disabled) {
    background: #fef5ec;
    border-color: #c8a882;
    color: #8b4513;
}

.tcm-page-btn.active {
    background: #8b4513;
    color: #fff;
    border-color: #8b4513;
    font-weight: bold;
}

.tcm-page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.tcm-page-ellipsis {
    padding: 6px 4px;
    color: #999;
    font-size: 13px;
}

.tcm-page-jump {
    margin-left: 8px;
    font-size: 13px;
    color: #888;
}

.tcm-jump-input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    margin: 0 4px;
}

/* ======================== 结果区域 ======================== */
.tcm-result-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.tcm-result-badges {
    margin: 12px 0 16px;
}

.tcm-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin: 4px;
    font-weight: 500;
}

.tcm-badge-balanced { background: #27ae60; color: #fff; }
.tcm-badge-main { background: #8b4513; color: #fff; font-size: 16px; padding: 8px 20px; }
.tcm-badge-combined { background: #e67e22; color: #fff; }
.tcm-badge-tendency { background: #3498db; color: #fff; }

.tcm-result-text {
    font-size: 16px;
    line-height: 1.8;
    padding: 16px;
    background: #fef9f4;
    border-left: 4px solid #e67e22;
    border-radius: 4px;
    margin-bottom: 16px;
}

.tcm-result-scores h3 {
    font-size: 15px;
    color: #555;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.tcm-score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.tcm-score-label {
    width: 70px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.tcm-score-track {
    flex: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.tcm-score-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.tcm-score-value {
    font-size: 13px;
    font-weight: bold;
    min-width: 100px;
}

.tcm-result-advice {
    margin-top: 16px;
    padding: 16px;
    background: #f0f9f4;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.tcm-retry-btn {
    margin-top: 20px;
    padding: 10px 36px;
    background: #f5f0eb;
    border: 1px solid #c8a882;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    color: #8b4513;
    transition: all 0.2s;
}

.tcm-retry-btn:hover {
    background: #8b4513;
    color: #fff;
}
