* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Upload Section */
.upload-section {
    margin-bottom: 3rem;
}

.upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.upload-area.dragging {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

/* Replace .upload-label with .upload-content */
.upload-content {
    pointer-events: none;
    z-index: 0;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.upload-text h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Enhanced File Info Section */
.file-info {
    margin-top: 2rem;
    padding: 0;
    background: white;
    border-radius: 16px;
    color: #333;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.file-header {
    padding: 2rem;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    position: relative;
}

.file-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.file-success-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.success-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.file-title h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    word-break: break-word;
}

.file-title .file-status {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
    font-weight: 500;
}

.file-analytics {
    padding: 2rem;
    background: white;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analytics-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 0 2px 2px 0;
}

.analytics-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.analytics-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.file-capabilities {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.file-capabilities h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
}

.capabilities-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.capability-tag {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    transition: all 0.3s ease;
    cursor: default;
}

.capability-tag.video {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.capability-tag.audio {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-color: #4ecdc4;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.capability-tag.convert {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Add styles for new capability tags and no-operations message */

/* Additional capability tag styles */
.capability-tag.warning {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
    color: white;
    border-color: #f6ad55;
    box-shadow: 0 4px 15px rgba(246, 173, 85, 0.3);
}

.capability-tag.info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border-color: #4299e1;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.capability-tag.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
    border-color: #f56565;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

/* Capabilities note styling */
.capabilities-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #edf2f7, #e2e8f0);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.capabilities-note p {
    margin: 0;
    font-size: 0.85rem;
    color: #4a5568;
    font-style: italic;
}

/* No operations message styling */
.no-operations-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    color: white;
}

.no-operations-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.no-operations-message h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.no-operations-message p {
    margin: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* Enhanced category headers with operation counts */
.category-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: left;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.category-header h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

/* Enhanced analytics grid for better file type display */
.analytics-item.file-type {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.analytics-item.file-type::before {
    background: rgba(255, 255, 255, 0.3);
}

.analytics-item.file-type .analytics-label {
    color: rgba(255, 255, 255, 0.9);
}

.analytics-item.file-type .analytics-value {
    color: white;
    font-weight: 800;
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
    .no-operations-message {
        padding: 2rem 1rem;
    }
    
    .no-operations-icon {
        font-size: 3rem;
    }
    
    .no-operations-message h3 {
        font-size: 1.25rem;
    }
    
    .capabilities-note {
        padding: 0.5rem;
    }
    
    .capabilities-note p {
        font-size: 0.8rem;
    }
    
    .capability-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

.operations-section {
    margin-bottom: 3rem;
    margin-top: 4rem;
    display: none; /* Hidden by default, shown by JavaScript */
}

.operations-section h2 {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Category headers for operations */
.category-header {
    grid-column: 1 / -1;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.category-header:first-child {
    margin-top: 0;
}

.category-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: left;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.operation-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.operation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.operation-icon {
    font-size: 3rem;
}

.operation-content {
    text-align: center;
}

.operation-content h4 {
    font-weight: 600;
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.operation-content p {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
}

.operation-name {
    font-weight: 600;
    color: #4a5568;
    font-size: 1.1rem;
}

/* Upload Progress Container */
.upload-progress-container {
    margin: 10px 0;
    display: none;
    background: #e3f2fd;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #2196f3;
}

.upload-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e3f2fd;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.upload-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: move 2s linear infinite;
}

.upload-progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
    color: #2196f3;
    font-weight: 500;
}

.upload-progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
}

/* Processing Progress Container */
.processing-progress-container {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
}

.processing-progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Fix the progress fill - remove !important declarations that prevent JavaScript updates */
.processing-progress-container .progress-fill,
#processingProgressFill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    width: 0%; /* Remove !important */
    transition: width 0.3s ease; /* Remove !important */
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.processing-progress-container .progress-fill::after,
#processingProgressFill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .3) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .3) 50%,
        rgba(255, 255, 255, .3) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: move 2s linear infinite;
}

.processing-progress-container .progress-percentage,
#processingProgressPercentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
}

.processing-progress-container .progress-status,
#processingProgressStatus {
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    opacity: 0.9;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Enhanced Tab Navigation with Sliding Indicator */
.tab-nav {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.tab-nav::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: calc(50% - 8px);
    height: calc(100% - 16px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.tab-nav.youtube-active::before {
    transform: translateX(100%);
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: white;
    transform: translateY(-1px);
}

.tab-btn.active {
    color: #4a5568;
    transform: translateY(-1px);
}

.tab-btn span.tab-icon {
    font-size: 18px;
    display: inline-block;
}

.tab-btn span.tab-text {
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Upload Panel */
.upload-panel {
    min-height: 200px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

/* YouTube Panel Styles */
.youtube-area {
    padding: 3rem;
    text-align: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.youtube-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.youtube-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.youtube-input-group {
    position: relative;
    z-index: 1;
}

.youtube-input-group h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.youtube-input-group p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.youtube-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

#youtubeInput {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#youtubeInput:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

#youtubeInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* YouTube Options Styling */
.youtube-options {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.youtube-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    font-size: 14px;
}

#qualitySelect {
    padding: 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

#qualitySelect:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

#qualitySelect option {
    background: #2d3748;
    color: white;
    padding: 8px;
}

#audioOnlyCheckbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ff6b6b;
    border-radius: 4px;
}

#youtubeBtn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#youtubeBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

#youtubeBtn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

#youtubeBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
}

#youtubeBtn.loading {
    position: relative;
    color: transparent;
}

#youtubeBtn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* YouTube Download Button Styling - UPDATED */
.file-info .youtube-download-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    
    align-self: stretch;
    width: 100%;
    max-width: none;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 0 0 !important;
    flex-shrink: 0;
    order: 2;
    text-decoration: none;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.file-info .youtube-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.file-info .youtube-download-btn:hover::before {
    left: 100%;
}

.file-info .youtube-download-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
    border-color: rgba(255, 255, 255, 0.3);
}

.file-info .youtube-download-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.file-info .youtube-download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
    background: #cbd5e0 !important;
    color: #718096 !important;
}

/* YouTube Status Container Styling - ENHANCED */
#youtubeStatusContainer {
    background: linear-gradient(135deg, #1a202c, #2d3748) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    margin: 20px 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
}

#youtubeStatusContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    border-radius: 16px 16px 0 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* YouTube Status Messages - ENHANCED */
#youtubeStatusContainer .youtube-status-message {
    color: #00ff88 !important;
    font-size: 14px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    animation: fadeInUp 0.5s ease-out !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-left: 3px solid #00ff88 !important;
    transition: all 0.3s ease !important;
}

