/* =========================================================
   1. VARIÁVEIS, RESET & BASE
   ========================================================= */
:root {
    --main-color: #006eff;
    --main-color-hover: #0060dd;
    --main-color-light-hover: #ddecff;
    --main-light-color: #a7cdff;
    --background-color: #fff;
    --grayscale-color-100: #d8d8d8;
    --grayscale-color-200: #bababa;
    --text-color-1: #232323;
    --text-color-2: #424242;
    --light-text-color: #fff;

    /* helpers */
    --container-max: 1160px;
    --container-pad: 16px;
    --radius-lg: 12px;
    --shadow-soft: 0 6px 12px rgba(0, 0, 0, .06);
    --shadow-soft-dark: 0 10px 30px rgba(0, 0, 0, .35);
    --focus-ring: 0 0 0 3px rgba(0, 110, 255, .18);

    /* layout com asides */
    --ad-w-desktop: 300px;
    --ad-w-medium: 260px;
    --center-fixed: 660px;
    --gap-cols: 32px;
    --ad-w-mobile: clamp(340px, 92vw, 420px);

    /* popup */
    --ad-popup-size: 400px;
    --ad-popup-offset: 16px;

    /* thumbs */
    --thumb-gap: 12px;

    /* botões de chamada para a ação */
    --cta-bg-color: var(--grayscale-color-100);
    --cta-text-color: var(--main-color);
    --cta-bg-color: #fcfcfc;
    --cta-bg-hover: #e2e2e2;
    --cta-border-color: var(--grayscale-color-100);
}

/* =========================================================
   DARK MODE
   ========================================================= */
:root[data-theme="dark"],
body[data-theme="dark"] {
  --cta-bg-color: var(--surface-02);        /* #0e141e */
  --cta-text-color: var(--text-color-1);    /* #e7ebf2 */
  --cta-bg-hover: #182233;                  /* hover no escuro (um pouco mais claro) */
  --cta-border-color: var(--grayscale-color-100);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: 100vh;
    color: var(--text-color-1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--background-color);
}

.container {
    width: min(100%, var(--container-max));
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Link “pular para conteúdo” */
.visually-hidden-focusable {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.visually-hidden-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 8px;
    padding: 8px;
    background: #fff;
    border: 2px solid var(--main-light-color);
    border-radius: 8px;
}

/* =========================================================
   2. NAVBAR & FOCO
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--grayscale-color-100);
    box-shadow: var(--shadow-soft);
}

.navbar {
    width: 100%;
}

.navbar__inner {
    max-width: calc(var(--ad-w-desktop)*2 + var(--center-fixed) + var(--gap-cols)*2);
    margin-inline: auto;
    padding: 10px var(--container-pad);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
}

.navbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color-1);
    font-weight: 700;
    letter-spacing: .2px;
}

.navbar__logo {
    border-radius: 6px;
}

.navbar__brand-text {
    font-size: 18px;
}

.navbar__menu {
    margin-left: auto;
}

.navbar__menu ul {
    list-style: none;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.navbar__menu a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    color: var(--text-color-1);
    transition: background-color .15s ease, color .15s ease;
}

.navbar__menu a:hover {
    background: var(--main-color-light-hover);
    color: var(--main-color-hover);
}

/* Burger */
.navbar__toggle {
    display: none;
}

.navbar__burger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--grayscale-color-100);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
}

.navbar__burger span {
    width: 20px;
    height: 2px;
    background: var(--text-color-1);
    display: block;
    border-radius: 2px;
}

.navbar__burger span+span {
    margin-top: 4px;
}

/* Foco visível */
.navbar__menu a:focus-visible,
.navbar__burger:focus-visible,
.navbar__brand:focus-visible {
    outline: 3px solid rgba(0, 110, 255, .25);
    outline-offset: 2px;
}

/* Links desabilitados */
.navbar__menu li:not(:first-child) a {
    position: relative;
    pointer-events: none;
    opacity: .45;
    filter: grayscale(0.4);
    cursor: not-allowed;
    background: transparent !important;
    color: var(--text-color-1) !important;
    border: 1px dashed var(--grayscale-color-100);
}

.navbar__menu li:not(:first-child) a:hover {
    background: transparent;
    color: var(--text-color-1);
}

.navbar__menu li:not(:first-child) a .badge-disabled {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 9px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    background: var(--grayscale-color-100);
    color: var(--text-color-1);
    opacity: .9;
    font-weight: 600;
    white-space: nowrap;
}

.navbar__menu li:not(:first-child) a:focus-visible {
    outline: 2px dashed rgba(0, 0, 0, .25);
    outline-offset: 2px;
}

/* =========================================================
   3. LAYOUT PRINCIPAL (GRID)
   ========================================================= */
main {
    flex: 1;
}

