/* ============================================================
   iAudit Conversor de Imagens — Dark Theme
   neon-green: #00ff41 | neon-cyan: #00bcd4
   ============================================================ */

:root {
    --neon-green: #00ff41;
    --neon-cyan: #00bcd4;
    --bg-base: #0d0d0f;
    --bg-card: #141417;
    --bg-card2: #1a1a1e;
    --border: rgba(255,255,255,0.07);
    --border-glow: rgba(0,255,65,0.2);
    --text-primary: #f1f1f3;
    --text-secondary: #8a8a9a;
    --text-muted: #555560;
    --font: 'Inter', sans-serif;
    --radius: 12px;
    --radius-lg: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: rgba(13,13,15,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-logo { text-decoration: none; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.logo-accent { color: var(--neon-green); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color .2s; }
.nav-link:hover { color: var(--text-primary); }
.nav-cta {
    background: var(--neon-green);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 7px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .2s;
}
.nav-cta:hover { opacity: .85; }

/* ── Page wrapper ─────────────────────────────────────────── */
.page-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 72px 20px 56px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,255,65,.08);
    border: 1px solid rgba(0,255,65,.25);
    color: var(--neon-green);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.gradient-text {
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 36px;
}
.hero-subtitle strong { color: var(--text-primary); }
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}
.hero-stat .stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neon-green);
    line-height: 1;
}
.hero-stat span:last-child { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.hero-stat-div { width: 1px; height: 36px; background: var(--border); }

/* ── Tool Section ─────────────────────────────────────────── */
.tool-section { margin-bottom: 80px; }

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ── Panel ────────────────────────────────────────────────── */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.panel-header i { color: var(--neon-green); font-size: 1.1rem; }
.panel-header h2 { font-size: 1rem; font-weight: 600; }

/* ── Upload Area ──────────────────────────────────────────── */
.upload-area {
    border: 2px dashed rgba(0,255,65,.2);
    border-radius: var(--radius);
    padding: 48px 20px;
    text-align: center;
    background: rgba(0,255,65,.02);
    transition: all .25s;
    cursor: default;
}
.upload-area:hover {
    border-color: rgba(0,255,65,.4);
    background: rgba(0,255,65,.04);
}
.upload-area.drag-over {
    border-color: var(--neon-green);
    background: rgba(0,255,65,.07);
    transform: scale(1.01);
}
.upload-icon {
    width: 60px; height: 60px;
    border-radius: 14px;
    background: rgba(0,255,65,.08);
    border: 1px solid rgba(0,255,65,.2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.upload-icon i { font-size: 1.5rem; color: var(--neon-green); }
.upload-area h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.upload-area p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }

/* ── Preview ──────────────────────────────────────────────── */
.preview-container {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card2);
    border-bottom: 1px solid var(--border);
}
.preview-header h3 { font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--neon-cyan); }
.preview-content { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
#imagePreview { width: 100%; max-height: 180px; object-fit: contain; border-radius: 8px; background: #111; }
.image-info { display: flex; flex-direction: column; gap: 8px; }
.info-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.info-value { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; word-break: break-all; }

/* ── Settings Panel ───────────────────────────────────────── */
.setting-group { margin-bottom: 24px; }
.setting-group:last-of-type { margin-bottom: 0; }
.setting-group > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.setting-group > label i { color: var(--neon-cyan); font-size: 0.8rem; }
.accent-text { color: var(--neon-green); }

.optional-tag {
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255,255,255,.06);
    color: var(--text-muted);
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: 4px;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary) !important;
    font-family: var(--font);
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    transition: border-color .2s;
}
.form-select:focus { outline: none; border-color: var(--neon-green); }
.form-select option { background: #1a1a1e; }

.setting-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* Slider */
.form-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-card2);
    border-radius: 3px;
    outline: none;
    margin: 12px 0 6px;
    border: 1px solid var(--border);
}
.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--neon-green);
    cursor: pointer;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 8px rgba(0,255,65,.4);
}
.form-slider::-moz-range-thumb {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--neon-green);
    cursor: pointer;
    border: 3px solid var(--bg-card);
}
.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Resize */
.resize-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.resize-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.resize-input > label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin: 0;
    font-weight: 400;
}
.custom-input-container { flex: 1; }
.custom-number-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font);
    font-weight: 600;
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    min-height: 40px;
    cursor: text;
    outline: none;
    transition: border-color .2s;
    caret-color: var(--neon-green);
}
.custom-number-input:focus { border-color: var(--neon-green); }
.custom-number-input * { color: var(--text-primary) !important; -webkit-text-fill-color: var(--text-primary) !important; }
.resize-separator { font-size: 1.1rem; color: var(--text-muted); font-weight: 300; }
.px-label { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 9px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--neon-green);
    color: #000;
}
.btn-primary:hover { opacity: .85; transform: translateY(-1px); }