#youtubeStatusContainer .youtube-status-message:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateX(5px) !important;
}

#youtubeStatusContainer .youtube-status-message .timestamp {
    color: #718096 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    min-width: 70px !important;
    opacity: 0.7 !important;
}

#youtubeStatusContainer .youtube-status-message .message-text {
    flex: 1 !important;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
}

#youtubeStatusContainer .youtube-status-message.success {
    border-left-color: #48bb78 !important;
}

#youtubeStatusContainer .youtube-status-message.success .message-text {
    color: #68d391 !important;
}

#youtubeStatusContainer .youtube-status-message.error {
    border-left-color: #f56565 !important;
}

#youtubeStatusContainer .youtube-status-message.error .message-text {
    color: #fc8181 !important;
}

/* YouTube File Info Container - ENHANCED */
#youtubeFileInfo {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    margin-top: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#youtubeFileInfo.show {
    display: flex;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* YouTube Status Container Scrollbar */
#youtubeStatusContainer::-webkit-scrollbar {
    width: 8px;
}

#youtubeStatusContainer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#youtubeStatusContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#youtubeStatusContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Enhanced fadeInUp animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for loading states */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.youtube-status-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Download button icon animation */
.file-info .youtube-download-btn i {
    transition: transform 0.3s ease;
}

.file-info .youtube-download-btn:hover i {
    transform: translateY(-2px);
}

/* Success state for download button */
.file-info .youtube-download-btn.success {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.3) !important;
}

.file-info .youtube-download-btn.success:hover {
    background: linear-gradient(135deg, #38a169, #48bb78) !important;
    box-shadow: 0 12px 30px rgba(72, 187, 120, 0.4) !important;
}

/* YouTube Download Button Styling */
.file-info .youtube-download-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    
    align-self: center;
    width: auto;
    min-width: 200px;
    max-width: 250px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    flex-shrink: 0;
    order: 2;
}

.file-info .youtube-download-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

.file-info .youtube-download-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
}

.modal[style*="block"], 
.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    margin: auto; /* Fallback centering */
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #4a5568;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.3);
}

/* Form groups for modal */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="range"] {
    padding: 0;
    height: 6px;
    background: #e2e8f0;
    border: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Notification system */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-success {
    background: #48bb78;
}

.notification-error {
    background: #f56565;
}

.notification-warning {
    background: #ed8936;
}

.notification-info {
    background: #4299e1;
}

/* Merge Video Styles */
.merge-upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    margin-bottom: 1rem;
}

.merge-upload-area:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.merge-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.merge-file-list {
    margin-top: 1rem;
}

.merge-file-list h4 {
    margin-bottom: 0.75rem;
    color: #4a5568;
    font-size: 1rem;
}

.merge-files-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem;
    background: white;
}

.merge-file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
}

.merge-file-item:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.merge-file-item:last-child {
    margin-bottom: 0;
}

.merge-file-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.merge-file-drag-handle {
    color: #cbd5e0;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    cursor: grab;
    font-weight: bold;
    line-height: 1;
    padding: 0.25rem;
}

.merge-file-drag-handle:active {
    cursor: grabbing;
}

.merge-file-info {
    flex: 1;
    text-align: left;
}

.merge-file-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.merge-file-size {
    font-size: 0.8rem;
    color: #718096;
}

.merge-file-remove {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 0.75rem;
}

.merge-file-remove:hover {
    background: #feb2b2;
    transform: scale(1.1);
}

/* Modal confirm button disabled state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #e2e8f0 !important;
    color: #a0aec0 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tab-nav {
        margin-bottom: 20px;
        padding: 6px;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
        flex-direction: column;
        gap: 4px;
    }
    
    .tab-btn span.tab-icon {
        font-size: 16px;
    }
    
    .tab-btn span.tab-text {
        font-size: 12px;
        font-weight: 500;
    }
    
    .upload-area {
        padding: 2rem;
        min-height: 150px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-text h3 {
        font-size: 1.25rem;
    }
    
    .file-info {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .file-info .youtube-download-btn {
        align-self: stretch;
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 14px 28px;
        font-size: 14px;
        order: 2;
        margin-left: 0 !important;
    }
    
    .operations-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .operation-card {
        padding: 1.5rem;
    }
    
    .youtube-area {
        padding: 2rem;
    }
    
    .youtube-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .youtube-input-group h3 {
        font-size: 1.25rem;
    }
    
    .youtube-controls {
        gap: 15px;
    }
    
    .youtube-options {
        flex-direction: column;
        gap: 15px;
        padding: 12px;
    }
    
    .youtube-options label {
        justify-content: center;
        width: 100%;
    }
    
    #qualitySelect {
        min-width: 200px;
        text-align: center;
    }
    
    #youtubeInput {
        font-size: 14px;
        padding: 14px 16px;
    }
    
    #youtubeBtn {
        padding: 14px 28px;
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}