.main-content {
    display: grid;
    grid-template-areas:
        "left header right"
        "left center right";
    grid-template-columns: var(--ad-w-desktop) var(--center-fixed) var(--ad-w-desktop);
    grid-auto-rows: auto;
    gap: var(--gap-cols);
    align-items: start;
    max-width: calc(var(--ad-w-desktop)*2 + var(--center-fixed) + var(--gap-cols)*2);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Laterais */
.left-side {
    grid-area: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}

.right-side {
    grid-area: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}

/* =========================================================
   4. FERRAMENTA & CONTEÚDO CENTRAL
   ========================================================= */
.tool-header {
    grid-area: header;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.tool-header h1 {
    text-align: center;
    padding-top: 16px;
    font-size: clamp(22px, 2.2vw + 12px, 36px);
    line-height: 1.2;
}

.info-wrapper p {
    text-align: center;
    font-size: clamp(14px, 1.2vw + 10px, 16px);
    color: var(--text-color-2);
}

.tool-header .supported-formats {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 6px;
    margin: 14px 0 20px;
    font-size: 14px;
    color: var(--text-color-2);
}

.tool-header .supported-formats span {
    white-space: nowrap;
}

.tool-header .supported-formats ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.tool-header .supported-formats li {
    display: inline-block;
}

.tool-header .supported-formats a {
    text-decoration: none;
    color: var(--main-color);
}

.tool-header .supported-formats a:hover {
    text-decoration: underline;
}

/* Coluna central */
.content-wrapper {
    grid-area: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(20px, 3vw, 32px);
    width: 100%;
}

/* =========================================================
   5. UPLOAD & FORMULÁRIO
   ========================================================= */
.file-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
}

.file-upload-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    width: 100%;
    padding: clamp(18px, 3.5vw, 50px);
    border: 4px dashed var(--main-light-color);
    border-radius: var(--radius-lg);
    background: #fff;
    transition: background-color .2s ease;
}

.file-upload-card:hover {
    background: var(--main-color-light-hover);
}

.file-upload-card span {
    font-size: clamp(16px, 1.4vw + 10px, 24px);
    color: var(--text-color-2);
}

.file-upload-card.is-dragover {
    background: var(--main-color-light-hover);
    border-color: var(--main-light-color);
}

.file-wrapper .btn-upload,
.file-wrapper .btn-convert {
    width: min(100%, 260px);
    height: 56px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--main-color);
    font-size: clamp(16px, 1.2vw + 10px, 20px);
    font-weight: 600;
    color: var(--light-text-color);
    cursor: pointer;
    transition: background-color .2s ease, transform .06s ease;
}

.file-wrapper .btn-upload:hover,
.file-wrapper .btn-convert:hover {
    background: var(--main-color-hover);
}

.file-wrapper .btn-upload:active,
.file-wrapper .btn-convert:active {
    transform: translateY(1px);
}

.file-wrapper .btn-convert {
    width: 100%;
}

/* Label */
.field-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color-1);
    margin-bottom: 6px;
}

/* =========================================================
   6. THUMBS & CAROUSEL
   ========================================================= */
.thumbs-carousel {
    position: relative;
    width: 100%;
}

.thumbs-viewport {
    overflow: hidden;
    width: 100%;
}

.thumbs-track {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--thumb-gap);
    padding: 4px 0;
    align-items: stretch;
    width: 100%;
}

.thumb-card {
    position: relative;
    aspect-ratio: 1/1;
    border: 1px solid var(--grayscale-color-100);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-soft);
    width: 100%;
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-dims {
    position: absolute;
    left: 8px;
    bottom: 8px;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    padding: 2px 6px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease;
}

.thumb-card.show-dims .thumb-dims,
.thumb-card:hover .thumb-dims {
    opacity: 1;
    transform: translateY(0);
}

.thumb-overlay {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .55) 100%);
    color: #fff;
    font-size: 12px;
    padding: 24px 8px 8px;
    max-height: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .15s ease;
}

.thumb-card:hover .thumb-overlay {
    opacity: 1;
}

.thumb-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 18px;
    line-height: 28px;
    cursor: pointer;
}

.thumb-remove:hover {
    background: rgba(0, 0, 0, .75);
}

/* Card final “+N” */
.thumb-card--more {
    display: grid;
    place-items: center;
    background: #f9fafb;
    border: 1px dashed var(--grayscale-color-100);
    user-select: none;
    pointer-events: none;
}

.thumb-card--more>span {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-color-2);
}

/* Setas desativadas */
.thumbs-nav {
    display: none !important;
}

/* =========================================================
   7. DROP-DOWN CUSTOM
   ========================================================= */
.output-format {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.output-format .select-wrapper {
    position: relative;
}

/* ATENÇÃO: não desabilite o select nativo globalmente */
.output-format .select-wrapper select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* fica “por cima”, mas invisível — recebe o toque */
}

/* Visual “fake” */
.output-format .select-wrapper .select-display {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 50px 12px 16px;
    font-size: clamp(16px, 1.2vw + 10px, 18px);
    color: var(--text-color-2);
    border: 2px solid var(--grayscale-color-100);
    border-radius: var(--radius-lg);
    background: #fff;
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.output-format .select-wrapper .select-display:focus-visible {
    outline: none;
    border-color: var(--main-light-color);
    box-shadow: 0 0 0 3px rgba(0, 110, 255, .15);
}

.output-format .select-wrapper .select-display i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 20px;
    color: #232323;
    transition: transform .15s ease;
}

.output-format .select-wrapper .select-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 2px solid var(--grayscale-color-100);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    display: none;
    z-index: 1201;
    --option-h: 44px;
    max-height: calc(var(--option-h)*6);
    overflow-y: auto;
}

