/* ============================================================
   ImagoPDF — main.css
   App: imagopdf
   Estrutura: imagopdf/static/imagopdf/css/main.css
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root,
body {
    --bg:         #0a0a0f;
    --surface:    #111118;
    --surface2:   #1a1a24;
    --border:     rgba(255, 255, 255, 0.07);
    --accent:     #e8ff47;
    --accent2:    #6b4eff;
    --text:       #f0f0f5;
    --muted:      #7a7a90;
    --card-hover: #1e1e2e;
    --success:    #22c55e;
    --error:      #ef4444;
    --warning:    #f59e0b;
}

body:not(.theme-light) .logo-img {
    filter: brightness(0) invert(1);
}

/* ── TEMA CLARO ── */
body.theme-light {
    --bg:         #f5f5f7;
    --surface:    #ffffff;
    --surface2:   #ebebf0;
    --border:     rgba(0, 0, 0, 0.08);
    --accent:     #6b4eff;
    --accent2:    #6b4eff;
    --text:       #111118;
    --muted:      #6b6b80;
    --card-hover: #e8e8f0;
    --success:    #16a34a;
    --error:      #dc2626;
    --warning:    #d97706;
}

/* ── AJUSTES VISUAIS MODO CLARO ── */
body.theme-light::before { opacity: 0.15; }
body.theme-light .blob-1 { background: radial-gradient(circle, rgba(107,78,255,0.06) 0%, transparent 70%); }
body.theme-light .blob-2 { background: radial-gradient(circle, rgba(107,78,255,0.04) 0%, transparent 70%); }
body.theme-light .btn-primary { background: var(--accent2); color: #fff; }
body.theme-light .btn-primary:hover { box-shadow: 0 8px 30px rgba(107,78,255,0.3); }
body.theme-light .hero-label { background: rgba(107,78,255,0.08); border-color: rgba(107,78,255,0.2); color: var(--accent2); }
body.theme-light .hero h1 em { color: var(--accent2); }
body.theme-light .alert-success { background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.25); color: #166534; }
body.theme-light .alert-success .alert-title { color: var(--success); }
body.theme-light .alert-error { background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.25); color: #991b1b; }
body.theme-light .alert-error .alert-title { color: var(--error); }
body.theme-light .alert-warning { background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.25); color: #92400e; }
body.theme-light .alert-warning .alert-title { color: var(--warning); }

/* ── TOGGLE DE TEMA ── */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.theme-toggle:hover {
    color: var(--text);
    border-color: rgba(107,78,255,0.4);
    background: var(--surface2);
}
.icon-sun { display: block; }
.icon-moon { display: none; }
body.theme-light .icon-sun { display: none; }
body.theme-light .icon-moon { display: block; }

/* ── TRANSIÇÃO SUAVE ── */
body, body * { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.progress-fill, .fade-up, .blob, .beta-dot { transition: none !important; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── NOISE TEXTURE ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ── GLOW BLOBS ── */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(107, 78, 255, 0.18) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation: drift1 18s ease-in-out infinite alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(232, 255, 71, 0.1) 0%, transparent 70%);
    bottom: -100px;
    right: -150px;
    animation: drift2 22s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(80px, 60px); } }
@keyframes drift2 { to { transform: translate(-60px, -80px); } }

/* ── LAYOUT WRAPPER ── */
.wrapper {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   NAVEGAÇÃO
   ============================================================ */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    border-bottom: 1px solid var(--border);
}

.logo {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}

.nav-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 100px;
    letter-spacing: 0.04em;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 80px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-note {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
    text-align: right;
    max-width: 380px;
}

.footer-note strong {
    color: var(--text);
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 255, 71, 0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
    background: var(--surface2);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--success);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 30px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    letter-spacing: 0.01em;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}

/* ============================================================
   HOME — HERO
   ============================================================ */
.hero {
    padding: 60px 0 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: start;
    max-width: 680px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(232, 255, 71, 0.08);
    border: 1px solid rgba(232, 255, 71, 0.2);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.hero-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 16px;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero > div > p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual { display: none; }

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 380px;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 78, 255, 0.5), rgba(232, 255, 71, 0.5), transparent);
}

/* ── HERO — coluna única centralizada ── */
.hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 80px 0 60px;
    max-width: 720px;
    margin: 0 auto;
}

.hero > div > p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    justify-content: center;
}

.card-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface2);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    animation: slideIn 0.4s ease both;
}

.card-file-row:nth-child(2) { animation-delay: 0.1s; }
.card-file-row:nth-child(3) { animation-delay: 0.2s; }

.file-icon {
    width: 38px;
    height: 38px;
    background: rgba(107, 78, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-info { flex: 1; }
.file-name { font-size: 0.8rem; font-weight: 500; color: var(--text); }
.file-size { font-size: 0.7rem; color: var(--muted); }

.file-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 100px;
    background: rgba(232, 255, 71, 0.12);
    color: var(--accent);
    border: 1px solid rgba(232, 255, 71, 0.2);
}

.card-merge-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: var(--accent2);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.card-merge-btn:hover { opacity: 0.85; }

/* ── STATS ── */
.stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 80px;
}

