/* 打卡系统样式 */
.today-status {
    margin-bottom: 2rem;
}

.status-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-header h2 {
    color: var(--text-primary);
    margin: 0;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--warning-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* 进度环 */
.progress-ring {
    position: relative;
    display: inline-block;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: var(--light-color);
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 任务卡片 */
.checkin-tasks h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.task-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.task-card.completed {
    border-left-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.task-card.completed .task-icon {
    background: var(--success-color);
}

.task-card.completed .checkin-btn {
    display: none;
}

.task-card.completed .completed-status {
    display: flex !important;
}

.task-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.task-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.task-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--warning-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.task-status {
    margin-top: 1rem;
}

.checkin-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.checkin-btn:hover {
    background: #3730a3;
    transform: translateY(-1px);
}

.completed-status {
    background: var(--success-color);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 打卡记录 */
.checkin-history h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.history-list {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.history-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.history-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.history-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: right;
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 连续打卡奖励 */
.streak-rewards h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.streak-card {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.streak-icon {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.streak-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.streak-info p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.streak-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.streak-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.streak-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.5s ease;
}

#streakText {
    font-weight: 600;
    font-size: 0.9rem;
}

/* 打卡确认弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.checkin-details {
    text-align: center;
    margin-bottom: 2rem;
}

.checkin-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.checkin-details h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.checkin-details p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.checkin-note label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.checkin-note textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
}

.checkin-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 成就徽章 */
.achievement-badge {
    display: inline-block;
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .status-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .streak-card {
        flex-direction: column;
        text-align: center;
    }
    
    .streak-progress {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }
    
    .checkin-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .task-card {
        padding: 1rem;
    }
    
    .task-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .streak-card {
        padding: 1.5rem;
    }
    
    .streak-icon {
        font-size: 2.5rem;
    }
}

/* 动画效果 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.task-card.completed {
    animation: bounceIn 0.6s ease-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.completed-status {
    animation: pulse 2s infinite;
}