/* Streak Counter Styles - Matches App Theme */

/* Streak Badge - Uses same gradient as home/profile buttons */
.streak-badge {
    position: fixed;
    top: 20px;
    right: 80px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    /* Match app's primary gradient (green hue 150) */
    background: linear-gradient(135deg, var(--primary-color, hsl(150, 50%, 45%)), var(--accent-color, hsl(150, 40%, 60%)));
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--ui-font, 'Readex Pro', 'Segoe UI', sans-serif);
    border: 1px solid var(--border-color, #e0e5e8);
}

.streak-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.streak-badge:focus {
    outline: none;
    box-shadow: 0 0 0 3px hsla(150, 50%, 45%, 0.3), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.streak-badge.pulse {
    animation: streak-pulse 0.6s ease-out;
}

@keyframes streak-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.streak-fire {
    font-size: 1.1rem;
    line-height: 1;
}

.streak-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Streak text label for larger screens */
.streak-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: none;
}

@media (min-width: 600px) {
    .streak-label {
        display: inline;
    }
}

/* Streak Celebration Popup */
.streak-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 2000;
    padding: 30px 50px;
    /* Use app's green/gold theme for celebrations */
    background: linear-gradient(135deg, var(--primary-color, hsl(150, 50%, 45%)), var(--secondary-color, hsl(45, 65%, 55%)));
    border-radius: var(--border-radius, 16px);
    box-shadow: 0 20px 60px rgba(58, 157, 116, 0.4);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.streak-celebration.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.streak-celebration-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: white;
    text-align: center;
}

.streak-emoji {
    font-size: 4rem;
    animation: celebration-bounce 0.6s ease infinite alternate;
}

@keyframes celebration-bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

.streak-message {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Sign-in Nudge Modal */
.signin-nudge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.signin-nudge-modal.show {
    opacity: 1;
}

.signin-nudge-content {
    position: relative;
    max-width: 400px;
    width: 90%;
    padding: 40px 30px;
    background: var(--card-bg, white);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.signin-nudge-modal.show .signin-nudge-content {
    transform: translateY(0) scale(1);
}

.signin-nudge-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted-text, #666);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.signin-nudge-close:hover {
    color: var(--text-color, #333);
}

.signin-nudge-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
}

.signin-nudge-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color, #333);
    margin: 0 0 15px 0;
}

.signin-nudge-text {
    font-size: 1rem;
    color: var(--muted-text, #666);
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.signin-nudge-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.signin-nudge-benefits li {
    font-size: 0.95rem;
    color: var(--text-color, #333);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.signin-nudge-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signin-nudge-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    /* Use app's primary gradient for sign-in button */
    background: linear-gradient(135deg, var(--primary-color, hsl(150, 50%, 45%)), var(--primary-dark, hsl(150, 55%, 35%)));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.signin-nudge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
}

.signin-nudge-later {
    background: transparent;
    color: var(--muted-text, #666);
    border: none;
    padding: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.signin-nudge-later:hover {
    color: var(--text-color, #333);
}

.signin-nudge-hint {
    font-size: 0.75rem;
    color: var(--muted-text, #999);
    margin: 8px 0 0 0;
    font-style: italic;
    opacity: 0.8;
}

/* Persistent popup - no close button styling needed */
.signin-nudge-persistent {
    /* Slightly more prominent styling */
    border: 2px solid var(--primary-color, hsl(150, 50%, 45%));
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .streak-badge {
        top: 10px;
        right: 70px;
        padding: 6px 12px;
    }

    .streak-fire {
        font-size: 1rem;
    }

    .streak-count {
        font-size: 0.9rem;
    }

    .streak-celebration {
        padding: 25px 35px;
    }

    .streak-emoji {
        font-size: 3rem;
    }

    .streak-message {
        font-size: 1.2rem;
    }

    .signin-nudge-content {
        padding: 30px 20px;
    }
}

/* Dark mode adjustments */
body.dark-mode .streak-badge {
    box-shadow: 0 4px 15px rgba(93, 194, 153, 0.25);
    border-color: var(--border-color-dark, #353d3a);
}

body.dark-mode .signin-nudge-content {
    background: var(--card-bg-dark, #252a28);
}