.output-format .select-wrapper.open .select-menu {
    display: block;
}

.output-format .select-wrapper.open .select-display i {
    transform: translateY(-50%) rotate(180deg);
}

.output-format .select-wrapper .select-menu li[role="option"] {
    padding: 10px 12px;
    min-height: 44px;
    line-height: 1.4;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.output-format .select-wrapper .select-menu li[role="option"]:hover,
.output-format .select-wrapper .select-menu li[aria-selected="true"] {
    background: rgba(0, 110, 255, .12);
    color: #006eff;
}

/* =========================================================
   8. ESTATÍSTICAS (LIVE STATS)
   ========================================================= */
.live-stats {
    width: 100%;
    max-width: var(--center-fixed, 660px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--grayscale-color-100);
    border-radius: 10px;
    background: #fff;
    color: var(--text-color-2);
    box-shadow: var(--shadow-soft);
    font-size: 14px;
}

.tool-header>.live-stats {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
}

.live-stats strong {
    color: var(--text-color-1);
    font-weight: 700;
}

.live-stats__sep {
    opacity: .6;
}

.live-stats__note {
    font-size: 12px;
    color: var(--grayscale-color-200);
}

.live-stats__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
    animation: ping 1.8s infinite cubic-bezier(0, 0, .2, 1);
}

@keyframes ping {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
        transform: scale(1);
    }
}

/* =========================================================
   9. BARRA DE PROGRESSO & RESULTADO (UX PATCH)
   ========================================================= */

/* Bloco principal de progresso/resultado (wrapper) */
.conversion-progress,
.ct-result {
    width: 100%;
    max-width: var(--center-fixed, 660px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    
    /* Estilos herdados do upload card (para compatibilidade visual) */
    padding: 14px;
    border: 1px solid var(--grayscale-color-100);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

/* Título de arquivo / Status */
.conversion-progress__label {
    font-size: 14px;
    color: var(--text-color-2);
}

/* Nome discreto do arquivo (NOVA CLASSE) */
.conversion-progress__filename {
    text-align: center;
    font-size: 12px;
    color: var(--grayscale-color-200); /* Cor discreta */
    height: 1.2em;
    /* Ajustado: removido margin-bottom de 4px para melhor espaçamento de grid */
}

/* Trilho da barra (Container da animação) */
.conversion-progress__track {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    /* Alterado: Simplificado para cor sólida para melhor compatibilidade com Dark Mode */
    background: var(--grayscale-color-100);
    overflow: hidden;
    border: 1px solid var(--grayscale-color-100);
    box-shadow: var(--shadow-soft);
}

/* Barra animada */
.conversion-progress__bar {
    height: 100%;
    width: 0%;
    background: var(--main-color);
    transition: width .2s ease;
    will-change: width;
    
    /* Importante para a porcentagem flutuar sobre a cor */
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Empurra a porcentagem para a direita */
    padding-right: 8px; /* Espaçamento interno para a porcentagem */
}

/* Porcentagem (dentro da barra) */
.conversion-progress__percent {
    /* CORREÇÃO: Removido Position: absolute, Top, Transform */
    /* Agora é um elemento flexível dentro da barra (melhor compatibilidade) */
    font-size: 10px;
    font-weight: 700;
    color: var(--light-text-color); /* Cor branca no tema claro */
    opacity: 0.9;
    white-space: nowrap;
    z-index: 2;
}

/* Dica de status (Conversão/Compactação) */
.conversion-progress__file-hint {
    /* CORREÇÃO: Posição absoluta DENTRO do trilho, sobre o fundo */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--text-color-2); /* Cor discreta */
    z-index: 1;
    opacity: 0.7;
    white-space: nowrap;
}

/* Resultado */
.ct-result a {
    text-decoration: none;
}

.ct-result__text {
    font-size: 14px;
    color: var(--text-color-2);
}

/* Botão download */
.btn-download {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--main-color);
    color: var(--light-text-color);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color .15s ease, transform .06s ease;
}

.btn-download i {
    font-size: 22px;
}

.btn-download span {
    color: var(--light-text-color)
}

.btn-download:hover {
    background: var(--main-color-hover);
}

.btn-download:active {
    transform: translateY(1px);
}

/* =========================================================
   10. SEO / CONTEÚDO ADICIONAL
   ========================================================= */

.seo-content h2 {
    margin-bottom: 24px;
}

.seo-content h3 {
    margin-top: 18px;
    margin-bottom: 18px;
}

.seo-content h4 {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* =========================================================
   11. ADS / POPUPS
   ========================================================= */
.left-side .ad-slot,
.right-side .ad-slot {
    width: 100%;
    max-width: var(--ad-w-desktop);
    min-height: 600px;
    border: 2px dashed var(--grayscale-color-100);
    border-radius: var(--radius-lg);
    background: repeating-linear-gradient(135deg, #f7f7f7 0 12px, #ffffff 12px 24px);
    box-shadow: var(--shadow-soft);
    position: relative;
}

.left-side .ad-slot::after,
.right-side .ad-slot::after {
    content: "AD";
    position: absolute;
    top: 10px;
    left: 10px;
    font: 700 12px/1 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--grayscale-color-200);
    letter-spacing: .08em;
    padding: 2px 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--grayscale-color-100);
}

