.challenge-page {
    background: linear-gradient(180deg, #FFF5F5 0%, var(--white) 30%);
}

.challenge-content {
    flex: 1;
    padding: 16px;
    padding-bottom: 30px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.challenge-content::-webkit-scrollbar {
    display: none;
}

.challenge-header-card {
    background: linear-gradient(135deg, var(--primary-red), #D4374B);
    border-radius: 16px;
    padding: 20px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.challenge-trophy {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.challenge-info {
    flex: 1;
}

.challenge-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.challenge-info p {
    font-size: 12px;
    opacity: 0.85;
}

.challenge-score {
    text-align: center;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
}

.score-num {
    font-size: 24px;
    font-weight: 700;
}

.score-label {
    font-size: 11px;
    opacity: 0.8;
}

.challenge-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), #FF6B6B);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-gray);
}

.challenge-levels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.level-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 10px var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.level-card:active {
    transform: scale(0.88);
}

.level-card.completed {
    border-color: #4CAF50;
}

.level-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.level-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    position: relative;
    flex-shrink: 0;
}

.level-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid var(--white);
}

.level-info {
    flex: 1;
}

.level-info h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.level-info p {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.level-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-light);
}

.level-meta i {
    margin-right: 3px;
    color: var(--primary-red);
}

.level-status {
    font-size: 14px;
    color: var(--text-light);
}

.level-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-red);
}

.challenge-rules {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px var(--shadow);
}

.challenge-rules h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.challenge-rules h4 i {
    color: var(--primary-red);
}

.challenge-rules p {
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* ===== 答题页面 ===== */
.challenge-play-page {
    background: linear-gradient(180deg, #FFF5F5 0%, var(--white) 20%);
}

.challenge-play-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    position: relative;
    flex-shrink: 0;
}

.challenge-play-header .back-btn {
    position: absolute;
    left: 16px;
    top: calc(50% + 10px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.challenge-play-header .back-btn:active {
    background: var(--light-red);
}

.challenge-play-header .title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
}

.question-counter {
    position: absolute;
    right: 16px;
    font-size: 13px;
    color: var(--primary-red);
    font-weight: 600;
    background: var(--light-red);
    padding: 4px 10px;
    border-radius: 12px;
}

.challenge-play-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.challenge-play-content::-webkit-scrollbar {
    display: none;
}

.question-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: 20px;
    position: relative;
}

.question-level-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    margin: 0 auto 12px;
}

.question-text {
    font-size: 17px;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 8px;
}

.question-score {
    font-size: 12px;
    color: var(--primary-red);
    background: var(--light-red);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.option-item:active {
    transform: scale(0.88);
}

.option-item.selected {
    border-color: var(--primary-red);
    background: #FFF0F0;
}

.option-item.correct,
.option-item.correct.selected {
    border-color: #4CAF50;
    background: #E8F5E9;
}

.option-item.wrong,
.option-item.wrong.selected {
    border-color: #F44336;
    background: #FFEBEE;
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
}

.option-item.correct .option-letter {
    background: #4CAF50;
    color: var(--white);
}

.option-item.wrong .option-letter {
    background: #F44336;
    color: var(--white);
}

.option-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
}

.option-item > .fas {
    font-size: 20px;
}

.option-item.correct > .fas {
    color: #4CAF50;
}

.option-item.wrong > .fas {
    color: #F44336;
}

.answer-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.feedback-correct {
    background: #E8F5E9;
    color: #2E7D32;
}

.feedback-wrong {
    background: #FFEBEE;
    color: #C62828;
}

.feedback-icon {
    font-size: 24px;
}

.feedback-text {
    font-size: 14px;
    font-weight: 600;
}

.challenge-next-btn {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-red), #E8384F);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4);
    transition: all 0.2s;
    margin-bottom: 16px;
}

.challenge-next-btn:active {
    transform: scale(0.87);
}

.challenge-play-footer {
    padding: 12px 16px 24px;
    flex-shrink: 0;
}

