/* Base styles and reset */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --dark-color: #34495e;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* Upload area styles */
.file-uploader {
    margin-bottom: 2rem;
    animation: fadeIn 1s ease;
}

.upload-area {
    padding: 3rem;
    border: 3px dashed #bdc3c7;
    border-radius: 10px;
    text-align: center;
    background-color: white;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.upload-area i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.upload-area p {
    margin-bottom: 1rem;
    color: #7f8c8d;
}

.upload-area.highlight {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

/* Button styles */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-dark);
}

.btn.secondary {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn.secondary:hover {
    background-color: #dfe6e9;
}

/* Conversion panel styles */
.conversion-panel, .results-panel {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    animation: fadeIn 1s ease;
}

.conversion-panel h2, .results-panel h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.file-list, .results-list {
    margin-bottom: 2rem;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
    padding: 1rem;
}

.file-item, .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid #f1f1f1;
    animation: slideInRight 0.5s ease;
}

.file-item:last-child, .result-item:last-child {
    border-bottom: none;
}

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

.file-icon, .result-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.file-name, .result-name {
    font-weight: 500;
}

.file-size, .result-size {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.file-actions, .result-actions {
    display: flex;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 0.5rem;
    color: #7f8c8d;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary-color);
}

.action-btn.remove:hover {
    color: var(--danger-color);
}

/* Conversion settings */
.conversion-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.file-type-selector, .quality-settings {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.file-type-selector h3, .quality-settings h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.conversion-type-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 50px;
    padding: 0.3rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 0.7rem;
    border: none;
    background: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    color: #7f8c8d;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

.format-options {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.format-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.format-options select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
    font-size: 1rem;
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0l6 6 6-6z" fill="%23666"/></svg>') no-repeat;
    background-position: right 1rem center;
    background-color: white;
}

/* Quality slider */
.quality-slider {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.quality-slider label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #dfe6e9;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Action buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Processing overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.processing-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-bar {
    height: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin: 1.5rem 0 0.5rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--dark-color);
    color: white;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .conversion-settings {
        grid-template-columns: 1fr;
    }
    
    .conversion-type-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 0 40%;
        margin: 0.2rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
}