.ad-sticky {
    position: sticky;
    top: 24px;
}

.ad-slot.ad-inline {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    min-height: 90px;
    max-height: 120px;
    border: 1px dashed var(--grayscale-color-100);
    border-radius: var(--radius-lg);
    box-shadow: none;
    background: repeating-linear-gradient(135deg, #fafafa 0 12px, #ffffff 12px 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    position: relative;
    margin-top: 32px;
    margin-bottom: 32px
}

.ad-slot.ad-inline::after {
    content: "AD";
    position: absolute;
    top: 8px;
    right: 10px;
    font: 700 10px/1 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--grayscale-color-200);
    letter-spacing: .06em;
    padding: 2px 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--grayscale-color-100);
    opacity: .85;
}

.ad-inline .ad-inline-text {
    font-size: 12px;
    color: var(--grayscale-color-200);
    user-select: none;
}

/* Popup flutuante */
.ad-popup {
    position: fixed;
    right: var(--ad-popup-offset);
    bottom: calc(var(--ad-popup-offset) + env(safe-area-inset-bottom, 0px));
    z-index: 1100;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

.ad-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ad-slot.ad-square {
    width: var(--ad-popup-size);
    height: var(--ad-popup-size);
    max-width: 90vw;
    max-height: 60vh;
    border: 2px dashed var(--grayscale-color-100);
    border-radius: var(--radius-lg);
    background: repeating-linear-gradient(135deg, #f7f7f7 0 12px, #ffffff 12px 24px);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 1;
}

.ad-slot.ad-square::after {
    content: "AD";
    position: absolute;
    top: 8px;
    left: 8px;
    font: 700 10px/1 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--grayscale-color-200);
    letter-spacing: .06em;
    padding: 2px 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--grayscale-color-100);
    opacity: .9;
}

.ad-slot.ad-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-lg);
}

.ad-popup__close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--grayscale-color-100);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color-2);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    z-index: 2;
}

.ad-popup__close:hover {
    background: #f7f7f7;
}

.ad-popup__close:focus-visible {
    outline: 2px solid var(--main-light-color);
    outline-offset: 2px;
}

/* Camada de conteúdo sobre a imagem */
.ad-slot .ad-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 1.1rem 1rem;
  border-radius: var(--radius-lg);
  /* degrade sutil para legibilidade, sem apagar a arte */
  background: linear-gradient(180deg, rgba(0,0,0,0) 52%, rgba(0,0,0,0.58) 100%);
  color: #fff;
  z-index: 2;
  pointer-events: none; /* garante que só o botão receba clique */
}

.ad-info__bonus {
  font: 800 1.22rem/1.1 'Inter', 'Segoe UI', system-ui, sans-serif;
  margin: 0 0 .25rem;
  text-shadow: 0 2px 6px rgba(0,0,0,.55);
}

.ad-info__price {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin: 0 0 .8rem;
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
}

.ad-info__price .old-price {
  font-size: .95rem;
  opacity: .85;
  text-decoration: line-through;
}

.ad-info__price .new-price {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .2px;
  text-shadow: 0 2px 6px rgba(0,0,0,.55);
}

.ad-info__price .per-month {
  font-size: .9rem;
  opacity: .95;
}

/* Botão interativo */
.ad-info__cta {
  pointer-events: auto; /* habilita clique no botão */
  display: inline-block;
  background: #e50914;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: .58rem 1.2rem;
  font: 700 .95rem/1 'Inter','Segoe UI',system-ui,sans-serif;
  box-shadow: 0 6px 16px rgba(229,9,20,.35);
  transform: translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  margin-bottom: .55rem;
}

.ad-info__cta:hover {
  background: #ff1422;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(229,9,20,.45);
}

.ad-info__cta:active {
  transform: translateY(0);
}

.ad-info__note {
  margin: 0 0 .2rem;
  font-size: .76rem;
  opacity: .9;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
}

/* Ajuste responsivo para telas muito pequenas */
@media (max-width: 380px) {
  .ad-info__bonus { font-size: 1.05rem; }
  .ad-info__price .new-price { font-size: 1.25rem; }
  .ad-info__cta { padding: .52rem 1rem; font-size: .9rem; }
}

/* Overlays genéricos — INATIVOS por padrão (não bloqueiam cliques) */
.premium-overlay,
.popup__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(2px);
    z-index: 1100;
    display: none;
    pointer-events: none;
}

.premium-overlay.is-on,
.popup__overlay.is-on {
    display: block;
    pointer-events: auto;
}

/* =========================================================
   12. SETTINGS
   ========================================================= */
.settings {
    position: relative;
    margin-left: 6px;
}

.settings__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--grayscale-color-100);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .06s ease;
}

.settings__btn i {
    font-size: 20px;
    color: var(--text-color-1);
}

.settings__btn:active {
    transform: translateY(1px);
}

/* ESTADO FECHADO (sem display:none) */
.settings__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    width: min(320px, 92vw);
    background: #fff;
    border: 1px solid var(--grayscale-color-100);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 10px;

    /* animação/ocultação */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

