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

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

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    margin: 0;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.tagline {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    background: #fff;
    margin: 1rem 0;
    transition: all 0.3s ease;
    min-height: 120px;
}

.upload-zone:hover {
    border-color: #2563eb;
    background-color: #f0f9ff;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.upload-icon {
    color: #94a3b8;
    width: 32px;
    height: 32px;
}

.or-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #059669;
    color: white;
}

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

.btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* File List & Results */
.file-list, .results {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.file-list h3, .results h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.conversion-options {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    align-items: end;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
}

.option-group select {
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    min-width: 120px;
}

/* File Items - Improved Layout */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: #f8fafc;
}

.file-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.file-name {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
    word-break: break-word;
    font-size: 0.95rem;
}

.file-size {
    font-size: 0.85rem;
    color: #64748b;
}

/* Result Items - Fixed Overlapping */
.result-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    width: 100%;
}

.result-info {
    min-width: 0; /* Allow text truncation */
}

.result-file-name {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
    word-break: break-word;
    font-size: 0.95rem;
}

.result-file-size {
    font-size: 0.85rem;
    color: #64748b;
}

.result-download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    flex-shrink: 0;
    min-width: 100px;
    text-align: center;
}

/* Download All Button */
.download-all-container {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Privacy Notice */
.privacy-notice {
    background: #ecfdf5;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.lock-icon {
    font-size: 1.5rem;
}

/* SEO Article */
.seo-article {
    background: #fff;
    padding: 3rem 0;
    border-top: 1px solid #e2e8f0;
}

.seo-article h2 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: #1e293b;
}

.seo-article h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
    color: #334155;
}

.seo-article p {
    margin-bottom: 1rem;
    color: #475569;
}

.seo-article ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.seo-article li {
    margin-bottom: 0.5rem;
    color: #475569;
}

/* Footer */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .upload-zone {
        padding: 1.25rem 1rem;
        min-height: 100px;
    }
    
    .conversion-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .option-group select {
        min-width: 100%;
    }
    
    /* Mobile-specific result item layout */
    .result-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .result-download-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .upload-zone {
        padding: 1rem;
        min-height: 90px;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .result-item {
        padding: 0.75rem;
    }
}