﻿/* 任务弹框样式 */
.task-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-modal {
    position: absolute;
    left: 3%;
    top: 10%;
    width: 94%;
    height: 75%;
    background: var(--btn_bg_s);
    color:var(--btn_color_q);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-header {
    padding: 6px 18px;
    font-weight: 700;
    font-size: 17px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgb(0 0 0 / 20%);
    text-align: center;
}

task-footer {
    text-align: center;
}

.task-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    /* 隐藏滚动条：跨浏览器 */
    -ms-overflow-style: none; /* IE, Edge */
    scrollbar-width: none; /* Firefox */
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 单项容器：左右布局，左60% 右40% */
.task-item-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding-bottom: 4px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
}

/* 左侧 60% */
.task-left {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    min-width: 200px; /* allow truncation */
    padding: 4px;
}

/* 左上：描述 */
.task-left-desc {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 左下：奖励物品区 */
.task-left-rewards {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 4px;
}

/* 右侧 40%：调整为水平和垂直均居中，项目间距 4px */
.task-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    gap: 4px; /* 中间间隔 4px */
    min-width: 120px;
    padding: 8px;
}

/* 右上：进度 居中显示 */
.task-right-progress {
    font-size: 10px;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 右下：按钮或图标 居中显示 */
.task-right-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* 水平居中按钮/图标 */
    gap: 8px;
}

/* 状态图标 */
.task-status-icon {
    max-height: 36px;
    object-fit: contain;
}

/* 领取按钮样式 */
.task-claim-btn {
    padding: 4px 12px;
    color: #2b2b2b;
    background: var(--btn_bg_q);
    color: var(--btn_color_s);
    border: 1px solid var(--btn_bg_s);
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 14px;
}

    .task-claim-btn:active {
        transform: translateY(1px);
    }

/* 一键领取按钮 */
.task-claim-all {
    padding: 4px 14px;
    background: linear-gradient(180deg, #fce298c9, #ffa31ee3);
    color: var(--btn_color_s);
    border: 1px solid var(--btn_bg_s);
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin: 6px;
    font-size: 12px;
}

.task-bottom-daily {
    padding: 6px 14px;
    background: var(--btn_bg_s);
    color: var(--btn_color_q);
    border: 1px solid var(--btn_bg_q);
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin: 6px;
    font-size: 15px;
}
.task-bottom-daily-active {
    background: var(--btn_bg_q);
    color: var(--btn_color_s);
    border: 1px solid var(--btn_bg_s);
}
/* 奖励弹窗 */
.task-reward-popup {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    background: rgba(0,0,0,0.4);
}

.task-reward-inner {
    width: 90%;
    min-height: 200px;
    background: var(--btn_bg_q);
    color: var(--btn_color_s);
    border: 1px solid var(--btn_bg_s);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    text-align: center;
}

.task-reward-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.task-reward-content {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.task-reward-close {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #ddd;
    cursor: pointer;
}
.task-reward-icon {
    max-height: 40px;
    margin-bottom:20px;
}

/* 新增：可领取图标左右摇摆动画 */
.task-daily-marker.wobble {
    animation: task-wobble 0.9s ease-in-out infinite;
    transform-origin: 50% 70%;
    cursor: pointer;
    /* 可选微调外观 */
    will-change: transform;
}

@keyframes task-wobble {
    0% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(6deg);
    }

    45% {
        transform: rotate(-4deg);
    }

    60% {
        transform: rotate(2deg);
    }

    75% {
        transform: rotate(-1deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.task-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1200;
}

.task-modal {
    position: absolute;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    color: var(--btn_color_q);
}

.task-modal-daily {
    left: 3%;
    top: 8%;
    width: 94%;
    height: 78%;
    background: var(--btn_bg_s);
    border-radius: 12px;
}

.task-modal-one {
    left: 7%;
    top: 12%;
    width: 86%;
    height: 68%;
    background: linear-gradient(180deg, rgba(57,36,24,0.98), rgba(29,18,11,0.98));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
}

.task-modal-overlap {
    left: 5%;
    top: 10%;
    width: 90%;
    height: 72%;
    background: linear-gradient(180deg, rgba(42,31,23,0.98), rgba(22,15,10,0.98));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
}

.task-header-daily {
    background: rgb(0 0 0 / 20%);
}

.task-header-one {
    background: linear-gradient(180deg, rgba(255,197,117,0.16), rgba(255,197,117,0.04));
    border-bottom: 1px solid rgba(255,213,148,0.16);
}

.task-header-overlap {
    background: linear-gradient(180deg, rgba(255,160,70,0.18), rgba(255,160,70,0.05));
    border-bottom: 1px solid rgba(255,160,70,0.16);
}

.task-body-daily,
.task-body-one,
.task-body-overlap {
    flex: 1;
    padding: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.task-list-daily,
.task-list-one,
.task-list-overlap {
    height: 100%;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .task-list-daily::-webkit-scrollbar,
    .task-list-one::-webkit-scrollbar,
    .task-list-overlap::-webkit-scrollbar {
        display: none;
    }

.task-footer,
.task-footer1 {
    flex-shrink: 0;
}

.task-footer {
    display: flex;
    justify-content: center;
}

.task-footer1 {
    display: none;
    justify-content: flex-end;
    border-top: 1px solid #dcdcdc8c;
    padding: 0 8px 6px;
}

.task-daily-points {
    display: none;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

.task-daily-bar-bg {
    position: relative;
    height: 12px;
    background: #333;
    border-radius: 8px;
    overflow: visible;
}

.task-daily-bar-fill {
    height: 100%;
    width: 0%;
    background: #ffcc00;
    border-radius: 8px;
    transition: width 300ms ease;
}

.task-daily-marker {
    position: absolute;
    top: -10px;
    max-height: 35px;
}

#task-daily-marker-1 {
    left: 22%;
}

#task-daily-marker-2 {
    left: 52%;
}

#task-daily-marker-3 {
    left: calc(100% - 36px);
}