/* ========================================
   签到日历弹窗样式
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: "varien", Arial, sans-serif;
    position: relative;
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 蒙层 */
.checkin-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    animation: fadeIn 0.3s ease-out;
}

/* 签到面板 */
.checkin-dialog-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: url('../../../style/images/center/check_bg.png') no-repeat center center;
    background-size: 100% 100%;
    border-radius: 30px;
    padding: 25px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 2;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 月份标题容器 */
.checkin-dialog-month-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

/* 月份标题 */
.checkin-dialog-month {
    font-family: "varien", Arial, sans-serif;
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);
    flex: 1;
}

/* 月份切换按钮 */
.checkin-dialog-month-prev,
.checkin-dialog-month-next {
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.checkin-dialog-month-prev img,
.checkin-dialog-month-next img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.checkin-dialog-month-prev:hover,
.checkin-dialog-month-next:hover {
    transform: scale(1.1);
}

.checkin-dialog-month-prev:active,
.checkin-dialog-month-next:active {
    transform: scale(0.95);
}

/* 禁用状态 */
.checkin-dialog-month-prev.disabled,
.checkin-dialog-month-next.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 奖励信息 */
.checkin-dialog-rewards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.checkin-dialog-reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "varien", Arial, sans-serif;
    font-size: 12px;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.checkin-dialog-reward-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.checkin-dialog-reward-value {
    font-weight: bold;
    color: #FFD700;
}

/* 星期标题 */
.checkin-dialog-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.checkin-dialog-week-item {
    font-family: "varien", Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    padding: 5px 0;
}

/* 日期网格 */
.checkin-dialog-days-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* 日期盒子 */
.checkin-dialog-day-box {
    width: calc(100% / 7);
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 5px 0;
    position: relative;
    box-sizing: border-box;
    padding: 0 2px;
    transition: opacity 0.3s ease-out, transform 0.4s ease-out;
}

/* 空白日期 */
.checkin-dialog-day-box.empty {
    background: transparent;
}

/* 日期内容容器 */
.checkin-dialog-day-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(91, 153, 255, 1);
    border-radius: 8px;
    padding: 5px 0;
}

/* 已签到样式 */
.checkin-dialog-day-box.checked .checkin-dialog-day-content {
    background-color: rgba(91, 153, 255, 1);
}

/* 漏签样式 */
.checkin-dialog-day-box.missed .checkin-dialog-day-content {
    background-color: rgba(91, 153, 255, 1);
}

.checkin-dialog-day-box.missed .checkin-dialog-day-number {
    color: rgba(255, 255, 255, 0.6);
}

.checkin-dialog-day-box.missed .checkin-dialog-day-icon-text {
    color: rgba(255, 255, 255, 0.8);
}

/* 未签到样式 */
.checkin-dialog-day-box.unchecked .checkin-dialog-day-content {
    background-color: rgba(91, 153, 255, 1);
    cursor: pointer;
}

.checkin-dialog-day-box.unchecked:hover .checkin-dialog-day-content {
    background-color: rgba(101, 163, 255, 1);
}

/* 无数据样式 */
.checkin-dialog-day-box.empty .checkin-dialog-day-content {
    background-color: grey;
}

/* 日期数字 */
.checkin-dialog-day-number {
    font-family: "varien", Arial, sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    margin-bottom: 5px;
}

/* Tomorrow 文字特殊样式 */
.checkin-dialog-day-number.tomorrow {
    font-size: 8px;
}

/* 已签到的日期数字颜色 */
.checkin-dialog-day-box.checked .checkin-dialog-day-number {
    color: rgba(0, 255, 66, 1);
}

/* 日期图标容器 */
.checkin-dialog-day-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* 图标图片 */
.checkin-dialog-day-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 图标文字 */
.checkin-dialog-day-icon-text {
    font-family: "varien", Arial, sans-serif;
    font-size: 9px;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* 已签到文字颜色 */
.checkin-dialog-day-box.checked .checkin-dialog-day-icon-text {
    color: rgba(0, 255, 66, 1);
}

/* 关闭按钮 */
.checkin-dialog-close-btn {
    width: 200px;
    height: 50px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.checkin-dialog-close-btn:hover {
    transform: scale(1.05);
}

.checkin-dialog-close-btn:active {
    transform: scale(0.95);
}

.checkin-dialog-close-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}

/* 滚动条样式 */
.checkin-dialog-panel::-webkit-scrollbar {
    width: 6px;
}

.checkin-dialog-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.checkin-dialog-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.checkin-dialog-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 响应式适配 */
@media (max-width: 414px) {
    .checkin-dialog-panel {
        padding: 20px 15px;
    }

    .checkin-dialog-month-container {
        gap: 15px;
    }

    .checkin-dialog-month {
        font-size: 28px;
    }

    .checkin-dialog-month-prev,
    .checkin-dialog-month-next {
        width: 35px;
        height: 35px;
    }

    .checkin-dialog-reward-item {
        font-size: 11px;
    }

    .checkin-dialog-reward-item img {
        width: 25px;
        height: 25px;
    }

    .checkin-dialog-week-item {
        font-size: 11px;
    }

    .checkin-dialog-day-box {
        height: 55px;
    }

    .checkin-dialog-day-number {
        font-size: 11px;
    }

    .checkin-dialog-day-icon img {
        width: 20px;
        height: 20px;
    }

    .checkin-dialog-day-icon-text {
        font-size: 8px;
    }

    .checkin-dialog-close-btn {
        width: 180px;
        height: 45px;
    }
}

@media (max-width: 375px) {
    .checkin-dialog-panel {
        padding: 18px 12px;
    }

    .checkin-dialog-month-container {
        gap: 10px;
    }

    .checkin-dialog-month {
        font-size: 26px;
    }

    .checkin-dialog-month-prev,
    .checkin-dialog-month-next {
        width: 30px;
        height: 30px;
    }

    .checkin-dialog-reward-item {
        font-size: 10px;
    }

    .checkin-dialog-reward-item img {
        width: 22px;
        height: 22px;
    }

    .checkin-dialog-week-item {
        font-size: 10px;
    }

    .checkin-dialog-day-box {
        height: 50px;
    }

    .checkin-dialog-day-number {
        font-size: 10px;
    }

    .checkin-dialog-day-icon img {
        width: 18px;
        height: 18px;
    }

    .checkin-dialog-day-icon-text {
        font-size: 7px;
    }

    .checkin-dialog-close-btn {
        width: 160px;
        height: 40px;
    }
}

@media (min-width: 768px) {
    .checkin-dialog-panel {
        max-width: 550px;
        padding: 30px 25px;
    }

    .checkin-dialog-month-container {
        gap: 25px;
    }

    .checkin-dialog-month {
        font-size: 36px;
    }

    .checkin-dialog-month-prev,
    .checkin-dialog-month-next {
        width: 45px;
        height: 45px;
    }

    .checkin-dialog-reward-item {
        font-size: 13px;
    }

    .checkin-dialog-reward-item img {
        width: 35px;
        height: 35px;
    }

    .checkin-dialog-week-item {
        font-size: 13px;
    }

    .checkin-dialog-day-box {
        height: 65px;
    }

    .checkin-dialog-day-number {
        font-size: 13px;
    }

    .checkin-dialog-day-icon img {
        width: 26px;
        height: 26px;
    }

    .checkin-dialog-day-icon-text {
        font-size: 10px;
    }

    .checkin-dialog-close-btn {
        width: 220px;
        height: 55px;
    }
}