/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Ad Spaces */
.ad-space {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
}

.ad-header,
.ad-footer {
    max-width: 728px;
    height: 90px;
}

.ad-sidebar {
    width: 100%;
    max-width: 300px;
    height: 600px;
    position: sticky;
    top: 20px;
}

.ad-placeholder {
    color: #999;
    text-align: center;
    font-size: 14px;
    padding: 10px;
}

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

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

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

/* Main Container */
.container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.sidebar {
    flex-shrink: 0;
}

.sidebar-right {
    display: block;
}

/* Converter Section */
.converter-section {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f8f9ff;
}

.upload-area.drag-over {
    border-color: #764ba2;
    background: #f0f0ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* File Info */
.file-info {
    text-align: center;
    padding: 40px 20px;
}

.file-details {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.file-size {
    color: #666;
    font-size: 14px;
}

.format-selector {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.format-selector label {
    display: block;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
}

.format-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-select:hover {
    border-color: #764ba2;
}

.format-select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

/* Progress Area */
.progress-area {
    text-align: center;
    padding: 40px 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

#statusText {
    color: #667eea;
    font-weight: 600;
}

/* Result Area */
.result-area {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.result-area h3 {
    color: #10b981;
    margin-bottom: 30px;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.feature p {
    color: #666;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        display: none;
    }
    
    .ad-sidebar {
        max-width: 100%;
        height: 250px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .converter-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 3em;
    }
    
    .ad-header,
    .ad-footer {
        height: 50px;
        max-width: 100%;
    }
    
    .ad-placeholder {
        font-size: 12px;
    }
}
