/* Streak Card Widget - Week View Design - Compact Version */

.streak-card-placeholder {
    min-height: 180px;
}

.streak-card-loading {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 1rem;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
}

.streak-card-loading .loading-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Main Card - Match main-menu width */
.streak-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    max-width: 500px;
    margin: 0 auto 1rem auto;
}

.streak-card::after {
    content: 'Tap to view full details';
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.streak-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.streak-card:hover::after {
    opacity: 1;
}

/* Header */
.streak-card-header {
    margin-bottom: 0.5rem;
}

.streak-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.streak-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.view-details-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 600;
}

.details-text {
    color: rgba(147, 197, 253, 0.9);
}

.arrow-icon {
    color: rgba(147, 197, 253, 0.9);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.streak-card:hover .view-details-btn {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

.streak-card:hover .arrow-icon {
    transform: translateX(4px);
}

.streak-card-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Week Grid */
.streak-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Day Cell */
.streak-day-cell {
    background: rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    padding: 0.4rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    z-index: 1;
}

/* Chain connector - horizontal line between completed days */
.streak-day-cell.completed:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 3px;
    background: rgba(34, 197, 94, 0.6);
    z-index: 0;
}

/* Hide connector if next day is not completed (chain is broken) */
.streak-day-cell.completed:not(:last-child):has(+ .streak-day-cell:not(.completed))::after {
    background: rgba(71, 85, 105, 0.3);
    opacity: 0.3;
}

/* Glow effect for active streak chain */
.streak-day-cell.completed {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.streak-day-cell.completed.today {
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.4),
                0 0 12px rgba(59, 130, 246, 0.3);
    animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.3),
                    0 0 10px rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.5),
                    0 0 15px rgba(59, 130, 246, 0.4);
    }
}

.streak-day-cell.today {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.1);
}

.streak-day-cell.completed {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Day Icon */
.day-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(71, 85, 105, 0.5);
    transition: all 0.3s ease;
}

.streak-day-cell.completed .day-icon {
    background: rgba(34, 197, 94, 0.2);
}

.chain-icon {
    width: 16px;
    height: 16px;
    color: #fbbf24;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
    transform: rotate(45deg);
}

.check-icon {
    font-size: 1rem;
    color: #22c55e;
    font-weight: 700;
}

.diamond-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

.streak-day-cell.completed .diamond-icon {
    opacity: 1;
}

/* Day Reward */
.day-reward {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(59, 130, 246, 0.2);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.streak-day-cell.completed .day-reward {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* Day Name */
.day-name {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.streak-day-cell.today .day-name {
    color: rgba(59, 130, 246, 0.9);
}

.streak-day-cell.completed .day-name {
    color: rgba(34, 197, 94, 0.8);
}

/* Claim Button */
.claim-reward-btn {
    width: 100%;
    padding: 0.6rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.claim-reward-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.claim-reward-btn:active {
    transform: translateY(0);
}

.claim-btn-text {
    letter-spacing: 0.5px;
}

/* Claimed Badge */
.claimed-badge {
    width: 100%;
    padding: 0.6rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    color: #22c55e;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Daily Reset */
.daily-reset {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

#countdown {
    color: rgba(59, 130, 246, 0.9);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Notification */
.streak-notification-card {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.streak-notification-card.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content-card {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .streak-card {
        padding: 1.25rem;
    }

    .streak-card-title {
        font-size: 1.25rem;
    }

    .view-details-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .streak-card::after {
        font-size: 0.7rem;
        bottom: 0.6rem;
        right: 0.8rem;
    }

    .streak-week-grid {
        gap: 0.4rem;
    }

    .streak-day-cell {
        padding: 0.6rem 0.4rem;
    }

    .day-icon {
        width: 36px;
        height: 36px;
    }

    .diamond-icon {
        font-size: 1.1rem;
    }

    .chain-icon {
        font-size: 1.3rem;
    }

    .check-icon {
        font-size: 1.3rem;
    }

    .day-reward {
        font-size: 0.75rem;
        padding: 0.1rem 0.4rem;
    }

    .day-name {
        font-size: 0.7rem;
    }

    .claim-reward-btn {
        font-size: 1rem;
        padding: 0.9rem;
    }
}

@media (max-width: 480px) {
    .streak-week-grid {
        gap: 0.3rem;
    }

    .streak-day-cell {
        padding: 0.5rem 0.3rem;
    }

    .day-icon {
        width: 32px;
        height: 32px;
    }

    .diamond-icon {
        font-size: 1rem;
    }

    .chain-icon {
        font-size: 1.2rem;
    }

    .check-icon {
        font-size: 1.2rem;
    }

    .day-reward {
        font-size: 0.7rem;
    }

    .day-name {
        font-size: 0.65rem;
    }
}
