/* Notification Component */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(46,204,113,0.15);
    border: 1px solid rgba(46,204,113,0.08);
    font-size: 1rem;
    letter-spacing: 0.2px;
}

.notification-success { background: #27ae60; }
.notification-error { background: #e74c3c; }
.notification-warning { background: #f39c12; }
.notification-info { background: #3498db; }

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

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

/* Tooltip Component */
.tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    font-weight: 500;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.9);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2ecc71;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Component */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(46,204,113,0.13);
    padding: 2rem;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Responsive Image Grid */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.responsive-grid-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
}

.responsive-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.responsive-grid-item:hover img {
    transform: scale(1.1);
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: #2ecc71; color: white; }
.badge-secondary { background: #6c757d; color: white; }
.badge-success { background: #28a745; color: white; }
.badge-danger { background: #dc3545; color: white; }
.badge-warning { background: #ffc107; color: #212529; }
.badge-info { background: #17a2b8; color: white; }

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(46,204,113,0.08);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    background: #f8f9fa;
    border: 1px solid #2ecc71;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    width: 60%;
}

.skeleton-image {
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        font-size: 0.95rem;
    }
    
    .responsive-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}
