/* Additional styles for improved UX and new components */

/* Loading states */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
}

.loading i {
    font-size: 18px;
}

/* Error and success states */
.error, .success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.success {
    background-color: #efe;
    color: #393;
    border: 1px solid #cfc;
}

/* Message styles */
.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message--info {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.message--error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.message--success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.notification--success {
    border-left: 4px solid #4caf50;
}

.notification--error {
    border-left: 4px solid #f44336;
}

.notification--info {
    border-left: 4px solid #2196f3;
}

.notification__close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.notification__close:hover {
    color: #666;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Card modal improvements */
.card-modal {
    position: relative;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
}

.card-modal img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state__content h3 {
    margin: 20px 0 10px;
    color: #333;
}

.empty-state__content p {
    color: #888;
    font-size: 14px;
}

/* Button improvements */
.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.button--secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.button--secondary:hover {
    background: #667eea;
    color: white;
}

/* Form validation styles */
input:invalid {
    border-color: #f44336;
}

input:valid {
    border-color: #4caf50;
}

/* Quick actions */
.quick-actions, .cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Welcome sections */
.welcome-authenticated, .welcome-guest {
    text-align: center;
    padding: 40px 20px;
}

.welcome-authenticated h2, .welcome-guest h2 {
    margin-bottom: 10px;
    color: #333;
}

.welcome-authenticated p, .welcome-guest p {
    color: #666;
    margin-bottom: 30px;
}

/* User stats */
.user-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.stat-item i {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .quick-actions, .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-actions .button, .cta-buttons .button {
        width: 100%;
        max-width: 250px;
    }
    
    .user-stats {
        gap: 15px;
    }
}