/* ESTADO ABERTO */
.settings.is-open .settings__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.settings__group {
    padding: 8px;
    border-radius: 10px;
}

.settings__group+.settings__group {
    margin-top: 8px;
}

.settings__title {
    font: 700 13px/1.4 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-color-1);
    margin-bottom: 8px;
}

.settings__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--grayscale-color-100);
}

.settings__row+.settings__row {
    margin-top: 8px;
}

.settings__label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color-1);
    font-weight: 600;
}

/* Switch */
.switch {
    --h: 26px;
    --w: 48px;
    position: relative;
    width: var(--w);
    height: var(--h);
}

.switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.switch__track {
    width: 100%;
    height: 100%;
    border-radius: var(--h);
    background: var(--grayscale-color-100);
    position: relative;
    transition: background .15s ease;
}

.switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: left .15s ease, background .15s ease, transform .15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.switch input:checked+.switch__track {
    background: var(--main-color);
}

.switch input:checked+.switch__track .switch__thumb {
    left: calc(100% - 23px);
}

/* =========================================================
   13. BANDEIRINHAS (FLAGS)
   ========================================================= */
.lang-list {
    display: flex;
    gap: 8px;
    /* Controla o espaçamento entre os botões */
    align-items: center;
    flex-wrap: wrap;
}

/* O FORM deve ser exibido como um item inline-flex */
.lang-list form {
    display: inline-flex;
    /* Permite que o formulário fique na linha sem quebrar o layout */
    margin: 0;
    padding: 0;
}

/* O elemento clicável (BUTTON) */
.lang-list button {
    /* Resetando estilos padrão do botão */
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;

    /* Estilos visuais */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;

    color: var(--text-color-1);
    border: 1px solid var(--grayscale-color-100);
    background: transparent;

    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    transition: all .2s ease;
}

/* Estilos de hover e focus-visible */
.lang-list button:hover,
.lang-list button:focus-visible {
    background: var(--main-color-light-hover);
    color: var(--main-color-hover);
    outline: none;
}

/* Estilo da imagem (bandeira) */
.lang-list img {
    width: 22px;
    height: 18px;
    display: inline-block;
    border-radius: 3px;
}

/* =========================================================
   14. RODAPÉ
   ========================================================= */
footer {
    width: 100%;
    text-align: center;
    border-top: 2px solid var(--grayscale-color-100);
    height: 80px;
    line-height: 80px;
    color: var(--text-color-2);
}

/* =========================================================
   15. SEO / CONTEÚDO ADICIONAL
   ========================================================= */

.seo-content h2 {
    margin-bottom: 24px;
}

.seo-content h3 {
    margin-top: 18px;
    margin-bottom: 18px;
}

.seo-content h4 {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* =========================================================
   16. CLASSES VIRTUAIS (BLINDAGEM)
   ========================================================= */

/* Força o wrapper virtual a não ter padding/borda para ocupar 100% */
.file-upload-card.is-virtual {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0px !important; 
}

.file-upload-card.is-virtual:hover {
    background: transparent !important;
}

/* wrapper neutro para os cards virtuais (largura/centragem garantidas) */
.ct-virtual-card {
    width: 100% !important;
    max-width: var(--center-fixed, 660px) !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    text-align: center;
}

/* blocos internos: full-width do centro */
.ct-virtual-card .conversion-progress,
.ct-virtual-card .ct-result {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px; /* O padding original dos blocos internos */
}

/* trilho: full-width garantido */
.ct-virtual-card .conversion-progress__track {
    width: 100% !important;
}

/* botão: mesma presença do Convert */
.ct-virtual-card .btn-download {
    width: 100% !important;
    max-width: 260px;
    align-self: center;
}


/* =========================================================
   17. TEMA ESCURO (DARK MODE) 🌙
   ========================================================= */

/* Dark Mode Base */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
    }
}

:root[data-theme="dark"],
body[data-theme="dark"] {
    color-scheme: dark;
    --background-color: #0c0f14;
    --text-color-1: #e7ebf2;
    --text-color-2: #a7b0bf;
    --grayscale-color-100: #232d3f;
    --grayscale-color-200: #6d7990;
    --main-color: #4da3ff;
    --main-color-hover: #2b8bff;
    --main-color-light-hover: rgba(77, 163, 255, .12);
    --main-light-color: #7abaff;
    --surface-01: #111621;
    --surface-02: #0e141e;
    --surface-03: #0a0f18;
}

:root[data-theme="dark"] body,
body[data-theme="dark"] {
    background: var(--background-color);
    color: var(--text-color-1);
}

/* Navbar */
:root[data-theme="dark"] .site-header,
body[data-theme="dark"] .site-header {
    background: var(--surface-01);
    border-bottom-color: var(--grayscale-color-100);
}

:root[data-theme="dark"] .navbar__brand,
body[data-theme="dark"] .navbar__brand {
    color: var(--text-color-1);
}

:root[data-theme="dark"] .navbar__menu a,
body[data-theme="dark"] .navbar__menu a {
    color: var(--text-color-1);
}

:root[data-theme="dark"] .navbar__menu a:hover,
body[data-theme="dark"] .navbar__menu a:hover {
    background: var(--main-color-light-hover);
    color: var(--main-color-hover);
}