.stat {
    flex: 0 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--text);
    letter-spacing: -0.03em;
}

.stat-num span { color: var(--accent); }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 2px;}

/* Mobile */
@media (max-width: 768px) {
    .stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .stat {
        text-align: center; /* opcional, melhora visual no grid */
    }
}

/* ── SECTION HEADER ── */
.section-header {
    margin-bottom: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-header p {
    color: var(--muted);
    font-size: 0.9rem;
    max-width: 360px;
    text-align: right;
}

/* ── TOOLS GRID ── */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 100px;
}

.tool-card {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, background 0.25s;
    cursor: pointer;
}

.tool-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(107, 78, 255, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 78, 255, 0.35);
    background: var(--card-hover);
}

.tool-card:hover::after { opacity: 1; }

.tool-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.tool-emoji {
    font-size: 2rem;
    margin-bottom: 18px;
    display: block;
    line-height: 1;
}

.tool-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.tool-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tool-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent2);
    letter-spacing: 0.02em;
}

.tool-action svg { transition: transform 0.2s; }
.tool-card:hover .tool-action svg { transform: translateX(4px); }

.tool-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
}

.tool-badge.new {
    background: rgba(232, 255, 71, 0.1);
    color: var(--accent);
    border: 1px solid rgba(232, 255, 71, 0.2);
}

.tool-badge.soon {
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    border: 1px solid var(--border);
}



/* ============================================================
   PÁGINAS DE FERRAMENTAS — LAYOUT GERAL
   ============================================================ */

/* Cabeçalho da página da ferramenta */
.tool-page-header {
    padding: 60px 0 40px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.tool-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 8px;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    margin-top: 6px;
}

.tool-page-back:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
}

.tool-page-title-group { flex: 1; }

.tool-page-emoji {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 12px;
    display: block;
}

.tool-page-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.tool-page-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 520px;
}

/* Área principal da ferramenta */
.tool-workspace {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
    padding-bottom: 80px;
}

.tool-workspace.full-width {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
}

/* ============================================================
   UPLOAD
   ============================================================ */
.upload-area {
    background: var(--surface);
    border: 2px dashed rgba(107, 78, 255, 0.3);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: border-color 0.25s, background 0.25s;
    cursor: pointer;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent2);
    background: rgba(107, 78, 255, 0.05);
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    opacity: 0.8;
}

.upload-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.upload-formats {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.upload-format-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(107, 78, 255, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(107, 78, 255, 0.2);
}

/* Lista de arquivos selecionados */
.file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.file-list-item .file-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
}

.file-list-item .file-info { flex: 1; }
.file-list-item .file-name { font-size: 0.82rem; }
.file-list-item .file-size { font-size: 0.72rem; }

.file-remove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    flex-shrink: 0;
}

.file-remove:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================================
   PAINEL DE OPÇÕES (coluna lateral)
   ============================================================ */
.options-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    position: sticky;
    top: 24px;
}

.options-panel::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 78, 255, 0.4), transparent);
    margin-bottom: 24px;
}

.options-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 20px;
}

.option-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.option-select,
.option-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}

.option-select:focus,
.option-input:focus {
    border-color: var(--accent2);
}

.option-select option {
    background: var(--surface2);
}

.options-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.options-panel .btn-primary {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 14px;
}

/* ============================================================
   BARRA DE PROGRESSO
   ============================================================ */
.progress-wrap {
    margin-top: 20px;
    display: none; /* mostrar via JS: element.style.display = 'block' */
}

.progress-wrap.visible {
    display: block;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 0.82rem;
    color: var(--muted);
}

.progress-pct {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface2);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    border-radius: 100px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* brilho animado na barra */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
    to { left: 160%; }
}

/* Loading spinner (alternativa à barra) */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent2);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   MENSAGENS DE FEEDBACK
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 16px;
    border: 1px solid transparent;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-body { flex: 1; }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.alert-msg { color: var(--muted); font-size: 0.82rem; }

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.alert-success .alert-title { color: var(--success); }

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-error .alert-title { color: var(--error); }

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.alert-warning .alert-title { color: var(--warning); }

/* ============================================================
   ÁREA DE RESULTADO / DOWNLOAD
   ============================================================ */
.result-box {
    background: var(--surface);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-top: 24px;
    display: none;
}

.result-box.visible {
    display: block;
    animation: fadeUp 0.4s ease both;
}

.result-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.result-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.result-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   ANIMAÇÕES DE ENTRADA
   ============================================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.6s ease forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.12s; }
.fade-up:nth-child(3) { animation-delay: 0.19s; }
.fade-up:nth-child(4) { animation-delay: 0.26s; }
.fade-up:nth-child(5) { animation-delay: 0.33s; }
.fade-up:nth-child(6) { animation-delay: 0.40s; }
.fade-up:nth-child(7) { animation-delay: 0.47s; }
.fade-up:nth-child(8) { animation-delay: 0.54s; }
.fade-up:nth-child(9) { animation-delay: 0.61s; }

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 0 50px;
    }

    .hero-visual { display: none; }

    .tool-workspace {
        grid-template-columns: 1fr;
    }

    .options-panel {
        position: static;
    }

    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .stats { gap: 20px; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header p { text-align: left; }
}

