/* Guest UI Styles */

/* Guest Banner */
.guest-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1001;
    animation: slideDown 0.4s ease-out;
    margin-bottom: 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.guest-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.guest-notice {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guest-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guest-icon {
    font-size: 1.5rem;
}

.guest-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.guest-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.guest-stats {
    flex: 1;
    text-align: center;
}

.quiz-counter {
    font-size: 1rem;
}

.quiz-counter strong {
    font-size: 1.5rem;
    font-weight: 700;
}

.upgrade-btn-small {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.upgrade-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.guest-notice {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.95;
    text-align: center;
}

/* Warning state */
.guest-banner.warning {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
}

.guest-banner.warning .guest-notice {
    animation: pulse 2s infinite;
}

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

/* Limit reached state */
.guest-banner.limit-reached {
    background: linear-gradient(135deg, #ff6348 0%, #e74c3c 100%);
}

/* Guest Warning Toast */
.guest-warning-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-left: 4px solid #ffa502;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.guest-warning-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.warning-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-icon {
    font-size: 1.5rem;
}

.warning-content p {
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.guest-warning-toast button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-warning-toast button:hover {
    color: #333;
}

/* Feature Lock Icon */
.lock-icon {
    display: inline-block;
    animation: lockShake 0.5s ease;
}

@keyframes lockShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Feature Teaser */
.feature-teaser {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0;
}

.teaser-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.feature-teaser h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-teaser p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Session Expired Modal */
.session-expired-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.session-expired-modal .modal-content {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.session-expired-modal h2 {
    color: #333;
    margin-bottom: 1rem;
}

.session-expired-modal p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* CAPTCHA Modal */
.captcha-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.captcha-modal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.captcha-modal h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.captcha-modal p {
    color: #666;
    margin-bottom: 1.5rem;
}

#captcha-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.captcha-modal .tip {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #667eea;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .guest-banner {
        padding: 1rem;
    }
    
    .guest-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .guest-stats {
        text-align: left;
        width: 100%;
    }
    
    .upgrade-btn-small {
        width: 100%;
    }
    
    .guest-warning-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .feature-teaser {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .guest-banner {
        padding: 0.75rem;
    }
    
    .guest-name {
        font-size: 1rem;
    }
    
    .guest-label {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .quiz-counter strong {
        font-size: 1.2rem;
    }
    
    .session-expired-modal .modal-content,
    .captcha-modal .modal-content {
        padding: 2rem 1rem;
        margin: 1rem;
    }
}
