/* Reset and base styles */
* {
    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%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5em;
    font-weight: 300;
    color: #4a5568;
    margin-bottom: 5px;
}

.header-content p {
    color: #718096;
    font-size: 1.1em;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow: visible;
}

/* Left and Right Panels */
.left-panel {
    flex: 1;
    min-width: 400px;
    overflow-y: visible;
    padding-right: 10px;
}

.right-panel {
    flex: 1;
    min-width: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}



/* Input section */
.input-section {
    margin-bottom: 30px;
}

/* Drop zones */
.drop-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 80px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 30px;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.drop-zone p {
    font-size: 1em;
    color: #4a5568;
    margin-bottom: 8px;
}

.drop-subtitle {
    color: #a0aec0 !important;
    font-size: 0.9em !important;
}

.select-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
    pointer-events: all;
}

.select-button:hover:not(:disabled) {
    background: #5a67d8;
}

.select-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Settings section */
.settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.settings-section h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 500;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.setting-group input[type="text"] {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1em;
}

.setting-group input[type="text"]:disabled {
    background: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

.setting-group small {
    color: #718096;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.slider-value {
    font-weight: 600;
    color: #667eea;
    min-width: 30px;
    text-align: center;
}

/* Checkbox */
.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    flex-direction: row !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Action section */
.action-section {
    text-align: center;
}

.convert-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
}

.demo-button {
    opacity: 0.7;
    cursor: not-allowed;
}

.convert-button:hover:not(:disabled):not(.demo-button) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Progress section */
.progress-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.progress-section h3 {
    margin-bottom: 20px;
    color: #2d3748;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #4a5568;
    font-size: 0.9em;
}

.console-output {
    background: #1a202c;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85em;
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.4;
    min-height: 200px;
}

.console-line {
    margin-bottom: 5px;
}

/* Status bar */
.status-bar {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #718096;
}

.status-item {
    display: flex;
    align-items: center;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        overflow-y: visible;
    }
    
    .left-panel, .right-panel {
        min-width: unset;
        overflow-y: visible;
    }
    
    .right-panel {
        height: 400px;
    }
    
    .console-output {
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .app-header {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 2em;
    }
    
    .right-panel {
        height: 300px;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .download-button {
        width: 100%;
        max-width: 250px;
    }
}

/* Selected files display */
.selected-files {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #2d3748;
}

.file-path {
    font-size: 0.9em;
    color: #718096;
}/* Actio
n section */
.action-section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.convert-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
}

.convert-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.convert-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #a0aec0;
}

.cancel-button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.cancel-button:hover:not(:disabled) {
    background: #c53030;
    transform: translateY(-1px);
}

.cancel-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-spinner {
    width: 20px;
    height: 20px;
    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); }
}