/* ========================================================
   周复盘页面样式
   M2b基建 · 复用M2a设计Token · 移动端纵向滚动
   ======================================================== */

/* ========== 页面容器 ========== */
#week-review-page {
    padding-bottom: 80px; /* 给底部tab栏留空间 */
    animation: fadeIn 0.3s ease;
}

#week-review-page.route-active {
    display: block;
}

/* ========== 顶部导航栏 ========== */
.wr-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wr-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.wr-back-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.wr-week-label {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    flex: 1;
    margin: 0 12px;
}

.wr-header-right {
    width: 50px; /* 占位，保持标题居中 */
}

/* ========== 内容区通用 ========== */
.wr-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wr-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wr-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wr-card-title-icon {
    font-size: 16px;
}

/* ========== 猫咪状态卡 ========== */
.wr-cat-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 1px solid #667eea20;
}

.wr-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wr-cat-emoji {
    font-size: 40px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.wr-cat-info {
    flex: 1;
}

.wr-cat-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.wr-cat-level {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    font-weight: 500;
    margin-bottom: 4px;
}

.wr-cat-talent {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.wr-favor-section {
    margin-top: 4px;
}

.wr-favor-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

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

.wr-favor-fill {
    height: 100%;
    background: linear-gradient(90deg, #fd79a8, #fdcb6e);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* ========== 本周数据卡（三列） ========== */
.wr-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.wr-stat-item {
    padding: 10px 4px;
    background: #f8f9ff;
    border-radius: 10px;
}

.wr-stat-item.wr-stat-days {
    background: #f0f9ff;
}

.wr-stat-item.wr-stat-nests {
    background: #f6ffed;
}

.wr-stat-item.wr-stat-errors {
    background: #fff2f0;
}

.wr-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.wr-stat-days .wr-stat-num {
    color: #1890ff;
}

.wr-stat-nests .wr-stat-num {
    color: #52c41a;
}

.wr-stat-errors .wr-stat-num {
    color: #f5222d;
}

.wr-stat-label {
    font-size: 11px;
    color: #888;
}

/* ========== 闪卡掌握卡 ========== */
.wr-flashcard-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
}

.wr-fc-item {
    text-align: center;
    flex: 1;
}

.wr-fc-num {
    font-size: 22px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.wr-fc-mastered .wr-fc-num {
    color: #52c41a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.wr-fc-arrow-up {
    font-size: 16px;
}

.wr-fc-label {
    font-size: 12px;
    color: #888;
}

.wr-fc-divider {
    width: 1px;
    height: 36px;
    background: #eee;
}

/* ========== 徽章收获卡 ========== */
.wr-badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.wr-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    cursor: pointer;
    transition: transform 0.2s;
}

.wr-badge-item:active {
    transform: scale(0.95);
}

.wr-badge-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fff7e6, #ffe7ba);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(250, 140, 22, 0.2);
    margin-bottom: 6px;
}

.wr-badge-name {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wr-badges-empty {
    text-align: center;
    padding: 20px 0;
    color: #999;
    font-size: 13px;
    display: none;
}

.wr-badges-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* ========== 底部tab栏（复用背包栏样式） ========== */
.wr-bottom-tabs {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    background: white;
    border-top: 1px solid #eee;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    z-index: 50;
}

.wr-tab-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 4px 10px;
    color: #666;
}

.wr-tab-item:active {
    transform: scale(0.9);
}

.wr-tab-item.active {
    color: #667eea;
}

.wr-tab-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

.wr-tab-label {
    font-size: 10px;
}

.wr-tab-item.active .wr-tab-label {
    font-weight: 600;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式 ========== */
@media (max-width: 360px) {
    .wr-content {
        padding: 12px;
        gap: 12px;
    }

    .wr-card {
        padding: 14px;
    }

    .wr-badge-item {
        width: 52px;
    }

    .wr-badge-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
}
