/* Engagement Features Styles */

/* Daily Insight Widget */
#daily-insight {
    margin: var(--spacing-md) 0;
    animation: fadeInUp 0.6s ease-out;
}

.insight-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-md);
    border-left: 4px solid #ffd700;
    position: relative;
    overflow: hidden;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-10%, -10%);
    }
}

.insight-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-xs);
    opacity: 0.9;
}

.insight-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

.insight-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: var(--spacing-xs);
    opacity: 0.85;
}

.insight-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: capitalize;
}

.insight-author {
    font-style: italic;
}

.insight-cta {
    font-family: var(--font-mono);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.9);
    padding: 0;
    border-radius: 12px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 500px;
    width: 90%;
}

.ebook-offer-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ebook-offer-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.ebook-offer-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.ebook-offer-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ebook-offer-content p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.ebook-offer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ebook-offer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Email Popup */
.email-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.email-popup {
    background: var(--bg-color);
    max-width: 500px;
    width: 90%;
    padding: var(--spacing-md);
    position: relative;
    animation: slideUp 0.4s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.email-popup-close:hover {
    color: var(--text-main);
}

.email-popup-content h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.email-popup-content p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.email-popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: var(--spacing-sm);
}

.email-popup-form input {
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    transition: border-color 0.2s ease;
}

.email-popup-form input:focus {
    border-color: var(--text-main);
    outline: none;
}

.email-popup-privacy {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-main);
    color: var(--bg-color);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-success {
    background: #10b981;
}

.notification-achievement {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
}

/* Social Proof Elements */
.reader-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.reader-count::before {
    content: '👥';
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .time-tracker {
        padding: 0.4rem 0.8rem;
    }

    .time-count {
        font-size: 0.9rem;
    }

    .ebook-offer-content {
        padding: var(--spacing-md);
    }

    .ebook-offer-icon {
        font-size: 3rem;
    }

    .ebook-offer-content h3 {
        font-size: 1.5rem;
    }
}