/* ===== 每日答题页面 - 对应App.tsx答题界面（优化版）===== */

/* 页面容器 */
.daily-quiz-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fef2f2;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 状态栏样式覆盖 */
.daily-quiz-page .status-bar {
    position: relative;
    z-index: 20;
    background: transparent;
    flex-shrink: 0;
}

/* 背景图片容器 */
.daily-bg-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* 背景图片 - contain模式，完整显示，偏下对齐让底部图案可见 */
.daily-bg-img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* 遮罩层 */
.daily-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 0;
    pointer-events: none;
}

/* Header */
.daily-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #FFF;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.daily-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.daily-header-btn:active { transform: scale(0.95); }

.daily-title {
    font-size: 25px;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 0;
    color: #C41E3A;
}

/* Progress区域 */
.daily-progress-section {
    position: relative;
    z-index: 10;
    padding: 4px 20px 16px;
}

.daily-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFF;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.daily-points-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 积分图标 - 圆形渐变背景+五角星（和圆梦积分一致） */
.daily-score-icon-wrap {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE066 0%, #FFB300 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.daily-score-value {
    color: #FFD54F;
    font-size: 17px;
    font-weight: bold;
    margin-left: 4px;
}

.daily-question-badge {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.daily-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 3px;
    overflow: hidden;
}

.daily-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFE082, #FFD54F);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 内容区 - 不占满底部，让背景图案可见 */
.daily-content {
    position: relative;
    z-index: 10;
    padding: 12px 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 题目卡片 - 减少高度让底部背景可见 */
.daily-question-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    padding: 22px 18px 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
}

.question-type-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    color: #D32F2F;
}

.question-type-badge span {
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 2px;
    background: #FFEBEE;
    padding: 4px 11px;
    border-radius: 99px;
}

