/* ============================================
   COMPRESS PAGE LAYOUT
   ============================================ */
.compress-page {
    min-height: calc(100vh - 73px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 2rem 0;
    overflow: visible;
}

/* Banner de Anúncios Laterais - POSIÇÃO FIXA */
.compress-page .ad-banner {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    display: none;
}

.compress-page .ad-fixed {
    position: fixed;
}

.compress-page .ad-left {
    left: 10px;
}

.compress-page .ad-right {
    right: 10px;
}

.compress-page .ad-placeholder {
    width: 160px;
    height: 600px;
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}

.compress-page .ad-placeholder span {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* ============================================
   HORIZONTAL AD CONTAINERS
   ============================================ */
.horizontal-ad-container {
    width: 100%;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: none; /* Escondido por padrão */
}

.horizontal-ad-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
}

.ad-placeholder-horizontal {
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
    position: relative;
    
    /* Dimensões padrão para desktop */
    width: 728px;
    height: 90px;
    max-width: 728px;
    font-size: 0.875rem;
    padding: 0.5rem;
    box-sizing: border-box;
}

.ad-placeholder-horizontal span {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    display: block;
}

.ad-placeholder-horizontal p {
    margin: 0.15rem 0;
    line-height: 1.2;
}

/* ============================================
   CONTEÚDO INFORMATIVO - UPLOAD
   ============================================ */
.upload-content-section {
    margin: 3rem auto;
    max-width: 100%;
    width: 100%;
}

/* Guia Passo a Passo */
.tool-guide-section {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.tool-guide-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.guide-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.guide-step:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.3rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

.guide-tips {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--primary-color);
    margin-top: 1rem;
}

.guide-tips h3 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-tips ul {
    margin: 0;
    padding-left: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.guide-tips li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-primary);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    background-color: var(--bg-primary);
    transition: background-color var(--transition-fast);
}

.faq-question:hover {
    background-color: var(--bg-tertiary);
}

.faq-question i {
    color: var(--primary-color);
    font-size: 0.875rem;
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question i {
    transform: rotate(90deg);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-secondary);
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    border-top-color: var(--border-color);
}

.faq-answer p {
    padding: 1.25rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   UPLOAD AREA
   ============================================ */
.upload-area {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto;
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-dark);
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-area.highlight {
    border-color: var(--secondary-color);
    background-color: rgba(16, 185, 129, 0.05);
}

.upload-area.loading {
    opacity: 0.7;
    cursor: wait;
}

.upload-area.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    text-align: center;
}

.upload-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.upload-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
}

.upload-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-align: center;
}

.upload-or {
    color: var(--text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    text-align: center;
}

.browse-btn {
    min-width: 200px;
    font-size: 1.125rem;
    padding: 1rem 2rem;
    margin: 0 auto;
    display: block;
}

.upload-info {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.6;
    text-align: center;
    width: 100%;
}

/* ============================================
   EDIT AREA - FULLSCREEN MODE
   ============================================ */
.edit-area {
    display: none;
    position: fixed;
    top: 73px; /* Header height */
    left: 0;
    width: 100vw;
    height: calc(100vh - 73px); /* Full height minus header */
    background: var(--bg-primary);
    z-index: 100;
    animation: fadeIn 0.3s ease;
    flex-direction: column;
}

.edit-area.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Preview Container - Top Part */
.preview-container {
    flex: 1;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-height: 0; /* Important for flex child */
}

.preview-header {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: var(--bg-primary);
    min-height: 50px;
}

.image-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.image-info span:first-child {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
    text-align: right;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-info span:last-child {
    color: var(--text-secondary);
}

.image-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

/* Controls Container - Bottom Part */
.controls-container {
    flex: 0 0 auto;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    height: auto;
    max-height: 45vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.controls-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

/* Control Groups */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   SLIDER DE QUALIDADE
   ============================================ */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-height: 40px;
}

#qualitySlider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
    flex: 1;
    margin: 12px 0;
}

#qualitySlider:hover {
    opacity: 1;
}

#qualitySlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
}

#qualitySlider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
}

#qualitySlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

#qualitySlider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    position: relative;
}

#qualitySlider::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    position: relative;
}

#qualityValue {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: -0.5rem;
}

.format-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    text-align: left;
}

.format-info i {
    color: var(--primary-color);
}

.format-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#advancedCompression {
    margin-right: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 2rem;
}

.action-buttons .btn {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
    justify-content: center;
}

