/* CSS Reset & Base Styles */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{line-height:1.15;-webkit-text-size-adjust:100%}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;color:#1f2937;background:#f8fafc;font-size:16px;line-height:1.6}
h1,h2,h3,h4{line-height:1.25;font-weight:600}
button{font:inherit;cursor:pointer;border:0;background:none}
input,select{font:inherit}
svg{display:block}
a{color:inherit;text-decoration:none}

/* Layout */
.container{max-width:1200px;margin:0 auto;padding:0 1rem}
.main{min-height:calc(100vh - 140px)}

/* Header */
.header{background:#fff;border-bottom:1px solid #e5e7eb;position:sticky;top:0;z-index:100}
.header-content{display:flex;align-items:center;justify-content:space-between;height:64px}
.logo{font-size:1.5rem;font-weight:700;color:#1e40af}
.header-actions{display:flex;align-items:center;gap:1rem}
.language-select{padding:.5rem;border:1px solid #d1d5db;border-radius:.375rem;background:#fff}

/* Hero Section */
.hero{padding:4rem 0;text-align:center}
.hero-title{font-size:2.5rem;margin-bottom:1rem;color:#1e40af}
.hero-description{font-size:1.25rem;color:#6b7280;max-width:600px;margin:0 auto 2rem}

/* Ad Banner */
.ad-banner{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:1.5rem;border-radius:.5rem;margin:2rem 0}
.ad-content h3{margin-bottom:.5rem}
.ad-button{display:inline-block;margin-top:1rem;padding:.75rem 1.5rem;background:#fff;color:#1e40af;border-radius:.375rem;font-weight:600;transition:transform .15s}
.ad-button:hover{transform:translateY(-1px)}

/* Converter */
.converter{padding:2rem 0}
.converter-card{background:#fff;border-radius:.75rem;box-shadow:0 4px 6px -1px rgba(0,0,0,.1);overflow:hidden}
.converter-header{padding:1.5rem;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between}
.converter-header h3{font-size:1.25rem}
.format-toggle{display:flex;background:#f3f4f6;border-radius:.375rem;overflow:hidden}
.format-btn{padding:.5rem 1rem;transition:all .15s}
.format-btn.active{background:#1e40af;color:#fff}

/* Drop Zone */
.drop-zone{position:relative;padding:3rem;border:2px dashed #d1d5db;border-radius:.5rem;margin:1.5rem;background:#f9fafb;transition:all .15s;cursor:pointer}
.drop-zone:hover,.drop-zone.drag-over{border-color:#1e40af;background:#eff6ff}
.drop-content{text-align:center}
.drop-icon{margin:0 auto 1rem;color:#6b7280}
.drop-content h4{margin-bottom:.5rem;font-size:1.125rem}
.drop-hint{color:#6b7280;font-size:.875rem}
.drop-overlay{position:absolute;inset:0;background:rgba(30,64,175,.1);border-radius:.375rem;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s}
.drop-overlay.show{opacity:1}
.drop-overlay-content{background:#1e40af;color:#fff;padding:1rem 2rem;border-radius:.5rem;font-weight:600}

/* Progress */
.progress-section{padding:1.5rem}
.progress-info{display:flex;justify-content:space-between;margin-bottom:.5rem}
.progress-label{font-weight:600}
.progress-percent{color:#1e40af;font-weight:600}
.progress-bar{height:.5rem;background:#e5e7eb;border-radius:.25rem;overflow:hidden;margin-bottom:1rem}
.progress-fill{height:100%;background:linear-gradient(90deg,#1e40af,#3b82f6);transition:width .3s ease}
.progress-details{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;font-size:.875rem}
.detail-item{display:flex;flex-direction:column;text-align:center;padding:.75rem;background:#f3f4f6;border-radius:.375rem}
.detail-item span:first-child{color:#6b7280;margin-bottom:.25rem}
.detail-item span:last-child{font-weight:600;color:#1e40af}

/* Result */
.result-section{padding:1.5rem}
.result-info h4{margin-bottom:1rem;color:#059669}
.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-bottom:1.5rem}
.stat-item{text-align:center;padding:.75rem;background:#f0f9ff;border-radius:.375rem}
.stat-label{display:block;font-size:.875rem;color:#6b7280;margin-bottom:.25rem}
.stat-value{font-weight:600;color:#1e40af}
.result-actions{display:flex;gap:1rem;justify-content:center}
.download-btn{display:flex;align-items:center;gap:.5rem;padding:.75rem 2rem;background:#059669;color:#fff;border-radius:.375rem;font-weight:600;transition:background .15s}
.download-btn:hover{background:#047857}
.reset-btn{padding:.75rem 1.5rem;background:#6b7280;color:#fff;border-radius:.375rem;transition:background .15s}
.reset-btn:hover{background:#4b5563}

/* Error */
.error-section{padding:1.5rem;text-align:center}
.error-icon{margin:0 auto 1rem;color:#dc2626}
.error-content h4{color:#dc2626;margin-bottom:.5rem}
.error-message{color:#6b7280;margin-bottom:1rem}
.retry-btn{padding:.75rem 1.5rem;background:#dc2626;color:#fff;border-radius:.375rem;transition:background .15s}
.retry-btn:hover{background:#b91c1c}

/* Features */
.features{padding:4rem 0;background:#fff}
.features-title{text-align:center;font-size:2rem;margin-bottom:3rem;color:#1e40af}
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:2rem}
.feature-card{text-align:center;padding:2rem;border-radius:.75rem;background:#f8fafc;border:1px solid #e5e7eb}
.feature-icon{font-size:3rem;margin-bottom:1rem}
.feature-card h4{margin-bottom:.75rem;color:#1e40af}
.feature-card p{color:#6b7280;font-size:.875rem}

/* Footer */
.footer{background:#1f2937;color:#9ca3af;padding:3rem 0 1rem}
.footer-content{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:2rem;margin-bottom:2rem}
.footer-section h4{color:#fff;margin-bottom:1rem}
.footer-section ul{list-style:none}
.footer-section li{margin-bottom:.5rem}
.footer-section a{transition:color .15s}
.footer-section a:hover{color:#fff}
.footer-bottom{text-align:center;padding-top:2rem;border-top:1px solid #374151;font-size:.875rem}

/* Responsive */
@media (max-width:768px){
.hero-title{font-size:2rem}
.hero-description{font-size:1rem}
.converter-header{flex-direction:column;gap:1rem;align-items:stretch}
.format-toggle{align-self:center}
.progress-details{grid-template-columns:1fr}
.result-stats{grid-template-columns:1fr}
.result-actions{flex-direction:column}
.features-grid{grid-template-columns:1fr}
.header-content{flex-direction:column;height:auto;padding:1rem 0}
}

/* Utility Classes */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.fade-in{animation:fadeIn .3s ease-in-out}
@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* Print Styles */
@media print{
.header,.footer,.ad-banner{display:none}
.main{min-height:auto}
}