.question-text {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    line-height: 1.6;
    margin: 0 0 20px;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.daily-option-btn {
    position: relative;
    width: 100%;
    text-align: left;
    padding: 14px 44px 14px 15px;
    border-radius: 14px;
    border: 2px solid #E5E7EB;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.option-text {
    font-weight: 500;
    font-size: 15px;
    padding-right: 28px;
}

.option-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.option-default {
    border-color: #E5E7EB !important;
    background: #FFF !important;
    color: #374151 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    outline: none !important;
}

.option-default:not(:disabled):active {
    transform: scale(0.98) !important;
}

@media (hover: hover) and (pointer: fine) {
    .option-default:hover:not(:disabled) {
        border-color: #FCA5A5 !important;
        background: #FEF2F2 !important;
    }
}

.option-default:focus,
.option-default:focus-visible,
.option-default:focus-within,
.option-default:-webkit-focus-visible {
    outline: none !important;
    border-color: #E5E7EB !important;
    background: #FFF !important;
    box-shadow: none !important;
}

.option-correct {
    border-color: #22C55E;
    background: #F0FDF4;
    color: #166534;
    box-shadow: 0 3px 10px rgba(34,197,94,0.2);
    transform: scale(1.01);
    z-index: 10;
}
.option-correct .option-text { color: #166534; font-weight: 600; }

.option-wrong {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #991B1B;
}
.option-wrong .option-text { color: #991B1B; }

.option-disabled {
    border-color: #F3F4F6;
    background: #F9FAFB;
    color: #9CA3AF;
    opacity: 0.45;
}
.option-disabled .option-text { color: #9CA3AF; }

@media (max-width: 375px) {
    .daily-title { font-size: 15px; }
    .question-text { font-size: 16px; }
    .option-text { font-size: 14px; }
    .daily-question-card { padding: 18px 14px 14px; border-radius: 18px; }
}

/* ===== 规则按钮 ===== */
.daily-rule-btn {
    width: auto;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #FFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.daily-rule-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.35);
}

/* ===== 规则弹窗 ===== */
.daily-rule-modal {
    position: absolute;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.daily-rule-modal.show {
    display: flex;
}

.daily-rule-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.daily-rule-content {
    position: relative;
    z-index: 10;
    width: 85%;
    max-width: 340px;
    max-height: 75%;
    background: #FFF;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow-y: auto;
    animation: ruleModalIn 0.25s ease-out;
}

@keyframes ruleModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.daily-rule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #F0F0F0;
}

.daily-rule-title {
    margin: 0;
    font-size: 17px;
    font-weight: bold;
    color: #333;
}

.daily-rule-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F5F5F5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.daily-rule-close:active {
    background: #E8E8E8;
    transform: scale(0.92);
}

.daily-rule-body {
    padding: 16px 20px 24px;
}

.daily-rule-item {
    margin: 0 0 13px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.daily-rule-item strong {
    color: #333;
}

.daily-rule-highlight {
    color: #D32F2F !important;
    font-weight: 700;
}

.daily-rule-sub {
    margin: 4px 0 13px 22px;
    font-size: 13px;
    line-height: 1.7;
    color: #666;
}

.daily-rule-tip {
    background: #FFF8E1;
    padding: 11px 14px;
    border-radius: 10px;
    border-left: 3px solid #FFC107;
    margin-bottom: 13px;
}

.daily-rule-footer {
    text-align: center;
    margin: 18px 0 0;
    font-size: 13px;
    color: #888;
    letter-spacing: 0.5px;
}

/* ===== 每日答题结算弹窗（专业动画设计）===== */

/* 弹窗容器 - 使用 scale+opacity GPU加速组合 */
.daily-settlement-modal {
    position: absolute;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.daily-settlement-modal.show {
    pointer-events: auto;
}

/* 遮罩层 - fadeIn 动画 */
.daily-settlement-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.daily-settlement-modal.show .daily-settlement-overlay {
    opacity: 1;
}
.daily-settlement-modal.removing .daily-settlement-overlay {
    opacity: 0;
}

/* 弹窗内容 - scale+opacity 组合动画 (最佳实践) */
.daily-settlement-content {
    position: relative;
    z-index: 10;
    width: 82%;
    max-width: 320px;
    background: #FFF;
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow:
        0 25px 60px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: scale(0.88) translateY(20px);
    transition:
        transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 弹出动画 - 使用弹性缓动曲线 */
.daily-settlement-modal.show .daily-settlement-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* 关闭动画 */
.daily-settlement-modal.removing .daily-settlement-content {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
    transition:
        transform 220ms cubic-bezier(0.4, 0, 1, 1),
        opacity 200ms ease-out;
}

/* 关闭按钮 */
.daily-settlement-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F5F5F5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.daily-settlement-close:active {
    background: #E8E8E8;
    transform: scale(0.9);
}

/* 标题 */
.settlement-title {
    margin: 4px 0 18px;
    font-size: 19px;
    font-weight: bold;
    color: #C41E3A;
    letter-spacing: 1px;
}

/* 成功图标区域 */
.settlement-success-icon {
    margin-bottom: 16px;
}

.success-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 2.5px solid #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.6s ease-out 0.2s both;
}

@keyframes successPulse {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 积分行 - 使用更高优先级选择器覆盖settlementPage.css */
.daily-settlement-content .settlement-score-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 22px !important;
    padding: 12px 18px !important;
    background: #FFFBF0 !important;
    border-radius: 14px !important;
    border: 1px solid #FFF3CD !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 积分标签 - 必须用更具体的选择器+!important覆盖settlementPage.css */
.daily-settlement-content .settlement-score-row .score-label {
    font-size: 15px !important;
    color: #333333 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    opacity: 1 !important;
}

.score-value-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 小积分图标 - 和圆梦积分一致 */
.score-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE066 0%, #FFB300 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-num {
    font-size: 26px;
    color: #D32F2F;
    font-weight: 900;
    letter-spacing: -0.5px;
    animation: scoreCountUp 0.5s ease-out 0.35s both;
}

@keyframes scoreCountUp {
    from { opacity: 0; transform: translateY(12px) scale(0.7); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 查看解析按钮 - 渐变红色主色调 */
.settlement-view-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #FF6B6B 0%, #EE4444 50%, #D32F2F 100%);
    color: #FFF;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 6px 20px -4px rgba(211,47,47,0.45);
    transition: all 0.2s ease;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}
.settlement-view-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.settlement-view-btn:hover::before,
.settlement-view-btn:active::before {
    opacity: 1;
}
.settlement-view-btn:active {
    transform: scale(0.97);
    box-shadow: 0 3px 12px -3px rgba(211,47,47,0.55);
}

/* 返回主页按钮 - 无背景，字体稍大 */
.settlement-home-btn {
    width: 100%;
    height: 46px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    letter-spacing: 1px;
    transition: all 0.15s ease;
    position: relative;
}
.settlement-home-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #DDD;
    border-radius: 1px;
    opacity: 0;
    transition: all 0.2s ease;
}
.settlement-home-btn:hover {
    color: #666;
}
.settlement-home-btn:hover::after {
    opacity: 1;
    width: 56px;
}
.settlement-home-btn:active {
    color: #333;
}


