/* YouTube Downloader Plugin Styles */

.ytd-container {
    background: var(--bs-dark);
    min-height: 100vh;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Progress bar styling */
.progress-lg {
    height: 1.5rem;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

/* Video thumbnail styling */
#videoThumbnail {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* History item styling */
.history-item {
    border-bottom: 1px solid var(--bs-gray-800);
    padding: 1rem 0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .btn {
    min-width: 100px;
}

/* Status badges */
.status-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.status-completed {
    background-color: var(--bs-success);
}

.status-failed {
    background-color: var(--bs-danger);
}

.status-pending {
    background-color: var(--bs-warning);
}

.status-downloading {
    background-color: var(--bs-info);
}

/* Input styling */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Animation for showing/hiding sections */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Download button glow effect */
.download-glow {
    animation: downloadGlow 2s ease-in-out infinite alternate;
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.5);
    position: relative;
    overflow: hidden;
}

.download-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: downloadShimmer 3s linear infinite;
}

@keyframes downloadGlow {
    from {
        box-shadow: 0 0 20px rgba(25, 135, 84, 0.5);
        transform: scale(1);
    }
    to {
        box-shadow: 0 0 30px rgba(25, 135, 84, 0.8);
        transform: scale(1.02);
    }
}

@keyframes downloadShimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.download-glow:hover {
    animation-play-state: paused;
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(25, 135, 84, 1);
}

/* Pulse animation for completed status */
.progress-completed {
    animation: progressPulse 1s ease-in-out;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .input-group-lg > .form-control,
    .input-group-lg > .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .row > .col-4,
    .row > .col-sm-3,
    .row > .col-sm-6,
    .row > .col-md-4,
    .row > .col-md-6,
    .row > .col-md-8 {
        margin-bottom: 1rem;
    }
}

/* Toast notifications */
.toast-container {
    z-index: 1060;
}

.toast {
    min-width: 300px;
}

/* Button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-success:disabled {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

/* Thumbnail placeholder */
.thumbnail-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bs-gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* History table styling */
.table-dark {
    --bs-table-bg: var(--bs-dark);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

/* Custom scrollbar */
.ytd-container::-webkit-scrollbar {
    width: 8px;
}

.ytd-container::-webkit-scrollbar-track {
    background: var(--bs-dark);
}

.ytd-container::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

.ytd-container::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Form validation styling */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb), 0.25);
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--bs-success);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-success-rgb), 0.25);
}