/* Advanced UI Components - Modern Website Features */

/* ===== LOADING STATES ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.05) 25%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 2s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 16px;
    margin: 8px 0;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin: 12px 0;
}

.skeleton-image {
    height: 200px;
    width: 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #22d3ee);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.3), 
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== ADVANCED TOOLTIPS ===== */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before,
.tooltip::after {
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 1000;
}

.tooltip::before {
    content: attr(data-tooltip);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip::after {
    content: '';
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== ADVANCED MODALS ===== */
.modal-overlay.advanced {
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.8);
}

.modal-content.advanced {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content.advanced {
    transform: scale(1);
    opacity: 1;
}

/* ===== ADVANCED NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 400px;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #00ff88;
}

.notification.error {
    border-left: 4px solid #ff4757;
}

.notification.warning {
    border-left: 4px solid #ffa502;
}

.notification.info {
    border-left: 4px solid #22d3ee;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.notification-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== ADVANCED SEARCH ===== */
.search-container.advanced {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input.advanced {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input.advanced:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
    outline: none;
}

.search-icon.advanced {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-top: 8px;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-suggestions.show {
    opacity: 1;
    transform: translateY(0);
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* ===== ADVANCED CARDS ===== */
.card.advanced {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.card.advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card.advanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card.advanced .card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card.advanced:hover .card-glow {
    opacity: 1;
}

/* ===== ADVANCED PAGINATION ===== */
.pagination.advanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #00ff88;
    color: #0f172a;
    border-color: #00ff88;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
}

/* ===== ADVANCED TABS ===== */
.tabs.advanced {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    position: relative;
    backdrop-filter: blur(10px);
}

.tab.advanced {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.7);
}

.tab.advanced.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===== ADVANCED FORMS ===== */
.form-group.advanced {
    position: relative;
    margin-bottom: 24px;
}

.form-input.advanced {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-input.advanced:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
    outline: none;
}

.form-label.advanced {
    position: absolute;
    top: 16px;
    left: 20px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.8);
    padding: 0 8px;
    border-radius: 4px;
}

.form-input.advanced:focus + .form-label.advanced,
.form-input.advanced:not(:placeholder-shown) + .form-label.advanced {
    top: -12px;
    left: 12px;
    font-size: 12px;
    color: #00ff88;
}

/* ===== ADVANCED BUTTONS ===== */
.btn.advanced {
    position: relative;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn.advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn.advanced:hover::before {
    left: 100%;
}

.btn.advanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn.advanced.primary {
    background: linear-gradient(135deg, #00ff88, #22d3ee);
    color: #0f172a;
    border: none;
}

.btn.advanced.primary:hover {
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .notification {
        left: 20px;
        right: 20px;
        transform: translateY(-100%);
        max-width: none;
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .search-container.advanced {
        max-width: none;
    }
    
    .pagination.advanced {
        gap: 4px;
    }
    
    .pagination-btn {
        width: 36px;
        height: 36px;
    }
    
    .tabs.advanced {
        flex-direction: column;
    }
    
    .tab.advanced {
        text-align: left;
    }
}

/* ===== DARK MODE OPTIMIZATIONS ===== */
@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(90deg, 
            rgba(255,255,255,0.02) 25%, 
            rgba(255,255,255,0.05) 50%, 
            rgba(255,255,255,0.02) 75%
        );
    }
    
    .tooltip::before {
        background: rgba(0, 0, 0, 0.95);
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== FOCUS INDICATORS ===== */
.btn.advanced:focus-visible,
.form-input.advanced:focus-visible,
.pagination-btn:focus-visible,
.tab.advanced:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}