.btn-convert {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    color: #000;
    font-size: 1rem;
    padding: 14px 32px;
    flex: 1;
}
.btn-convert:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,255,65,.2); }
.btn-convert:disabled { opacity: .35; cursor: not-allowed; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card2); color: var(--text-primary); }

.btn-small { padding: 6px 14px; font-size: 0.8rem; }

.btn-download {
    background: linear-gradient(135deg, var(--neon-cyan), #0097a7);
    color: #000;
    font-size: 1rem;
    padding: 14px 32px;
}
.btn-download:hover { opacity: .88; transform: translateY(-1px); }

.btn-cta {
    background: var(--neon-green);
    color: #000;
    font-weight: 700;
    white-space: nowrap;
    padding: 14px 28px;
}
.btn-cta:hover { opacity: .85; transform: translateY(-1px); }

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ── Results Panel ────────────────────────────────────────── */
.results-panel {
    background: var(--bg-card);
    border: 1px solid rgba(0,255,65,.15);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.results-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-bottom: 28px;
    align-items: center;
}
.comparison-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.comparison-item { flex: 1; }
.comp-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.comp-format { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.comp-size { font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; }
.comp-dims { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.converted-item .comp-format { color: var(--neon-green); }
.comparison-arrow { font-size: 1.4rem; color: var(--text-muted); padding: 0 8px; }

.savings-card {
    background: linear-gradient(135deg, rgba(0,255,65,.1), rgba(0,188,212,.08));
    border: 1px solid rgba(0,255,65,.2);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    min-width: 140px;
}
.savings-icon i { font-size: 1.8rem; color: var(--neon-green); margin-bottom: 10px; display: block; }
.savings-num { font-size: 2.5rem; font-weight: 800; color: var(--neon-green); line-height: 1; margin-bottom: 6px; }
.savings-label { font-size: 0.78rem; color: var(--text-muted); }

.result-preview-section { border-top: 1px solid var(--border); padding-top: 24px; }
.result-preview-section h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; color: var(--neon-cyan); display: flex; align-items: center; gap: 8px; }
.result-image-container { text-align: center; margin-bottom: 20px; background: #111; border-radius: var(--radius); padding: 16px; }
#resultImage { max-width: 100%; max-height: 360px; border-radius: 8px; }
.result-actions { display: flex; gap: 12px; justify-content: center; }

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
    margin-top: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(0,255,65,.06), rgba(0,188,212,.04));
    border: 1px solid rgba(0,255,65,.2);
    padding: 28px;
    animation: fadeInUp .5s ease;
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.cta-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cta-icon { font-size: 2.2rem; color: var(--neon-green); flex-shrink: 0; }
.cta-text { flex: 1; min-width: 220px; }
.cta-text h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.cta-text p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.cta-text strong { color: var(--text-primary); }

/* ── SEO Section ──────────────────────────────────────────── */
.seo-section { margin-bottom: 80px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; }
.section-header p { color: var(--text-secondary); font-size: 0.95rem; }

.seo-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.seo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color .2s, transform .2s;
}
.seo-card:hover {
    border-color: rgba(0,255,65,.25);
    transform: translateY(-2px);
}
.highlight-card {
    border-color: rgba(0,255,65,.2);
    background: linear-gradient(160deg, rgba(0,255,65,.04), var(--bg-card));
}
.seo-card-icon {
    width: 48px; height: 48px;
    background: rgba(0,255,65,.08);
    border: 1px solid rgba(0,255,65,.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.highlight-card .seo-card-icon { background: rgba(0,255,65,.12); }
.seo-card-icon i { font-size: 1.2rem; color: var(--neon-green); }
.seo-card h3 { font-size: 0.95rem; font-weight: 700; line-height: 1.4; }
.seo-card p { font-size: 0.845rem; color: var(--text-secondary); line-height: 1.65; flex: 1; }
.seo-card p strong { color: var(--text-primary); }
.seo-card-benefits { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.seo-card-benefits li { font-size: 0.82rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.seo-card-benefits li i { color: var(--neon-green); font-size: 0.7rem; flex-shrink: 0; }
.seo-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(0,255,65,.3);
    border-radius: 8px;
    color: var(--neon-green);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    text-align: center;
}
.seo-card-btn:hover { background: rgba(0,255,65,.08); border-color: var(--neon-green); }
.seo-card-btn-cta {
    background: var(--neon-green);
    color: #000;
    border-color: var(--neon-green);
}
.seo-card-btn-cta:hover { opacity: .85; background: var(--neon-green); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-section { margin-bottom: 80px; }
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.faq-item h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}
.faq-item h3 i { color: var(--neon-cyan); font-size: 0.85rem; margin-top: 2px; flex-shrink: 0; }
.faq-item p { font-size: 0.845rem; color: var(--text-secondary); line-height: 1.7; }
.faq-item p strong { color: var(--text-primary); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-brand .logo-text { font-size: 1.3rem; font-weight: 800; display: block; margin-bottom: 12px; }
.footer-brand p { font-size: 0.845rem; color: var(--text-secondary); line-height: 1.6; max-width: 300px; }
.footer-stats { display: flex; gap: 24px; margin-top: 20px; }
.fstat { display: flex; flex-direction: column; gap: 3px; }
.fstat span { font-size: 1.2rem; font-weight: 700; color: var(--neon-green); }
.fstat small { font-size: 0.75rem; color: var(--text-muted); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.footer-links a { font-size: 0.84rem; color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--neon-green); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Loading Overlay ──────────────────────────────────────── */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.85);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.loading-content {
    background: var(--bg-card);
    border: 1px solid rgba(0,255,65,.2);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 360px;
    width: 90%;
}
.spinner {
    width: 52px; height: 52px;
    border: 4px solid rgba(0,255,65,.1);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-content h3 { font-size: 1rem; margin-bottom: 8px; }
.loading-content p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }
.progress-bar { height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan)); width: 0%; animation: progress 1.8s ease-in-out infinite; }
@keyframes progress { 0% { width:0%; } 60% { width:75%; } 100% { width:100%; } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .tool-grid { grid-template-columns: 1fr; }
    .seo-cards-grid { grid-template-columns: 1fr 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .navbar { padding: 0 16px; }
    .nav-links .nav-link { display: none; }
    .hero { padding: 48px 0 36px; }
    .hero-stats { gap: 8px; }
    .hero-stat { padding: 0 14px; }
    .seo-cards-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .btn-convert, .btn-download { width: 100%; }
    .result-actions { flex-direction: column; }
    .cta-content { flex-direction: column; text-align: center; }
    .preview-content { grid-template-columns: 1fr; }
    .resize-controls { flex-direction: column; align-items: stretch; }
    .comparison-card { flex-direction: column; text-align: center; }
    .comparison-arrow { transform: rotate(90deg); }
}