/* ============================================================
   BANNER BETA
   ============================================================ */
.beta-banner {
    position: relative;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 11px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: fadeDown 0.5s ease both;
    overflow: hidden;
}

/* linha de gradiente no topo do banner */
.beta-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 78, 255, 0.6), rgba(232, 255, 71, 0.5), transparent);
}

.beta-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.5;
}

.beta-banner-inner strong {
    color: var(--warning);
}

.beta-dot {
    width: 7px;
    height: 7px;
    background: var(--warning);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease infinite;
}

.beta-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.beta-close:hover {
    color: var(--text);
    background: var(--surface2);
}

.beta-banner.hidden {
    display: none;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ICONS — TOOL CARDS (GLOBAL)
   ============================================================ */

.tools-grid .tool-card .tool-icon {
    font-size: 2.8rem;
    margin-bottom: 18px;
    display: block;
    line-height: 1;
    transition: transform 0.25s, filter 0.25s, color 0.25s;
}

/* Cores por tipo */
.tool-card--merge .tool-icon { color: #6b4eff; }
.tool-card--split .tool-icon { color: #ef4444; }
.tool-card--rotate .tool-icon { color: #ab6993; }
.tool-card--compress .tool-icon { color: #f59e0b; }
.tool-card--to-images .tool-icon { color: #22c55e; }
.tool-card--to-pdf .tool-icon { color: #ef4444; }
.tool-card--to-word .tool-icon { color: #2563eb; }
.tool-card--to-excel .tool-icon { color: #16a34a; }
.tool-card--ocr .tool-icon { color: #8b5cf6; }
.tool-card--protect .tool-icon { color: #ff7651; }
.tool-card--unprotect .tool-icon { color: #06b6d4; }

/* Glow no hover */
.tool-card--merge:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(107, 78, 255, 0.7));
    
}
.tool-card--split:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.7));
    
}
.tool-card--rotate:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.7));
    
}
.tool-card--compress:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7));
    
}
.tool-card--to-images:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.7));
    
}
.tool-card--to-pdf:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.7));
    
}
.tool-card--to-word:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.7));
    
}
.tool-card--to-excel:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(22, 163, 74, 0.7));
    
}
.tool-card--ocr:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.7));
    
}
.tool-card--protect:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.7));
    
}
.tool-card--unprotect:hover .tool-icon {
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.7));
    
}

/* Borda colorida no hover */
.tool-card--merge:hover { border-color: rgba(107, 78, 255, 0.4); }
.tool-card--split:hover { border-color: rgba(239, 68, 68, 0.4); }
.tool-card--rotate:hover { border-color: rgba(59, 130, 246, 0.4); }
.tool-card--compress:hover { border-color: rgba(245, 158, 11, 0.4); }
.tool-card--to-images:hover { border-color: rgba(34, 197, 94, 0.4); }
.tool-card--to-pdf:hover { border-color: rgba(16, 185, 129, 0.4); }
.tool-card--to-word:hover { border-color: rgba(37, 99, 235, 0.4); }
.tool-card--to-excel:hover { border-color: rgba(22, 163, 74, 0.4); }
.tool-card--ocr:hover { border-color: rgba(139, 92, 246, 0.4); }
.tool-card--protect:hover { border-color: rgba(249, 115, 22, 0.4); }
.tool-card--unprotect:hover { border-color: rgba(6, 182, 212, 0.4); }


/* ============================================================
   RESPONSIVO FINAL (SOMENTE MOBILE)
   ============================================================ */

@media (max-width: 560px) {
    .tools-grid { grid-template-columns: 1fr; }
    .stats { flex-wrap: wrap; }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-note { text-align: left; }

    .tool-page-header {
        flex-direction: column;
        gap: 16px;
        padding: 40px 0 28px;
    }

    .upload-area { padding: 40px 24px; }

    .result-actions { flex-direction: column; }

    .stat-icon {
        font-size: 2rem;
        color: var(--accent);
        line-height: 1;
    }
}

.rating-widget {
    display: none;
    margin-top: 2rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color, #e0e0e0);
    text-align: center;
}

.rating-widget.visible {
    display: block;
}

.rating-prompt {
    font-size: 0.9rem;
    color: var(--text-muted, #888);
    margin-bottom: 0.5rem;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
}

.star {
    font-size: 1.8rem;
    color: var(--border-color, #ccc);
    transition: color 0.15s;
}

.star.active,
.star:hover,
.star.hovered {
    color: #f5a623;
}

.rating-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 400px;
    margin-inline: auto;
}

.rating-form textarea,
.rating-form input[type="email"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--input-bg, #fff);
    color: var(--text-color, #333);
    resize: vertical;
}

.rating-form button {
    align-self: center;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    background: var(--primary-color, #4a90e2);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.rating-form button:hover {
    opacity: 0.85;
}

.rating-thanks {
    font-size: 0.9rem;
    color: var(--text-muted, #888);
    margin-top: 0.75rem;
}