/* Custom styles for BrowserWithin */

/* Tab styling */
.tab {
    transition: all 0.2s ease;
    user-select: none;
}

.tab:hover {
    background: #374151 !important;
    transform: translateY(-1px);
}

.tab.active {
    background: #4b5563 !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.tab-close:hover {
    background: #374151;
    border-radius: 50%;
    padding: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* URL input focus effect */
#urlInput:focus {
    animation: urlFocus 0.3s ease;
}

@keyframes urlFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5);
    }
    100% {
        box-shadow: 0 0 0 6px rgba(14, 165, 233, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .tab span {
        display: none;
    }
    
    .tab {
        padding: 0.5rem !important;
    }
    
    #urlInput {
        font-size: 1rem !important;
    }
}

/* Gradient border for main container */
#browserView {
    background: linear-gradient(45deg, #0ea5e9, #d946ef);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    border-radius: inherit;
}

#browserView::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: #1f2937;
    border-radius: inherit;
    z-index: 0;
}

#webviewFrame {
    position: relative;
    z-index: 1;
    background: white;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}