* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body {
    background: #ffffff;
    color: #1e293b;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.flex { display: flex; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.text-sm { font-size: 0.875rem; }
.text-slate-600 { color: #475569; }
.my-4 { margin: 1rem 0; }
.mt-12 { margin-top: 3rem; }

.site-header {
    padding: 2rem 0;
    text-align: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d9488;
    margin-bottom: 1rem;
}
h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: #0f172a;
}
.subtitle {
    font-size: 1.125rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto;
}
.trust-badges span {
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
}

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 1.5rem;
}
.upload-zone:hover { border-color: #0d9488; }
.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #0d9488;
}
.upload-note {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 0.5rem;
}
.file-stats {
    text-align: center;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1rem;
}
.upload-error {
    color: #dc2626;
    text-align: center;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}
.target-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.control-panel {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.control-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.control-group label { font-weight: 500; font-size: 0.95rem; }
.control-group select, .control-group input {
    padding: 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}
#qualitySlider { width: 100%; }

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #0d9488;
    width: 0%;
    transition: width 0.2s;
}

.download-all-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.generating-text {
    color: #64748b;
    font-size: 0.95rem;
}
.clear-queue-btn,
.download-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.6rem;
    min-height: 42px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    box-sizing: border-box;
    transition: background 0.2s;
}
.clear-queue-btn {
    background: #ef4444;
    color: white;
}
.clear-queue-btn:hover { background: #dc2626; }
.download-all-btn {
    background: #0d9488;
    color: white;
}
.download-all-btn:hover { background: #0b7d74; }
.generating-text {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 0.5rem;
    border: 1px dashed #cbd5e1;
    box-sizing: border-box;
    min-height: 40px;
    line-height: 1.25;
    animation: pulse-opacity 1.2s ease-in-out infinite;
}
@keyframes pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
}

.ad-slot {
    min-height: 90px;
    margin: 1.5rem auto;
    max-width: 728px;
    width: 100%;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.results-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.result-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.result-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
}
.result-preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.result-preview img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 6px;
}
.size-label-orig {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}
.size-label-comp {
    font-size: 0.8rem;
    color: #059669;
    text-align: center;
    font-weight: 500;
}
.result-info {
    padding: 1rem;
    font-size: 0.95rem;
}
.result-info p { margin: 0.25rem 0; }
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.75rem;
    background: #0d9488;
    color: white;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: background 0.2s;
}
.download-btn:hover { background: #0b7d74; }

.how-it-works, .seo-content, .faq-section { margin-bottom: 3rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 2rem; }
.step h3 { color: #0d9488; margin-bottom: 0.5rem; }
details {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}
summary { cursor: pointer; font-weight: 500; }

.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: #64748b;
    font-size: 0.875rem;
}
.footer-note { margin-top: 0.5rem; }

@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    .upload-zone { padding: 1.2rem 1rem; }
    .control-row { grid-template-columns: 1fr; }
}
.clear-queue-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #ef4444;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.clear-queue-btn:hover { background: #dc2626; }