/* ========================================================
   三面镜子 UI 样式
   风格与现有系统一致：圆角卡片、柔和配色、猫咪/学习主题
   移动端优先，竖屏单列布局
   ======================================================== */

/* ===== 页面整体 ===== */
#three-mirrors-page {
    min-height: 100vh;
    background: #f5f6fa;
    padding-bottom: 40px;
}

/* ===== 顶部导航栏 ===== */
.tm-header {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
    background: white;
    border-bottom: 1px solid #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tm-back-btn {
    background: #f5f5f5;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
}

.tm-back-btn:active {
    background: #e8e8e8;
}

.tm-title {
    margin: 0;
    font-size: 18px;
    flex: 1;
    font-weight: 600;
}

.tm-refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

.tm-refresh-btn:active {
    opacity: 0.85;
    transform: scale(0.96);
}

/* ===== 内容区 ===== */
#three-mirrors-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 通用卡片样式 ===== */
.tm-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.tm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
}

.tm-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tm-card-icon {
    font-size: 20px;
}

.tm-card-tag {
    font-size: 12px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.tm-card-footer {
    padding: 10px 18px 14px;
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.tm-dot {
    color: #ddd;
}

.tm-muted {
    color: #bbb;
}

/* ===== 空状态 ===== */
.tm-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    margin-top: 40px;
}

.tm-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.tm-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.tm-empty-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
    line-height: 1.6;
}

.tm-empty-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
}

.tm-empty-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* ===== 进度镜 ===== */
.tm-progress-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 18px 16px;
    gap: 20px;
}

.tm-progress-ring-wrap {
    position: relative;
    width: 140px;
    height: 140px;
}

.tm-progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.tm-ring-bg {
    fill: none;
    stroke: #f0f2f5;
    stroke-width: 10;
}

.tm-ring-fill {
    fill: none;
    stroke: #667eea;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.tm-progress-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.tm-progress-percent {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.tm-progress-percent span {
    font-size: 16px;
    font-weight: 500;
    color: #999;
}

.tm-progress-label {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.tm-progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.tm-stat-item {
    text-align: center;
    padding: 12px 8px;
    border-radius: 10px;
    background: #fafbff;
}

.tm-stat-num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.tm-stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.tm-stat-mastered .tm-stat-num {
    color: #52c41a;
}

.tm-stat-partial .tm-stat-num {
    color: #fa8c16;
}

.tm-stat-weak .tm-stat-num {
    color: #f5222d;
}

/* ===== 方向镜 ===== */
.tm-direction-body {
    padding: 4px 18px 4px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tm-dir-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tm-dir-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.tm-dir-percent {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}

.tm-dir-bar {
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
}

.tm-dir-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.tm-dir-bar-fill.high {
    background: linear-gradient(90deg, #52c41a, #73d13d);
}

.tm-dir-bar-fill.mid {
    background: linear-gradient(90deg, #fa8c16, #ffa940);
}

.tm-dir-bar-fill.low {
    background: linear-gradient(90deg, #f5222d, #ff7875);
}

.tm-dir-bar-fill.none {
    background: #e8e8e8;
}

.tm-dir-meta {
    font-size: 11px;
    color: #bbb;
    margin-top: -2px;
}

/* ===== 卡点镜 ===== */
.tm-stuck-body {
    padding: 4px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tm-weak-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fafbff;
    border-radius: 12px;
}

.tm-weak-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.tm-weak-rank.severe {
    background: linear-gradient(135deg, #f5222d, #ff7875);
}

.tm-weak-rank.general {
    background: linear-gradient(135deg, #fa8c16, #ffa940);
}

.tm-weak-info {
    flex: 1;
    min-width: 0;
}

.tm-weak-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tm-weak-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
}

.tm-weak-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 11px;
}

.tm-weak-mastery {
    text-align: right;
    flex-shrink: 0;
    width: 60px;
}

.tm-weak-percent {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tm-weak-percent.severe {
    color: #f5222d;
}

.tm-weak-percent.general {
    color: #fa8c16;
}

.tm-weak-bar {
    height: 4px;
    background: #f0f2f5;
    border-radius: 2px;
    overflow: hidden;
}

.tm-weak-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.tm-weak-bar-fill.severe {
    background: linear-gradient(90deg, #f5222d, #ff7875);
}

.tm-weak-bar-fill.general {
    background: linear-gradient(90deg, #fa8c16, #ffa940);
}

/* 卡点镜空状态 */
.tm-weak-empty {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    font-size: 14px;
}

.tm-weak-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* ===== "我的"页面入口 ===== */
.tm-profile-entry .tm-entry-badge {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
    margin-right: 4px;
}