.level-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E0E0E0;
    transition: all 0.3s;
}

.progress-dot.active {
    background: var(--primary-red);
    transform: scale(1.3);
}

.progress-dot.done {
    background: #4CAF50;
}

/* ===== 结果页面 ===== */
.challenge-result-page {
    background: linear-gradient(180deg, #FFF8DC 0%, var(--white) 60%);
}

.challenge-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.result-trophy {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #FFD700);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(218, 165, 32, 0.4);
    animation: trophyBounce 1s ease;
}

@keyframes trophyBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.result-trophy i {
    font-size: 50px;
    color: var(--white);
}

.result-title {
    font-size: 24px;
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 4px;
}

.result-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.result-stars {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.result-stars i {
    font-size: 36px;
}

.star-active {
    color: var(--gold);
    animation: starPop 0.5s ease;
}

.star-inactive {
    color: #E0E0E0;
}

@keyframes starPop {
    0% { transform: scale(0); }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.result-score-card {
    background: linear-gradient(135deg, var(--primary-red), #E8384F);
    border-radius: 16px;
    padding: 20px 40px;
    text-align: center;
    color: var(--white);
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(196, 30, 58, 0.3);
}

.result-score-num {
    font-size: 36px;
    font-weight: 700;
}

.result-score-label {
    font-size: 13px;
    opacity: 0.9;
}

.result-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
}

.result-stat {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    font-size: 11px;
    color: var(--text-gray);
    margin-top: 2px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.result-btn {
    width: 100%;
    height: 46px;
    border-radius: 23px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.result-btn-primary {
    background: linear-gradient(135deg, var(--primary-red), #E8384F);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.result-btn-secondary {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.result-btn:active {
    transform: scale(0.87);
}

/* ===== 新闯关答题页面样式 ===== */
.quiz-page {
    background: #F7F8FA;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.quiz-page .status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, #C41E3A 0%, #E53935 100%);
}

.quiz-red-header {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #E53935 0%, #FFDFDF 40%, #FFFFFF 100%);
    z-index: 0;
}

.quiz-content {
    position: relative;
    z-index: 1;
    padding-top: 44px;
    padding-bottom: 40px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.quiz-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px 16px;
    position: relative;
}

.quiz-back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
}

.quiz-title {
    font-size: 18px;
    font-weight: 900;
    color: #FFF;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: absolute;
    left: 42%;
    transform: translateX(-50%);
}

.quiz-score-badge {
    display: flex;
    align-items: center;
    background: #FFF;
    border-radius: 30px;
    padding: 4px 16px 4px 4px;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quiz-score-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE066 0%, #FFB300 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-score-info {
    display: flex;
    flex-direction: column;
}

.quiz-score-label {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}

.quiz-score-value {
    font-size: 16px;
    font-weight: 800;
    color: #222;
    line-height: 1;
}

.quiz-cards-row {
    background: #FFF;
    border-radius: 16px;
    padding: 16px;
    margin: 0 16px 12px;
    display: flex;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.quiz-card {
    flex: 1;
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
}

.quiz-daily-card {
    background: linear-gradient(180deg, #FFF5F0 0%, #FFF0E5 100%);
}

.quiz-challenge-card {
    background: linear-gradient(180deg, #E6FEF5 0%, #EBFEF6 100%);
}

.quiz-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.quiz-card-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quiz-daily-icon {
    background: linear-gradient(135deg, #FFB980 0%, #FF884D 100%);
}

.quiz-challenge-icon {
    background: linear-gradient(135deg, #8DF0B8 0%, #43D586 100%);
}

.quiz-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #222;
}

.quiz-card-tag {
    border-radius: 12px;
    padding: 4px 8px;
    margin-bottom: 16px;
    align-self: flex-start;
    font-size: 11px;
}

.quiz-daily-tag {
    background: rgba(255,200,160,0.25);
    color: #A67A68;
}

.quiz-challenge-tag {
    background: rgba(100,220,160,0.2);
    color: #6A9B84;
}

.quiz-tag-highlight {
    color: #E33232;
    font-weight: 700;
}

.quiz-card {
    flex: 1;
}

.quiz-btn {
    width: 100%;
    border: none;
    border-radius: 20px;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    color: #FFF;
}

.quiz-daily-btn {
    background: linear-gradient(90deg, #FF9B44 0%, #FF6A00 100%);
    box-shadow: 0 4px 12px rgba(255,106,0,0.3);
}

.quiz-challenge-btn {
    background: linear-gradient(90deg, #64E59A 0%, #3DC87A 100%);
    box-shadow: 0 4px 12px rgba(61,200,122,0.3);
}

.quiz-team-section {
    background: #FFE8E6;
    border-radius: 16px;
    padding: 16px;
    margin: 0 16px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.quiz-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.quiz-team-title {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    margin-left: 20px;
}

.quiz-record-btn {
    background: linear-gradient(90deg, #FF7666 0%, #FF5240 100%);
    color: #FFF;
    border: none;
    border-radius: 14px;
    padding: 4px 10px 4px 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.quiz-arrow {
    margin-left: 2px;
    font-size: 14px;
    line-height: 1;
}

.quiz-team-card {
    background: #FFF;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.quiz-badge-img {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: -12px;
}

.quiz-badge-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.quiz-team-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.quiz-countdown {
    font-size: 12px;
    color: #666;
}

.quiz-count-num {
    color: #D82121;
    font-weight: 800;
    font-family: sans-serif;
    margin: 0 2px;
}

.quiz-reward-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.quiz-reward-icon {
    position: relative;
    width: 28px;
    height: 28px;
    background: #FFF0E5;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #FFE4D6;
}

.quiz-reward-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #FF7833;
    color: #FFF;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 4px;
    border: 1px solid #FFF;
    line-height: 1;
}

.quiz-team-btn-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.quiz-team-btn {
    background: linear-gradient(90deg, #D82121 0%, #B81515 100%);
    border-radius: 20px;
    padding: 8px 24px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(216,33,33,0.3);
}

/* 领取奖励按钮高亮状态 */
.quiz-team-btn.claim-reward-mode {
    background: linear-gradient(90deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 16px rgba(255,152,0,0.4);
    animation: claimPulse 1.5s ease-in-out infinite;
}

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

.quiz-notification {
    background: #FFF9F5;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

.quiz-notify-icon {
    flex-shrink: 0;
}

.quiz-rank-section {
    background: linear-gradient(90deg, #F0F8FF 0%, #FFF5F8 50%, #FFF0F2 100%);
    border-radius: 16px;
    padding: 16px;
    margin: 0 16px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.quiz-rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

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

.quiz-leaf-icon {
    width: 18px;
    height: 18px;
}

.quiz-leaf-right {
    transform: scaleX(-1);
}

.quiz-rank-title {
    font-size: 18px;
    font-weight: 800;
    color: #222;
}

.quiz-full-rank-btn {
    background: #F2F2F2;
    color: #888;
    border: none;
    border-radius: 14px;
    padding: 4px 10px 4px 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.quiz-rank-list {
    display: flex;
    flex-direction: column;
}

.quiz-rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F5F5F5;
}

.quiz-rank-item:last-child {
    border-bottom: none;
}

.quiz-rank-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-rank-num {
    width: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #999;
    font-style: italic;
}

.quiz-rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 15px;
    font-weight: 800;
}

.quiz-rank-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 2px;
    background: #e0e0e0;
}

.quiz-rank-avatar-wrap.champion {
    background: #e30a18;
}

.quiz-rank-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #fff;
    object-fit: cover;
}

.quiz-rank-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.quiz-rank-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-rank-user-title {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.quiz-rank-score-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.quiz-rank-score {
    font-size: 15px;
    font-weight: 800;
    color: #444;
}