:root[data-theme="dark"] .navbar__burger,
body[data-theme="dark"] .navbar__burger {
    background: var(--surface-01);
    border-color: var(--grayscale-color-100);
}

:root[data-theme="dark"] .navbar__burger span,
body[data-theme="dark"] .navbar__burger span {
    background: var(--text-color-1);
}

:root[data-theme="dark"] .settings__btn,
body[data-theme="dark"] .settings__btn {
    background: var(--surface-01);
}

:root[data-theme="dark"] .settings__menu,
body[data-theme="dark"] .settings__menu {
    background: var(--surface-01);
}

/* Header/Upload */
:root[data-theme="dark"] .info-wrapper p,
body[data-theme="dark"] .info-wrapper p {
    color: var(--text-color-2);
}

:root[data-theme="dark"] .tool-header .supported-formats,
body[data-theme="dark"] .tool-header .supported-formats {
    color: var(--text-color-2);
}

:root[data-theme="dark"] .tool-header .supported-formats a,
body[data-theme="dark"] .tool-header .supported-formats a {
    color: var(--main-color);
}

:root[data-theme="dark"] .file-upload-card,
body[data-theme="dark"] .file-upload-card {
    background: var(--surface-01);
    border-color: var(--main-light-color);
}

:root[data-theme="dark"] .file-upload-card:hover,
body[data-theme="dark"] .file-upload-card:hover {
    background: var(--main-color-light-hover);
}

:root[data-theme="dark"] .file-upload-card span,
body[data-theme="dark"] .file-upload-card span {
    color: var(--text-color-2);
}

:root[data-theme="dark"] .file-wrapper .btn-upload,
:root[data-theme="dark"] .file-wrapper .btn-convert,
body[data-theme="dark"] .file-wrapper .btn-upload,
body[data-theme="dark"] .file-wrapper .btn-convert {
    background: var(--main-color);
    color: #fff;
}

:root[data-theme="dark"] .file-wrapper .btn-upload:hover,
:root[data-theme="dark"] .file-wrapper .btn-convert:hover,
body[data-theme="dark"] .file-wrapper .btn-upload:hover,
body[data-theme="dark"] .file-wrapper .btn-convert:hover {
    background: var(--main-color-hover);
}

