* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e2e8f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5), 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.upload-zone {
    background: rgba(255, 255, 255, 0.05);
    border: 3px dashed #4a5568;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.upload-content i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #f7fafc;
}

.upload-content p {
    color: #a0aec0;
    font-size: 1rem;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Files Section */
.files-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.section-header h2 {
    color: #f7fafc;
    font-size: 1.8rem;
}

/* File Item */
.file-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

.file-item.converting {
    opacity: 0.7;
    pointer-events: none;
}

.file-item.converted {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.file-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.file-details h4 {
    margin-bottom: 5px;
    color: #f7fafc;
    font-size: 1.1rem;
}

.file-details p {
    color: #a0aec0;
    font-size: 0.9rem;
}

.file-status {
    margin-left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.file-status.converting {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.file-status.converted {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
}

.file-controls {
    display: flex;
    gap: 10px;
}

.file-controls button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    outline: none;
}

.file-controls button:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}

.file-controls button:active {
    transform: translateY(0);
}

.remove-btn {
    background: #e74c3c;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.remove-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.remove-btn:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3);
}

.download-btn {
    background: #28a745;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.download-btn:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* Processing Controls */
.processing-controls {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    min-height: 48px;
    line-height: 1.2;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    outline: none;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn i {
    font-size: 1.2rem;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Progress Section */
.progress-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-container h3 {
    margin-bottom: 20px;
    color: #f7fafc;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

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

.progress-text {
    color: #a0aec0;
    font-size: 1rem;
}

/* Result Section */
.result-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-content i {
    font-size: 4rem;
    color: #48bb78;
    margin-bottom: 20px;
}

.result-content h3 {
    margin-bottom: 10px;
    color: #f7fafc;
}

.result-content p {
    margin-bottom: 30px;
    color: #a0aec0;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.download-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.download-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.download-item-info {
    flex: 1;
    text-align: left;
}

.download-item-info h4 {
    color: #f7fafc;
    margin-bottom: 5px;
    font-size: 1rem;
}

.download-item-info p {
    color: #a0aec0;
    font-size: 0.85rem;
    margin: 0;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.result-content .btn {
    margin: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    text-align: center;
    color: #f7fafc;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #667eea;
}

.loading-spinner p {
    font-size: 1.2rem;
    color: #e2e8f0;
}

/* Error Message */
.error-message {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-zone {
        padding: 40px 20px;
    }
    
    .upload-content i {
        font-size: 3rem;
    }
    
    .file-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .file-info {
        justify-content: center;
        flex-direction: column;
    }
    
    .file-preview {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .processing-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .result-content .btn {
        display: block;
        margin: 0;
        width: 100%;
        padding: 16px 20px;
        font-size: 1.2rem;
        min-height: 52px;
    }
    
    .file-controls {
        width: 100%;
        justify-content: center;
    }
    
    .file-controls button {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 16px 24px;
        font-size: 1.2rem;
        min-height: 52px;
    }
    
    .download-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .download-item-info {
        text-align: center;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.files-section,
.progress-section,
.result-section {
    animation: fadeInUp 0.5s ease;
}

