/* body */
body, html {
    height: 100%;
}

body {
    margin: 0;
    background-attachment: fixed;
    width: 100%;
    height: auto;
    background: #050505;
}

#app {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    background: #050505;
}

hr {
    margin: 4.267vw 1.333vw 0 1.333vw;
    background: #000000;
    opacity: 0.1;
}

/* body */

/* header */
.header {
    width: 100%;
    height: 15.28vw;
    background: #050505;
    border-bottom: 1px solid rgba(53, 53, 53, 0.8);
    display: flex;
    align-items: flex-end;
}

.header_info {
    width: 100%;
    margin: 0 4.267vw;
    height: 14.17vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header_left {
    width: 5.972vw;
    height: 5.972vw;
    background-color: currentColor;
}

.header_info_title {
    text-align: center;
    font-weight: 600;
    font-size: 5vw;
    color: #FFFFFF;
    line-height: 11.733vw;
    font-style: normal;
    flex-shrink: 0;
}

.header_info_title:before {
    content: 'Welfare Center';
}

.header_right {
    width: 5.972vw;
}

/* header */

/* task */
.task_list {
    padding: 0 3.33vw;
    /* height: 100%; */
    /* 这里要减去header里的高度 */
    height: calc(100vh - 15.28vw);
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* iOS 惯性滚动 */
}

.task_list::-webkit-scrollbar {
    display: none;
}

.task_list_container {
    background: #171717;
    border-radius: 1.39vw;
    padding: 1.39vw 4.17vw;
    margin: 2.6667vw 1.3333vw;
}

.item {
    padding: 2.78vw 0;
    display: grid;
    align-items: start;
    column-gap: 1.67vw;
    grid-template-columns: 16.67vw 1fr;
}

.item:nth-child(n+2) {
    border-top: 1px solid rgba(71, 71, 71, 0.2);
}

.task_icon {
    width: 16.67vw;
    height: 16.67vw;
    overflow: hidden;
    border-radius: 4.17vw;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.task_item_right {
    margin-top: 0.55vw;
    position: relative;
    display: flex;
    flex-direction: column;
}

.task_title {
    height: auto;
    color: #FFFFFF;
    font-weight: 500;
    letter-spacing: 0;
    font-size: 3.33vw;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    white-space: normal;      /* 允许正常换行 */
    word-break: keep-all;     /* 尽量在单词边界换行 */
    overflow-wrap: break-word;/* 如果实在太长会强制断行 */
}

.task_bonus {
    display: flex;
    align-items: center;
    margin-top: 2.77vw;
    color: #A36417;
    font-weight: 500;
    font-size: 3.61vw;
    letter-spacing: 0;
}

.task_bonus > img {
    width: 3.75vw;
    height: 3.75vw;
    margin-top: 0.3vw;
    margin-right: 0.83vw;
}

.task_btn {
    width: 18.06vw;
    height: 6.93vw;
    font-size: 3.89vw;
    border-radius: 12.5vw;
    top: 9.19vw;
    right: 0;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task_btn_go {
    color: #FFFFFF;
    background: #FDB255;
    transition: transform 100ms;
}

.task_btn_go:before {
    content: 'GO';
}

.task_btn_go:active {
    transform: scale(0.9);
}

.task_btn_already {
    color: #C4B39F;
    background: #8C6636;
}

.task_btn_already:before {
    content: 'Already';
}

.progress_item {
    gap: 0;
    grid-template-rows: 1fr 4vw 6.93vw;
}

.progress_item .task_bonus{
    margin-top: 0;
}

.task_progress {
    width: 34.72vw;
    height: 1.66vw;
    margin: 1.94vw 0;
    background: #504F4F;
    border-radius: 2.77vw;
    position: relative;
    overflow: hidden;
}

.task_progress_outside {
    display: flex;
    align-items: center;
}

.task_progress_done {
    width: 0;
    height: 100%;
    background: #FDB255;
    border-radius: 2.77vw;
    position: relative;
    transition: width .4s;
    color: white;
    font-size: 2.77vw;
    line-height: 2.22vw;
    text-align: right;
}

.task_progress_done:before {
    content: '';
    left: 0;
    right: 0;
    height: 100%;
    position: absolute;
    border-radius: 2.77vw;
    background-image: url(../resource/task_progress.png);
    background-size: cover;
}

.task_progress_percent {
    font-size: 2.22vw;
    font-weight: 500;
    color: #FDB255;
    line-height: 1.67vw;
    margin-left: 1vw;
}

.empty_icon {
    background: #2E2E2E;
}

.empty_container {
    height: 3.2vw;
    border-radius: 1vw;
    overflow: hidden;
    background-color: #2E2E2E;
    position: relative;
}

.empty_container:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    filter: blur(6px);
    background: linear-gradient(100deg, transparent 20%, #3D3D3D 50%, transparent 80%);
    transform: translateX(-100%);
    animation: loading 3.5s linear infinite;
}

@keyframes loading {
    100% {
        transform: translateX(100%);
    }
}

.empty_btn {
    background: #2E2E2E;
    width: 18.06vw;
    height: 6.94vw;
    border-radius: 4.8vw;
}
/* task */

/* overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeOut 3500ms ease-in-out forwards;
}

.overlay_icon {
    position: absolute;
    top: calc(50% - 19.445vw);
    left: 50%;
    z-index: 99;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    flex-direction: column;
}

.overlay_icon_star {
    width: 23.75vw;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.overlay_icon_coin {
    width: 12.78vw;
    height: 12.78vw;
}

.overlay_shadow {
    width: 23.33vw;
    height: 1.39vw;
    margin-top: 0.83vw;
    background: linear-gradient(270deg, rgba(255, 223, 162, 0.31) 0%, #F2C770 49%, rgba(255, 222, 161, 0.31) 99%);
}

.overlay_content {
    width: 62.5vw;
    height: 16.52vw;
    padding: 11.81vw 0 10.56vw;
    background: url(../resource/success_overlay_black.png) no-repeat;
    background-size: 62.5vw 38.89vw;
    border-radius: 5.56vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.overlay_value {
    color: #222124;
    font-size: 4.72vw;
    position: relative;
}

.overlay_value:before {
    content: '';
    width: 8vw;
    height: 0.42vw;
    top: 50%;
    left: -10vw;
    position: absolute;
    background: linear-gradient(90deg, rgba(255, 229, 190, 0) 0%, #F9C866 99%);
}

.overlay_value:after {
    content: '';
    width: 8vw;
    height: 0.42vw;
    top: 50%;
    right: -10vw;
    position: absolute;
    background: linear-gradient(270deg, rgba(255, 229, 190, 0) 0%, #F9C866 99%);
}

.overlay_bonus {
    color: #F39E09;
    display: grid;
    column-gap: 1.25vw;
    font-weight: 500;
    font-size: 5.83vw;
    align-items: center;
    grid-template-columns: 5.56vw 1fr;
}

.overlay_bonus_img {
    width: 5.56vw;
}

.overlay_rb {
    position: absolute;
    width: 27.78vw;
    height: 27.78vw;
    opacity: 0.1;
    right: -4.03vw;
    bottom: -11.11vw;
}

@keyframes fadeOut {
    0%, 85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* overlay */

/* fail_overlay */

#fail_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fail_overlay_icon {
    position: absolute;
    top: calc(50% - 22.22vw);
    left: 50%;
    z-index: 99;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    flex-direction: column;
}

.fail_overlay_icon_star {
    width: 23.75vw;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fail_overlay_icon_coin {
    width: 12.78vw;
    height: 12.78vw;
    filter: grayscale(100%);
}

.fail_overlay_shadow {
    width: 23.33vw;
    height: 1.39vw;
    margin-top: 0.83vw;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #D3D0C4 50%, rgba(255, 255, 255, 0) 99%);
}

.fail_overlay_content {
    width: 62.5vw;
    height: 30.69vw;
    padding: 8.47vw 0 5.28vw;
    background: url(../resource/fail_overlay.png) no-repeat;
    background-size: 62.5vw auto;
    border-radius: 5.56vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    position: relative;
}

.fail_overlay_value {
    color: #222124;
    font-size: 4.72vw;
    position: relative;
}

.fail_overlay_value:before {
    content: '';
    width: 8vw;
    height: 0.42vw;
    top: 50%;
    left: -10vw;
    position: absolute;
    background: linear-gradient(90deg, rgba(191, 191, 191, 0) 0%, #D0D0D0 99%);
}

.fail_overlay_value:after {
    content: '';
    width: 8vw;
    height: 0.42vw;
    top: 50%;
    right: -10vw;
    position: absolute;
    background: linear-gradient(270deg, rgba(191, 191, 191, 0) 0%, #D0D0D0 99%);
}

#fail_overlay_text {
    width: 80%;
    color: #666666;
    font-size: 3.89vw;
    text-align: center;
    word-wrap:break-word;
    word-break: break-all;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.fail_overlay_btn {
    display: flex;
    z-index: 10;
}

.fail_overlay_again {
    width: 30.56vw;
    height: 8.33vw;
    font-weight: 500;
    border-radius: 8.33vw;
    color: #FFFFFF;
    font-size: 3.88vw;
    background: #FDB255;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fail_overlay_exit {
    color: #666666;
    width: 19.44vw;
    height: 8.33vw;
    font-weight: 500;
    font-size: 3.61vw;
    border-radius: 12.5vw;
    margin-right: 4.17vw;
    background: #F8F8F8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fail_overlay_rb {
    position: absolute;
    width: 27.78vw;
    height: 27.78vw;
    opacity: 0.2;
    right: -4.03vw;
    bottom: -5.56vw;
    filter: grayscale(100%);
}

/* fail_overlay */

/* errorMsg */

#errorMsg {
    position: fixed;
    left: 50%;
    bottom: 10%;
    z-index: 100;
    transform: translate(-50%, 0);

    padding: 0.555vw 2.777vw;
    border-radius: 1.333vw;
    background: rgba(100, 98, 98, 0.81);
    color: #FFFFFF;
    font-size: 4.444vw;

    animation: fadeOut 3500ms ease-in-out forwards;
}

/* errorMsg */

/* offlineMsg */
#offlineMsg {
    position: fixed;
    left: 50%;
    bottom: 10%;
    z-index: 100;
    transform: translate(-50%, 0);

    padding: 0.555vw 2.777vw;
    border-radius: 1.333vw;
    background: rgba(100, 98, 98, 0.81);
    color: #FFFFFF;
    font-size: 4.444vw;
    text-wrap: nowrap;

    animation: fadeOut 3500ms ease-in-out forwards;
}
/* offlineMsg */