/* Thumbs */
:root[data-theme="dark"] .thumb-card,
body[data-theme="dark"] .thumb-card {
    background: var(--surface-01);
    border-color: var(--grayscale-color-100);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .thumb-card--more,
body[data-theme="dark"] .thumb-card--more {
    background: var(--surface-02);
    border-color: var(--grayscale-color-100);
}

:root[data-theme="dark"] .thumb-card--more>span,
body[data-theme="dark"] .thumb-card--more>span {
    color: var(--text-color-2);
}

:root[data-theme="dark"] .thumb-remove,
body[data-theme="dark"] .thumb-remove {
    background: rgba(0, 0, 0, .5);
}

/* Dropdown */
:root[data-theme="dark"] .output-format .select-wrapper .select-display,
body[data-theme="dark"] .output-format .select-wrapper .select-display {
    color: var(--text-color-2);
    border-color: var(--grayscale-color-100);
    background: var(--surface-01);
    box-shadow: none;
}

:root[data-theme="dark"] .output-format .select-wrapper .select-display:focus-visible,
body[data-theme="dark"] .output-format .select-wrapper .select-display:focus-visible {
    box-shadow: var(--focus-ring);
    border-color: var(--main-light-color);
}

:root[data-theme="dark"] .output-format .select-wrapper .select-display i,
body[data-theme="dark"] .output-format .select-wrapper .select-display i {
    color: var(--text-color-1);
}

:root[data-theme="dark"] .output-format .select-wrapper .select-menu,
body[data-theme="dark"] .output-format .select-wrapper .select-menu {
    background: var(--surface-03);
    border-color: var(--grayscale-color-100);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .output-format .select-wrapper .select-menu li[role="option"]:hover,
:root[data-theme="dark"] .output-format .select-wrapper .select-menu li[aria-selected="true"],
body[data-theme="dark"] .output-format .select-wrapper .select-menu li[role="option"]:hover,
body[data-theme="dark"] .output-format .select-wrapper .select-menu li[aria-selected="true"] {
    background: rgba(77, 163, 255, .18);
    color: var(--main-color);
}

/* Live Stats */
:root[data-theme="dark"] .live-stats,
body[data-theme="dark"] .live-stats {
    background: var(--surface-01);
    color: var(--text-color-2);
    border-color: var(--grayscale-color-100);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .live-stats strong,
body[data-theme="dark"] .live-stats strong {
    color: var(--text-color-1);
}

:root[data-theme="dark"] .live-stats__note,
body[data-theme="dark"] .live-stats__note {
    color: var(--grayscale-color-200);
}

/* Progresso/Resultado */
:root[data-theme="dark"] .conversion-progress,
body[data-theme="dark"] .conversion-progress {
    background: var(--surface-01);
    border-color: var(--grayscale-color-100);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .conversion-progress__track,
body[data-theme="dark"] .conversion-progress__track {
    /* Cor de fundo do trilho */
    background: var(--grayscale-color-100);
    border-color: var(--grayscale-color-100);
    box-shadow: none;
}

:root[data-theme="dark"] .conversion-progress__label,
body[data-theme="dark"] .conversion-progress__label {
    color: var(--text-color-2);
}

/* CORREÇÃO DARK MODE: Cor da dica do arquivo no tema escuro */
:root[data-theme="dark"] .conversion-progress__file-hint,
body[data-theme="dark"] .conversion-progress__file-hint {
    color: var(--text-color-2);
}

:root[data-theme="dark"] .ct-result,
body[data-theme="dark"] .ct-result {
    background: var(--surface-01);
    border-color: var(--grayscale-color-100);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .ct-result__text,
body[data-theme="dark"] .ct-result__text {
    color: var(--text-color-2);
}

:root[data-theme="dark"] .seo-content,
body[data-theme="dark"] .seo-content {
    color: var(--text-color-2);
    border-top-color: var(--grayscale-color-100);
}

:root[data-theme="dark"] .seo-content h2,
:root[data-theme="dark"] .seo-content h3,
:root[data-theme="dark"] .seo-content dt,
body[data-theme="dark"] .seo-content h2,
body[data-theme="dark"] .seo-content h3,
body[data-theme="dark"] .seo-content dt {
    color: var(--text-color-1);
}

/* Ads */
:root[data-theme="dark"] .left-side .ad-slot,
:root[data-theme="dark"] .right-side .ad-slot,
body[data-theme="dark"] .left-side .ad-slot,
body[data-theme="dark"] .right-side .ad-slot {
    border-color: var(--grayscale-color-100);
    background: repeating-linear-gradient(135deg, #0f1624 0 12px, #111a2a 12px 24px);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .left-side .ad-slot::after,
:root[data-theme="dark"] .right-side .ad-slot::after,
body[data-theme="dark"] .left-side .ad-slot::after,
body[data-theme="dark"] .right-side .ad-slot::after {
    background: var(--surface-01);
    border-color: var(--grayscale-color-100);
    color: var(--grayscale-color-200);
}

:root[data-theme="dark"] .ad-slot.ad-inline,
body[data-theme="dark"] .ad-slot.ad-inline {
    background: repeating-linear-gradient(135deg, #0e141e 0 12px, #0c121b 12px 24px);
    border-color: var(--grayscale-color-100);
}

:root[data-theme="dark"] .ad-slot.ad-inline::after,
body[data-theme="dark"] .ad-slot.ad-inline::after {
    background: var(--surface-01);
    border-color: var(--grayscale-color-100);
    color: var(--grayscale-color-200);
}

:root[data-theme="dark"] .ad-slot.ad-square,
body[data-theme="dark"] .ad-slot.ad-square {
    background: repeating-linear-gradient(135deg, #0f1624 0 12px, #111a2a 12px 24px);
    border-color: var(--grayscale-color-100);
    box-shadow: var(--shadow-soft-dark);
}

:root[data-theme="dark"] .ad-popup__close,
body[data-theme="dark"] .ad-popup__close {
    background: var(--surface-01);
    color: var(--text-color-2);
    border-color: var(--grayscale-color-100);
}

:root[data-theme="dark"] .ad-popup__close:hover,
body[data-theme="dark"] .ad-popup__close:hover {
    background: var(--surface-02);
}


/* =========================================================
   18. RESPONSIVIDADE
   ========================================================= */
@media (max-width:1199.98px) {
    .navbar__inner {
        max-width: calc(var(--ad-w-medium)*2 + var(--center-fixed) + var(--gap-cols)*2);
    }

    .main-content {
        grid-template-columns: var(--ad-w-medium) var(--center-fixed) var(--ad-w-medium);
        max-width: calc(var(--ad-w-medium)*2 + var(--center-fixed) + var(--gap-cols)*2);
    }

    .left-side .ad-slot,
    .right-side .ad-slot {
        max-width: var(--ad-w-medium);
    }
}

@media (max-width:992px) {
    .main-content {
        grid-template-areas: "header" "center" "left" "right";
        grid-template-columns: 1fr;
        max-width: 600px;
    }

    /* CENTRALIZAÇÃO HORIZONTAL DAS LATERAIS */
    .left-side,
    .right-side {
        justify-content: center;
        align-items: center;
    }

    /* LARGURA E ALTURA UM POUCO MAIORES */
    .left-side .ad-slot,
    .right-side .ad-slot {
        width: 90%;
        max-width: var(--ad-w-mobile);
        min-height: 320px;
        margin: 12px auto 0;
    }

    /* Evita “grudar” no topo no mobile */
    .ad-sticky {
        position: static;
    }
}

@media (max-width:800px) {
    /* Geral/Contenção */
    html,
    body {
        overflow-x: hidden;
    }

    .content-wrapper {
        width: 100%;
        max-width: 680px;
        margin-inline: auto;
        padding-inline: 0;
        box-sizing: border-box;
        padding-inline: var(--container-pad, 16px);
    }

    .file-wrapper {
        width: 100%;
        box-sizing: border-box;
    }

    /* Navbar Mobile */
    .navbar__inner {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .navbar__burger {
        display: inline-flex;
        margin-left: auto;
    }

    .navbar__menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 60px;
        width: 100%;
        background: #fff;
        border-bottom: 1px solid var(--grayscale-color-100);
        box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity .15s ease, transform .15s ease, visibility .15s;
        z-index: 1001;
        pointer-events: none;
        margin-left: 0;
        padding: 12px 0;
    }

    .navbar__menu ul {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        width: 100%;
        gap: 6px;
        padding: 8px 16px 16px;
        box-sizing: border-box;
    }

    .navbar__menu a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px;
        border-radius: 8px;
        text-align: center;
        box-sizing: border-box;
    }

    .navbar__menu li:not(:first-child) a {
        padding-right: 42px;
    }

    .navbar__menu li:not(:first-child) a .badge-disabled,
    .navbar__menu a.is-disabled .badge-disabled {
        position: absolute;
        top: 6px;
        right: 12px;
        transform: none;
        font-size: 10px;
        line-height: 1;
        padding: 3px 6px;
        border-radius: 999px;
        background: var(--grayscale-color-100);
        color: var(--text-color-1);
        font-weight: 600;
        opacity: .9;
        z-index: 1;
        pointer-events: none;
    }

    #nav-toggle:checked~.navbar__menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Tool Header Mobile */
    .tool-header h1 {
        font-size: clamp(18px, 4vw + 8px, 26px);
    }

    .info-wrapper p {
        font-size: clamp(12px, 3.2vw, 12px);
        line-height: 1.4;
        padding: 0 8px;
    }

    .supported-formats span {
        font-size: 12px;
    }

    .supported-formats ul li a {
        font-size: 12px;
    }

    .file-wrapper .btn-upload,
    .file-wrapper .btn-convert {
        height: 54px;
    }

    /* Ad Popup Mobile */
    .ad-popup {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1100;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate(-50%, 8px);
    }

    .ad-popup.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }

    .ad-popup.is-visible::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .55);
        z-index: 0;
    }

    .ad-popup__inner {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ad-popup__close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        z-index: 2;
    }

    .output-format .select-wrapper select {
        opacity: 0;
        pointer-events: auto;
    }

    /* Settings Mobile */
    .settings {
        position: static;
    }

    .settings__menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 60px;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;

        background: #fff;
        border: none;
        border-bottom: 1px solid var(--grayscale-color-100);
        border-radius: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
        padding: 16px;
        margin-left: 0;
        z-index: 1001;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease, visibility .15s;

        max-height: calc(100dvh - var(--navbar-height, 64px));
        overflow-y: auto;
    }

    .settings.is-open .settings__menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Ad Popup Mobile Adjustments */
    :root {
        --ad-popup-size: min(96vw, 400px);
        --ad-popup-offset: 18px;
    }

    .ad-popup {
        left: 50% !important;
        right: auto !important;
        bottom: calc(var(--ad-popup-offset) + env(safe-area-inset-bottom, 0px));
    }

    .ad-popup__inner {
        width: var(--ad-popup-size);
        max-width: 96vw;
    }

    .ad-slot.ad-square {
        width: var(--ad-popup-size);
        height: var(--ad-popup-size);
        max-width: 96vw;
        max-height: 80vh;
        margin-inline: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    footer {
        margin-top: 32px;
    }

    footer p {
        font-size: 14px;
    }

    .ad-popup__close {
        top: -12px;
        right: -12px;
        width: 32px;
        height: 32px;
    }

    /* Dark Mode Mobile */
    :root[data-theme="dark"] .navbar__menu,
    body[data-theme="dark"] .navbar__menu {
        background: var(--surface-01);
        border-bottom-color: var(--grayscale-color-100);
        box-shadow: var(--shadow-soft-dark);
    }

    :root[data-theme="dark"] .ad-popup.is-visible::before,
    body[data-theme="dark"] .ad-popup.is-visible::before {
        background: rgba(0, 0, 0, .6);
    }

    :root[data-theme="dark"] .navbar__burger,
    body[data-theme="dark"] .navbar__burger {
        background: var(--surface-01);
        border-color: var(--grayscale-color-100);
    }

    /* Flags Mobile */
    .lang-list {
        justify-content: space-between;
    }
}

@media (max-width:640px) {
    /* REMOVIDA REGRA: .thumb-card{ width:44vw; } */
    .file-upload-card {
        padding: 18px;
    }

    .seo-content dl {
        grid-template-columns: 1fr;
    }

    .ad-slot.ad-inline {
        min-height: 56px;
        border-radius: 10px;
    }

    .ad-slot.ad-inline::after {
        top: 6px;
        right: 8px;
        font-size: 9px;
    }

    :root {
        --ad-popup-size: 320px;
        --ad-popup-offset: 10px;
    }

    /* Mantém centralizado e deixa respirar um pouco */
    .left-side .ad-slot,
    .right-side .ad-slot {
        max-width: 70vw;
        min-height: 70vw;
    }
}

@media (max-width:480px) {
    .live-stats {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .live-stats__sep {
        display: none;
    }
}

@media (max-width:400px) {
    .thumbs-nav {
        width: 32px;
        height: 32px;
    }

    .thumbs-prev {
        left: 4px;
    }

    .thumbs-next {
        right: 4px;
    }
}

/* Reduzir movimentos */
@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }

    .ad-popup {
        transition: none !important;
    }
}