/* Zibll Donation Pro - 前端样式 */

/* 签到日历 */
.zdp-checkin-calendar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

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

.zdp-calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.zdp-calendar-nav {
    display: flex;
    gap: 8px;
}

.zdp-calendar-nav button {
    background: #f5f7fa;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    color: #5b7c99;
    transition: all 0.2s;
}

.zdp-calendar-nav button:hover {
    background: #5b7c99;
    color: #fff;
}

.zdp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.zdp-calendar-week {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 8px 0;
    font-weight: 500;
}

.zdp-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.zdp-calendar-day.other-month {
    color: #ccc;
}

.zdp-calendar-day.today {
    background: #f0f3f7;
    color: #5b7c99;
    font-weight: 600;
}

.zdp-calendar-day.signed {
    background: #5b7c99;
    color: #fff;
}

.zdp-calendar-day.signed::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

.zdp-calendar-day.resigned {
    background: #f0a020;
    color: #fff;
}

.zdp-calendar-day.missed {
    color: #ff4d4f;
    text-decoration: line-through;
}

.zdp-calendar-day:hover:not(.other-month) {
    background: #f0f3f7;
}

.zdp-checkin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.zdp-stat-item {
    text-align: center;
}

.zdp-stat-num {
    font-size: 24px;
    font-weight: 700;
    color: #5b7c99;
    display: block;
}

.zdp-stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.zdp-checkin-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #5b7c99, #6e8eb0);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.zdp-checkin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(91, 124, 153, 0.3);
}

.zdp-checkin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 积分排行榜 */
.zdp-points-rank {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.zdp-rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zdp-rank-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.zdp-rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f3f7;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-right: 12px;
}

.zdp-rank-item:nth-child(1) .zdp-rank-num {
    background: linear-gradient(135deg, #f0a020, #f7c850);
    color: #fff;
}

.zdp-rank-item:nth-child(2) .zdp-rank-num {
    background: linear-gradient(135deg, #b0b8c5, #c5cdd9);
    color: #fff;
}

.zdp-rank-item:nth-child(3) .zdp-rank-num {
    background: linear-gradient(135deg, #cd7f32, #e09860);
    color: #fff;
}

.zdp-rank-user {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.zdp-rank-points {
    font-size: 14px;
    color: #5b7c99;
    font-weight: 600;
}

/* 打赏弹窗 */
.zdp-reward-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.zdp-reward-modal.show {
    display: flex;
    animation: zdp-fade-in 0.3s;
}

.zdp-reward-box {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.zdp-reward-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.zdp-reward-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.zdp-reward-amount {
    padding: 10px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #666;
}

.zdp-reward-amount.active,
.zdp-reward-amount:hover {
    border-color: #5b7c99;
    color: #5b7c99;
    background: #f5f7fa;
}

.zdp-reward-custom {
    margin-bottom: 16px;
}

.zdp-reward-custom input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.zdp-reward-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.zdp-reward-method {
    flex: 1;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.zdp-reward-method.active {
    border-color: #5b7c99;
    background: #f5f7fa;
}

.zdp-reward-submit {
    width: 100%;
    padding: 12px;
    background: #5b7c99;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}

.zdp-reward-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

/* 付费阅读遮罩 */
.zdp-paywall {
    position: relative;
    margin-top: 40px;
}

.zdp-paywall-content {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.zdp-paywall-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, #fff 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 30px;
}

.zdp-paywall-box {
    text-align: center;
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.zdp-paywall-price {
    font-size: 28px;
    color: #5b7c99;
    font-weight: 700;
    margin-bottom: 8px;
}

.zdp-paywall-btn {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(135deg, #5b7c99, #6e8eb0);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.zdp-paywall-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(91, 124, 153, 0.3);
    color: #fff;
}

/* Toast 提示 */
.zdp-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 10000;
    animation: zdp-slide-down 0.3s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.zdp-toast.success { background: #52c41a; }
.zdp-toast.error { background: #ff4d4f; }
.zdp-toast.info { background: #5b7c99; }

@keyframes zdp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zdp-slide-down {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 暗色模式 */
body.zdt-dark .zdp-checkin-calendar,
body.zdt-dark .zdp-points-rank {
    background: #2a2d33;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.zdt-dark .zdp-calendar-title {
    color: #e0e0e0;
}

body.zdt-dark .zdp-calendar-day {
    color: #aaa;
}

body.zdt-dark .zdp-calendar-day.today {
    background: #3a3d43;
    color: #8eb0d0;
}

body.zdt-dark .zdp-calendar-day:hover:not(.other-month) {
    background: #3a3d43;
}

body.zdt-dark .zdp-calendar-week {
    color: #888;
}

body.zdt-dark .zdp-rank-item {
    border-bottom-color: #3a3d43;
}

body.zdt-dark .zdp-rank-user {
    color: #e0e0e0;
}

body.zdt-dark .zdp-reward-box {
    background: #2a2d33;
}

body.zdt-dark .zdp-reward-title {
    color: #e0e0e0;
}

body.zdt-dark .zdp-reward-amount,
body.zdt-dark .zdp-reward-method {
    border-color: #3a3d43;
    color: #aaa;
}

body.zdt-dark .zdp-reward-amount.active,
body.zdt-dark .zdp-reward-method.active {
    background: #3a3d43;
    color: #8eb0d0;
}

body.zdt-dark .zdp-paywall-mask {
    background: linear-gradient(to bottom, transparent, #2a2d33 60%);
}

body.zdt-dark .zdp-paywall-box {
    background: #2a2d33;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 响应式 */
@media (max-width: 768px) {
    .zdp-checkin-calendar {
        padding: 15px;
    }

    .zdp-calendar-day {
        font-size: 11px;
    }

    .zdp-stat-num {
        font-size: 20px;
    }

    .zdp-reward-amounts {
        grid-template-columns: repeat(3, 1fr);
    }
}
