/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

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

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.lang-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
    background-color: #fff;
}

.lang-link:hover {
    color: #333;
    background-color: #f5f5f5;
    border-color: #ccc;
}

.logo-icon {
    font-size: 24px;
}

.header-center {
    text-align: center;
    flex: 1;
}

.main-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.title-icon {
    font-size: 24px;
    color: #e74c3c;
}

.header-right .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #333;
}

.nav-button {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background-color: #c0392b;
}

/* Main content styles */
.main-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Upload section */
.upload-section {
    text-align: center;
    margin-bottom: 60px;
}

.upload-area {
    margin-bottom: 30px;
}

.upload-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 20px;
    transition: background-color 0.2s;
}

.upload-button:hover {
    background-color: #c0392b;
}

.upload-icon {
    font-size: 24px;
    font-weight: bold;
}

.upload-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.upload-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-option:hover {
    background-color: #e9ecef;
}

.option-icon {
    font-size: 20px;
}

/* File info styles */
.file-info {
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.file-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.file-name {
    font-weight: 600;
    color: #333;
}

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

.process-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.process-button:hover {
    background-color: #c0392b;
}

/* Format selection styles */
.format-selection {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

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

.format-options {
    display: flex;
    gap: 20px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.format-option:hover {
    background-color: #e9ecef;
}

.format-option input[type="radio"] {
    margin: 0;
}

.format-text {
    font-weight: 500;
    color: #333;
}

.format-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

/* Error message */
.error-message {
    background-color: #fee;
    color: #c0392b;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #fadbd8;
}

/* Processing section */
.processing-section {
    text-align: center;
    margin-bottom: 60px;
}

.processing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-text {
    font-size: 18px;
    color: #666;
}

/* Download section */
.download-section {
    text-align: center;
    margin-bottom: 60px;
}

.download-area {
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 40px;
    margin: 20px 0;
}

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

.download-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.download-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: #c0392b;
}

.download-icon {
    font-size: 18px;
}

/* How to section */
.how-to-section {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    margin-top: 60px;
}

.how-to-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

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

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.step-number {
    background-color: #e74c3c;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.step-description {
    color: #666;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .main-title {
        font-size: 24px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .upload-button {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .upload-options {
        gap: 15px;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .how-to-section {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .upload-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .how-to-title {
        font-size: 24px;
    }
}

/* Upload Progress Styles */
.upload-progress {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    text-align: center;
}

.progress-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.progress-container {
    max-width: 400px;
    margin: 0 auto;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

#progressPercent {
    font-weight: 600;
    color: #333;
}

#progressStatus {
    font-style: italic;
}