.compression-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ============================================
   MODAL DE RESULTADOS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.modal-content-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.25rem;
    transition: color var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.modal-ad-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.ad-placeholder-modal {
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    width: 100%;
    height: 90px;
    max-width: 728px;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.ad-placeholder-modal span {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    display: block;
}

.ad-placeholder-modal p {
    margin: 0.15rem 0;
    line-height: 1.2;
}

.compression-results h4 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 576px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}

.result-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition-fast);
    position: relative;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    background-color: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    position: relative;
    padding-right: 20px;
}

.result-content span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.result-content strong {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.change-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.change-indicator.positive {
    color: var(--success-color);
}

.change-indicator.negative {
    color: var(--error-color);
}

.change-indicator.neutral {
    color: var(--text-secondary);
}

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

.modal-buttons {
    display: flex;
    gap: 1rem;
}

.modal-buttons .btn {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
}

.modal-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-align: center;
}

.modal-message i {
    color: var(--info-color);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.modal-message p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    flex: 1;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

/* DESKTOP - TELAS MAIORES QUE 1200px */
@media (min-width: 1201px) {
    /* Banners laterais visíveis apenas na tela de upload - controlado por JS */
    .compress-page .ad-banner {
        display: none;
    }
    
    .compress-page .ad-banner.upload-visible {
        display: flex !important;
    }
    
    /* Esconder banners horizontais no desktop */
    .horizontal-ad-container {
        display: none !important;
    }
    
    /* Layout da tela de edição para desktop */
    .edit-area {
        flex-direction: row !important;
    }
    
    .preview-container {
        flex: 3;
        border-right: 1px solid var(--border-color);
    }
    
    .controls-container {
        flex: 1;
        max-width: 400px;
        min-width: 350px;
        border-top: none;
        border-left: 1px solid var(--border-color);
        max-height: 100vh;
    }
    
    .controls-content {
        padding: 2rem;
        gap: 2rem;
    }
    
    .ad-placeholder {
        max-height: 80vh;
        overflow: hidden;
    }
    
    /* CORREÇÃO: A largura interna permanece 900px, com padding para os banners */
    .compress-page .container {
        max-width: 900px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 180px;  /* Espaço para o banner esquerdo */
        padding-right: 180px; /* Espaço para o banner direito */
        box-sizing: content-box; /* Garante que padding não afete a largura */
    }
    
    /* Garantir que upload-area e conteúdo usem 100% do container */
    .upload-area,
    .upload-content-section {
        max-width: 100%;
        width: 100%;
    }
}

/* Para telas muito grandes, manter o mesmo comportamento */
@media (min-width: 1400px) {
    .compress-page .container {
        max-width: 900px;
        padding-left: 200px;
        padding-right: 200px;
    }
}

/* TABLET/LAPTOP - TELAS ATÉ 1200px */
@media (max-width: 1200px) {
    /* Esconder banners laterais */
    .compress-page .ad-banner {
        display: none !important;
    }
    
    /* Mostrar banners horizontais na tela de upload */
    .upload-top-ad,
    .upload-bottom-ad {
        display: block !important;
    }
    
    /* Mostrar banners horizontais na tela de edição */
    .edit-top-ad,
    .edit-bottom-ad {
        display: block !important;
    }
    
    .edit-area.active {
        flex-direction: column;
    }
    
    .preview-container {
        flex: 2;
    }
    
    .controls-container {
        flex: 1;
        max-height: 50vh;
    }
    
    .compress-page {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .action-buttons {
        margin-top: 2rem;
    }
    
    .ad-placeholder-horizontal {
        width: 468px;
        height: 60px;
        max-width: 468px;
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .ad-placeholder-horizontal span {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }
    
    .ad-placeholder-horizontal p {
        margin: 0.1rem 0;
    }
    
    .horizontal-ad-banner {
        padding: 1rem 0;
    }
    
    .ad-placeholder-modal {
        height: 60px;
        max-width: 468px;
        font-size: 0.8rem;
    }
    
    .modal-content-container {
        max-width: 500px;
    }
    
    .compress-page .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
    }
    
    .guide-tips ul {
        grid-template-columns: 1fr;
    }
}

/* TELAS ATÉ 992px */
@media (max-width: 992px) {
    .upload-area {
        padding: 3rem 1.5rem;
        max-width: 100%;
        margin: 1rem auto;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .upload-content h2 {
        font-size: 1.5rem;
    }
    
    .preview-header {
        padding: 0.75rem 1rem;
    }
    
    .image-info span:first-child {
        max-width: 200px;
    }
    
    .tool-guide-section,
    .faq-section {
        padding: 1.5rem;
    }
    
    .tool-guide-section h2,
    .faq-section h2 {
        font-size: 1.5rem;
    }
    
    .guide-step {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .step-content h3 {
        font-size: 1.2rem;
    }
}

/* TELAS ATÉ 768px */
@media (max-width: 768px) {
    .upload-area {
        padding: 2rem 1rem;
        margin: 0.75rem auto;
    }
    
    .image-preview {
        padding: 1rem;
    }
    
    .controls-content {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    #qualityValue {
        align-self: flex-end;
        min-width: 60px;
    }
    
    .ad-placeholder-horizontal {
        width: 320px;
        height: 50px;
        max-width: 320px;
        font-size: 0.75rem;
        padding: 0.3rem;
    }
    
    .ad-placeholder-horizontal span {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }
    
    .ad-placeholder-horizontal p {
        margin: 0.08rem 0;
        font-size: 0.7rem;
    }
    
    .horizontal-ad-banner {
        padding: 0.75rem 0;
    }
    
    .modal-content-container {
        margin: 0.5rem;
        max-width: 95%;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .ad-placeholder-modal {
        height: 50px;
        max-width: 320px;
        font-size: 0.75rem;
        padding: 0.3rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .tool-guide-section,
    .faq-section {
        padding: 1.25rem;
    }
    
    .tool-guide-section h2,
    .faq-section h2 {
        font-size: 1.3rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .guide-tips {
        padding: 1.25rem;
    }
}

/* TELAS ATÉ 576px */
@media (max-width: 576px) {
    .edit-area {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .preview-container {
        height: 50vh;
    }
    
    .controls-container {
        height: 50vh;
    }
    
    .upload-content {
        gap: 1rem;
    }
    
    .upload-icon {
        width: 50px;
        height: 50px;
        font-size: 1.75rem;
    }
    
    .upload-content h2 {
        font-size: 1.25rem;
    }
    
    .upload-description {
        font-size: 1rem;
    }
    
    .browse-btn {
        min-width: 160px;
        padding: 0.75rem 1.5rem;
    }
    
    .ad-placeholder-horizontal {
        width: 300px;
        height: 100px;
        max-width: 300px;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .ad-placeholder-horizontal span {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .ad-placeholder-horizontal p {
        margin: 0.15rem 0;
        font-size: 0.75rem;
    }
    
    .horizontal-ad-banner {
        padding: 0.5rem 0;
    }
    
    .ad-placeholder-modal {
        height: 100px;
        max-width: 300px;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        padding: 1rem;
    }
    
    .step-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .faq-answer p {
        font-size: 0.95rem;
    }
}

/* TELAS ATÉ 400px */
@media (max-width: 400px) {
    .ad-placeholder-horizontal {
        width: 280px;
        height: 100px;
        max-width: 280px;
        font-size: 0.75rem;
        padding: 0.4rem;
    }
    
    .ad-placeholder-horizontal span {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .ad-placeholder-horizontal p {
        font-size: 0.7rem;
    }
    
    .horizontal-ad-banner {
        padding: 0.5rem 0;
    }
    
    .ad-placeholder-modal {
        height: 100px;
        max-width: 280px;
        font-size: 0.75rem;
        padding: 0.4rem;
    }
    
    .modal-content-container {
        max-width: 100%;
        margin: 0.25rem;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-body {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .tool-guide-section,
    .faq-section {
        padding: 1rem;
    }
    
    .guide-step {
        padding: 1rem;
    }
}

/* ============================================
   ESTILOS ADICIONAIS
   ============================================ */

.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-secondary.loading::after {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--text-primary);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   PNG WARNING MODAL
   ============================================ */
#pngWarningModal .modal-body {
    gap: 1.5rem;
}

.warning-message {
    text-align: center;
    padding: 1rem 0;
}

.warning-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.warning-message h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.warning-message p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.warning-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.comparison-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    text-align: center;
}

.comparison-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.comparison-item strong {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.comparison-item small {
    font-size: 0.75rem;
    color: var(--text-light);
    background-color: var(--bg-tertiary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.comparison-item .text-warning {
    color: #f59e0b;
}

.comparison-item .text-success {
    color: var(--success-color);
}

.comparison-arrow {
    color: var(--text-light);
    font-size: 1.25rem;
}

.warning-options {
    text-align: center;
}

.warning-question {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.option-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
}

.option-buttons .btn i {
    font-size: 1.1rem;
}

.modal-reminder {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.modal-reminder i {
    color: var(--success-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.modal-reminder p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: left;
}

@media (max-width: 576px) {
    .warning-comparison {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
    
    .option-buttons .btn {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
}