:root {
    --primary-color: #ff5722;
    --secondary-color: #ff6f3c;
    --light-orange: #fff3f0;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --border-color: #e8e8e8;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #fafafa;
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 80px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
    font-weight: 700;
}

.logo span {
    display: block;
}

.logo span:first-child {
    font-size: 0.85rem;
}

.logo span:last-child {
    font-size: 0.85rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    background-color: var(--light-orange);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 5rem 5% 2rem;
    text-align: center;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 700;
}

.description {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 2.5rem;
    max-width: 650px;
}

.upload-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.drag-text {
    color: #999;
    font-size: 0.9rem;
}

.converted-files-container {
    width: 100%;
    max-width: 1200px;
    margin-top: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: none;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.files-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.clear-btn, .download-all-btn {
    padding: 0.65rem 1.3rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.clear-btn {
    background-color: white;
    color: #666;
    border: 1px solid var(--border-color);
}

.download-all-btn {
    background: var(--primary-color);
    color: white;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .files-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.file-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.file-preview {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fafafa;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-preview .file-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.file-info {
    padding: 1rem;
    background-color: white;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--dark-color);
}

.progress-container {
    display: none;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 0.65rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.converting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.converting-text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    font-weight: 600;
}

.converting-progress {
    width: 400px;
    max-width: 90%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.converting-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-percentage {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.ad-container {
    width: 100%;
    max-width: 1280px;
    height: 170px;
    margin: 3rem auto;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.ad-text {
    color: #999;
    font-size: 1rem;
}

footer {
    background-color: white;
    padding: 1.5rem 5%;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: #666;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .description {
        max-width: 90%;
    }
    
    header {
        height: 70px;
        padding: 0 4%;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
    }
    
    .files-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

.hidden {
    display: none;
}