        /* Estilos personalizados para a aplicação */
        body {
            font-family: 'Inter', sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            min-width: 1024px;
            color: #fff;
            overflow-x: auto;
            overflow-y: hidden;
        }

        #animated-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -2; /* Abaixo de tudo */
            background-color: #0c0a1a;
        }
        
        #app-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(12, 10, 26, 0.7); /* Overlay para legibilidade */
            z-index: -1;
        }

        .custom-scrollbar::-webkit-scrollbar {
            width: 8px;
        }
        .custom-scrollbar::-webkit-scrollbar-track {
            background: rgba(31, 41, 55, 0.7);
            border-radius: 10px;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: rgba(75, 85, 99, 0.7);
            border-radius: 10px;
        }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: rgba(107, 114, 128, 0.7);
        }
        
        @keyframes bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1.0); }
        }
        .animate-bounce-dot {
            animation: bounce 1.4s infinite ease-in-out both;
        }
        @keyframes bounce-subtle {
            0%, 100% { transform: translate(-50%, 0); }
            50% { transform: translate(-50%, -5px); }
        }
        .animate-bounce-subtle {
            animation: bounce-subtle 2s infinite ease-in-out;
        }

        .hidden {
            display: none;
        }
        
        /* Estilos para o Ebook e PDF */
        .ebook-page {
            /* As variáveis de design são aplicadas dinamicamente via :root */
            background: var(--background-style, white);
            color: var(--body-text-color, #4a5568);
            font-family: var(--body-font, serif);
            width: 210mm; /* A4 width */
            height: 297mm; /* FIXO: A4 height */
            padding: 20mm !important;
            margin: 1rem auto;
            box-sizing: border-box;
            page-break-after: always;
            position: relative;
            overflow: hidden; /* Garante que nada estique a página */
            transition: margin 0.2s;
        }
        
        /* Counter reset para gamma-step removido para evitar conflitos com numeração via JS */
        
        #add-blank-page-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #add-blank-page-btn.hidden {
            display: none !important;
            visibility: hidden !important;
        }
        
        /* Modo de Exportação PDF: Blindagem contra distorção */
        body.exporting-pdf .ebook-page {
            margin: 0 !important;
            box-shadow: none !important;
            padding: 20mm !important;
            border: none !important;
            width: 210mm !important; /* Largura A4 fixa padrão */
            height: 297mm !important; /* Altura A4 fixa padrão */
            min-width: 210mm !important;
            min-height: 297mm !important;
            max-width: 210mm !important;
            max-height: 297mm !important;
            position: relative !important;
            overflow: hidden !important;
            display: block !important;
        }

        /* Ajuste de Blindagem para modo Paisagem */
        body.exporting-pdf .ebook-page.landscape {
            width: 297mm !important;
            height: 210mm !important;
            min-width: 297mm !important;
            min-height: 210mm !important;
            max-width: 297mm !important;
            max-height: 210mm !important;
        }
        
        body.exporting-pdf .ebook-content-area {
            padding: 0 !important;
            margin: 0 !important;
            width: 170mm !important; /* Área útil padrão */
            height: 257mm !important; /* Área útil padrão */
            display: flex !important;
            flex-direction: column !important;
        }

        body.exporting-pdf .ebook-page.landscape .ebook-content-area {
            width: 267mm !important; /* Área útil paisagem (297-30) */
            height: 180mm !important; /* Área útil paisagem (210-30) */
        }

        /* Trava os containers de imagem no PDF para evitar que se expandam ou encolham */
        body.exporting-pdf .gamma-split-image {
            width: 300px !important;
            height: auto !important;
            max-height: 400px !important;
            min-width: 300px !important;
            overflow: hidden !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            background: rgba(255, 255, 255, 0.03) !important;
            border-radius: 1rem !important;
        }

        body.exporting-pdf .gamma-split-view {
            width: 100% !important;
            display: flex !important;
            flex-direction: row !important;
            gap: 20px !important;
            align-items: center !important;
        }
        
        /* Garante que imagens e blocos não quebrem no meio */
        .ebook-block, .editable-image, .gamma-card, .gamma-quote, .gamma-split-view {
            break-inside: avoid;
            page-break-inside: avoid;
        }

        .ebook-content-area {
            width: 100%;
            height: 100%;
            display: block; /* block em vez de flex: permite detecção confiável de overflow via scrollHeight */
            position: relative;
        }

        /* NOVO: Estilos para formato Paisagem */
        .ebook-page.landscape {
            width: 297mm; /* Landscape width */
            height: 210mm; /* Landscape height */
            padding: 15mm;
        }

        #ebook-cover {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            background-size: cover;
            background-position: center;
            color: white;
            position: relative;
        }
        #ebook-cover .ebook-content-area {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        #ebook-cover::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: var(--cover-overlay, rgba(0,0,0,0.6));
            z-index: 1; /* Ensure overlay is above background image but below content */
        }
        #ebook-cover.no-overlay::before {
            background-color: transparent;
        }
        #ebook-cover > * {
            position: relative;
            z-index: 2;
        }
        #ebook-cover h1 {
            font-family: 'Times New Roman', Times, serif;
            font-size: 2.8rem;
            font-weight: bold;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
        }
        #ebook-cover h2 {
            font-family: 'Times New Roman', Times, serif;
            font-size: 1.3rem;
            font-style: italic;
            margin-top: 1rem;
            font-weight: normal;
            text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
        }

        .blank-cover-page {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            color: white;
            position: relative;
            cursor: pointer;
        }

        .blank-cover-page.editable-image-cover {
            outline: 2px dashed #3b82f6;
            transition: filter 0.2s;
        }

        .blank-cover-page.editable-image-cover:hover {
            filter: brightness(1.1) contrast(1.1);
        }

        #ebook-toc, #ebook-toc-2 {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        #ebook-toc .ebook-content-area, #ebook-toc-2 .ebook-content-area {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        #ebook-toc h1, #ebook-toc-2 h1 {
            font-family: var(--heading-font);
            font-size: 2.5rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 2.5rem;
            color: var(--primary-color);
        }
        #ebook-toc ul, #ebook-toc-2 ul {
            list-style-type: none;
            padding-left: 0;
            column-count: 2;
            column-gap: 2rem;
            width: 100%;
            max-width: 90%;
            margin: 0 auto;
        }
        #ebook-toc li, #ebook-toc-2 li {
            font-family: var(--body-font);
            font-size: 1.1rem;
            margin-bottom: 1rem;
            border-left: 3px solid var(--secondary-color);
            padding-left: 1rem;
            page-break-inside: avoid;
            color: var(--body-text-color);
        }

        .ebook-content h1 {
            font-family: var(--heading-font);
            color: var(--primary-color);
            font-size: 2.5rem; /* Large heading for content */
            font-weight: bold;
            text-align: center;
            margin-top: 3rem;
            margin-bottom: 1.5rem;
        }
        .ebook-content h2 {
            font-family: var(--heading-font);
            color: var(--primary-color);
            font-size: 1.8rem;
            font-weight: bold;
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            border-bottom: 2px solid;
            border-image: linear-gradient(to right, var(--secondary-color), transparent) 1;
            padding-bottom: 0.5rem;
        }
        .ebook-content p, .ebook-content li {
            font-family: var(--body-font);
            font-size: 1rem;
            line-height: 1.6;
            text-align: justify; /* Default paragraph alignment */
            margin-bottom: 0.5rem;
            page-break-inside: avoid;
        }
        .ebook-page img, 
        .ebook-content img,
        .editable-image {
            max-width: 100%;
            height: auto !important;
            object-fit: contain; /* Para imagens soltas, manter a integridade é melhor que cortar */
            border-radius: 1rem;
            margin: 2rem auto;
            display: block;
            border: 1px solid rgba(255,255,255,0.1);
            transition: transform 0.3s ease;
            transform: translateZ(0);
        }

        .ebook-page img:hover,
        .editable-image:hover {
            transform: translateY(-2px);
        }

        /* GAMMA STYLE BLOCKS */
        .gamma-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 0.75rem;
            margin: 0.25rem 0;
        }
        .gamma-card {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 1.5rem;
            border-radius: 1rem;
            transition: all 0.3s ease;
        }
        .gamma-card h3 {
            font-family: var(--heading-font);
            color: var(--primary-color);
            font-size: 1.25rem;
            font-weight: bold;
            margin-bottom: 0.75rem;
        }
        .gamma-card p {
            font-size: 0.95rem;
            margin-bottom: 0;
        }
        
        .gamma-quote {
            border-left: 4px solid var(--secondary-color);
            padding: 1.5rem 2rem;
            margin: 2rem 0;
            background: rgba(var(--secondary-color-rgb), 0.05);
            border-radius: 0 1rem 1rem 0;
            font-style: italic;
            font-size: 1.2rem;
            color: var(--primary-color);
        }

        .gamma-split-view {
            display: flex;
            gap: 2rem;
            align-items: center;
            margin: 2.5rem 0;
        }
        .gamma-split-view.reverse { flex-direction: row-reverse; }
        .gamma-split-content { flex: 1; }
        .gamma-split-image { 
            flex: 1; 
            border-radius: 1rem; 
            overflow: hidden; 
            padding: 0; 
            display: flex;
            justify-content: center;
            align-items: center;
            background: rgba(255, 255, 255, 0.05); /* Fundo sutil para manter a estrutura */
            min-height: 250px;
        }
        .gamma-split-image img {
            width: 100%;
            height: auto !important;
            max-height: 450px;
            object-fit: contain !important;
            border-radius: 1rem;
            transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .gamma-split-image img:hover {
            transform: scale(1.02);
        }

        .gamma-step-item {
            display: flex;
            gap: 1rem;
            margin-bottom: 0.5rem;
            align-items: flex-start;
            position: relative;
        }
        .gamma-step-number {
            background: var(--primary-color);
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            flex-shrink: 0;
            position: relative; /* Adicionado para suporte ao badge de remover */
        }
        /* Garantir que nada seja injetado via CSS que gere números duplicados */
        .gamma-step-number::before, 
        .gamma-step-number::after { 
            content: none !important; 
            display: none !important; 
        }
        
        .gamma-callout {
            background: var(--primary-color);
            color: white;
            padding: 2rem;
            border-radius: 1.5rem;
            text-align: center;
            margin: 0.25rem 0;
        }
        .gamma-callout h3 { color: white; margin-bottom: 1rem; font-size: 1.5rem; }
        .gamma-callout p { color: rgba(255,255,255,0.9); }

        .gamma-hero {
            padding: 4rem 2rem;
            background: var(--primary-color);
            color: white;
            border-radius: 1.5rem;
            margin: 2rem 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        .gamma-hero * { color: inherit; }
        .gamma-hero h2,
        .gamma-hero p {
            color: white;
        }

        .gamma-checklist {
            background: rgba(var(--secondary-color-rgb), 0.05);
            padding: 1.5rem;
            border-radius: 1rem;
            margin: 0.25rem 0;
        }
        .gamma-check-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }
        .gamma-check-icon {
            color: #10b981;
            font-size: 1.25rem;
            margin-top: 0.25rem;
        }

        .gamma-comparison {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.75rem;
            margin: 0.25rem 0;
        }
        .gamma-comp-box {
            padding: 1.5rem;
            border-radius: 1rem;
            border: 2px solid transparent;
        }
        .gamma-comp-box.left { border-color: #ef4444; background: rgba(239, 68, 68, 0.05); }
        .gamma-comp-box.right { border-color: #10b981; background: rgba(16, 185, 129, 0.05); }
        .gamma-comp-title { font-weight: bold; font-size: 1.1rem; margin-bottom: 0.5rem; display: block; text-align: center; }

        .gamma-timeline {
            position: relative;
            padding-left: 2rem;
            border-left: 2px dashed var(--secondary-color);
            margin: 0.25rem 0 0.25rem 1rem;
        }
        .gamma-time-item {
            position: relative;
            margin-bottom: 0.5rem;
        }
        .gamma-time-item::before {
            content: '';
            position: absolute;
            left: -2.45rem;
            top: 0.25rem;
            width: 12px;
            height: 12px;
            background: var(--primary-color);
            border-radius: 50%;
        }

        .gamma-spotlight {
            display: flex;
            gap: 2rem;
            margin: 2.5rem 0;
            background: rgba(var(--secondary-color-rgb), 0.03);
            border-radius: 1rem;
            padding: 1.5rem;
            align-items: center;
        }
        .gamma-spotlight-main { flex: 2; }
        .gamma-spotlight-side { 
            flex: 1; 
            background: var(--primary-color); 
            color: white; 
            padding: 1.5rem; 
            border-radius: 0.75rem;
            font-size: 0.9rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .gamma-spotlight-side h4 { color: white !important; margin-bottom: 0.5rem; font-weight: bold; font-family: var(--heading-font); }
        .gamma-spotlight-side p { color: rgba(255,255,255,0.9) !important; margin: 0; }

        .gamma-qa {
            margin: 0.25rem 0;
            background: rgba(var(--secondary-color-rgb), 0.02);
            padding: 1rem;
            border-radius: 1rem;
        }
        .gamma-qa-item {
            margin-bottom: 0.5rem;
            padding: 1.25rem;
            border-left: 3px solid var(--primary-color);
            background: white;
            border-radius: 0 0.75rem 0.75rem 0;
        }
        .gamma-qa-question {
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 0.75rem;
            display: flex;
            gap: 0.5rem;
            font-family: var(--heading-font);
            font-size: 1.1rem;
        }
        .gamma-qa-answer {
            color: var(--body-text-color);
            opacity: 0.9;
            line-height: 1.6;
            margin: 0;
        }

        @media (max-width: 768px) {
            .gamma-split-view { flex-direction: column; }
            .gamma-split-view.reverse { flex-direction: column; }
        }
        
        .two-column-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            align-items: start;
        }
        .two-column-layout .column h3 {
            font-family: var(--heading-font);
            font-size: 1.4rem;
            font-weight: bold;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
         .two-column-layout ul {
            list-style-position: inside;
            padding-left: 0.5rem;
        }

        /* Responsive adjustments for two-column-layout */
        @media (max-width: 768px) {
            .two-column-layout {
                grid-template-columns: 1fr; /* Single column on tablets and smaller */
            }
        }

        .ebook-block-wrapper {
            position: relative;
        }

        .ebook-block-wrapper [contenteditable="true"] {
            outline: 2px dashed #3B82F6; /* blue-500 */
            background-color: #EFF6FF; /* blue-50 */
            cursor: text;
        }

        .ebook-block-wrapper:hover {
            background-color: #EFF6FF; /* blue-50 */
        }
        
        .ebook-block-wrapper h1[contenteditable="true"], 
        .ebook-block-wrapper h2[contenteditable="true"], 
        .ebook-block-wrapper h3[contenteditable="true"] {
             background-color: #EFF6FF; /* blue-50 */
        }

        .remove-block-btn {
            position: absolute;
            top: 2px; 
            right: 2px; 
            background-color: #dc2626; /* red-600 */
            color: white;
            font-weight: bold;
            padding: 2px 6px;
            border-radius: 50%;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s ease-in-out;
            z-index: 1001; /* FIX: Acima da toolbar de edição (z-index 1000) */
            line-height: 1; /* ensure 'X' is centered */
            font-size: 0.8rem;
        }

        .ebook-block-wrapper:hover .remove-block-btn,
        .gamma-step-number:hover .remove-block-btn, /* Mostrar botão ao pairar na bolinha */
        .remove-block-btn:hover {
            opacity: 1;
        }

        /* Estilo específico para o badge de remoção da bolinha */
        .remove-block-btn.step-remove-badge {
            top: -5px;
            right: -5px;
            width: 18px;
            height: 18px;
            font-size: 0.65rem;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .remove-page-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: #dc2626;
            color: white;
            font-weight: bold;
            padding: 4px 8px;
            border-radius: 50%;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s ease-in-out;
            z-index: 100;
            line-height: 1;
            font-size: 0.9rem;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ebook-page:hover .remove-page-btn {
            opacity: 1;
        }

        .edit-cover-btn {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #3b82f6;
            color: white;
            font-weight: bold;
            padding: 12px 24px;
            border-radius: 0.5rem;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
            z-index: 100;
            font-size: 1rem;
            white-space: nowrap;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        }

        #ebook-cover:hover .edit-cover-btn {
            opacity: 1;
            visibility: visible;
        }

        .edit-cover-btn.visible {
            opacity: 1;
            visibility: visible;
        }

        #ebook-cover.editable-image-cover {
            cursor: pointer;
            outline: 2px dashed #3b82f6; /* blue-500 */
            transition: filter 0.2s;
        }
        #ebook-cover.editable-image-cover:hover {
            filter: brightness(1.1) contrast(1.1);
        }

        .ebook-content img.editable-image {
            cursor: pointer;
            outline: 2px dashed #3b82f6;
            transition: filter 0.2s;
        }
        .ebook-content img.editable-image:hover {
            filter: brightness(1.1) contrast(1.1);
        }

        .ebook-product-wrapper {
            position: relative;
            flex-shrink: 0;
            page-break-inside: avoid;
            break-inside: avoid;
        }
        .ebook-product-single {
            display: flex;
            flex-direction: column;
            max-width: 100%;
            gap: 1rem;
        }
        .ebook-product-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0;
            padding: 1rem;
            background: #ffffff;
            page-break-inside: avoid;
            break-inside: avoid;
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            position: relative;
        }
        .ebook-product-card img {
            width: 100%;
            max-width: 100%;
            min-height: 180px;
            height: auto;
            object-fit: cover;
            border-radius: 10px;
            display: block !important;
            margin-bottom: 1rem;
            visibility: visible !important;
        }
        .ebook-product-card h3 {
            margin: 0 0 0.5rem 0;
            width: 100%;
            text-align: center;
            font-size: 1.1rem;
            font-weight: 600;
            color: #000000;
            display: block !important;
        }
        .ebook-product-card .ebook-cta-button {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            margin-top: 0;
            padding: 0.65rem 1.5rem;
            background: #22c55e;
            color: white;
            font-weight: bold;
            border-radius: 9999px;
            text-align: center;
            text-decoration: none;
            max-width: 200px;
            margin-left: auto;
            margin-right: auto;
            visibility: visible !important;
        }
        .ebook-product-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }
        @media (max-width: 480px) {
            .ebook-product-grid { grid-template-columns: 1fr; }
        }

        #block-toolbox {
            min-width: 150px;
            max-width: 150px;
            padding: 1rem;
            pointer-events: all;
            left: 1rem;
            top: 100px;
        }

        .draggable-block-item {
            cursor: grab;
            user-select: none;
            background-color: #1F2937;
            color: #D1D5DB;
        }

        .draggable-block-item svg {
            width: 1.5rem;
            height: 1.5rem;
            margin-bottom: 0.25rem;
        }

        .draggable-block-item span {
            font-size: 0.75rem;
            text-align: center;
        }

        .draggable-block-item:active {
            cursor: grabbing;
        }

        .drag-over-top, .drag-over-bottom {
            position: relative;
        }
        .drag-over-top::before, .drag-over-bottom::before {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            height: 6px;
            background-color: #3b82f6;
            z-index: 100;
            box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
            border-radius: 3px;
        }
        .drag-over-top::before {
            top: -2px;
        }
        .drag-over-bottom::before {
            bottom: -2px;
        }

        .dragging {
            opacity: 0.5;
            outline: 2px dashed #3b82f6;
        }

        .cta-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto;
            min-height: 48px;
            max-width: 300px;
            padding: 12px 24px;
            margin: 15px auto;
            background-color: var(--secondary-color);
            color: white;
            text-align: center;
            text-decoration: none;
            border-radius: 8px;
            font-weight: bold;
            font-size: 1.1em;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.3s ease;
            page-break-inside: avoid;
            white-space: normal;
            word-break: break-word;
            line-height: 1.3;
        }

        .cta-button:hover {
            background-color: var(--primary-color);
            transform: translateY(-2px);
        }

        .ebook-block-wrapper .cta-button[contenteditable="true"] {
            outline: 2px dashed #3b82f6;
            background-color: #eff6ff;
            color: #000;
        }

        .ebook-content img.main-chapter-img {
            width: 100%;
            max-height: 320px;
            object-fit: contain;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .gamma-steps {
            margin: 2rem 0;
        }
        
        .gamma-step-item, .gamma-check-item, .gamma-card, .gamma-time-item, .gamma-qa-item {
            position: relative;
        }

        .gamma-step-item:hover .remove-block-btn,
        .gamma-check-item:hover .remove-block-btn,
        .gamma-card:hover .remove-block-btn,
        .gamma-time-item:hover .remove-block-btn,
        .gamma-qa-item:hover .remove-block-btn {
            opacity: 1;
        }

        .gamma-step-text p {
            margin-bottom: 0;
            text-align: left;
        }

        .gamma-quote {
            background: rgba(0, 0, 0, 0.03);
        }

        .ebook-cta-button {
            display: block;
            padding: 1rem 2rem;
            background-color: var(--primary-color);
            color: white;
            text-decoration: none;
            border-radius: 0.75rem;
            font-weight: bold;
            text-align: center;
            margin: 1.5rem auto;
            transition: transform 0.2s ease, opacity 0.2s ease;
            cursor: pointer;
            border: none;
            width: fit-content;
        }
        .ebook-cta-button:hover {
            transform: scale(1.05);
            opacity: 0.9;
        }
        .ebook-button-wrapper {
            text-align: center;
            width: 100%;
        }

        .text-edit-toolbar {
            transition: transform 0.1s ease-out, opacity 0.1s ease-out;
            opacity: 0;
            pointer-events: none;
            transform: translateY(-10px);
            position: absolute;
            z-index: 1000;
            background-color: #1f2937;
            border: 1px solid #4b5563;
            border-radius: 0.5rem;
            padding: 0.5rem;
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            min-width: 250px;
        }
        .text-edit-toolbar.active {
            opacity: 1;
            pointer-events: all;
            transform: translateY(0);
        }

        #ebook-text-edit-toolbar {
            position: relative !important;
            transform: none !important;
            opacity: 1 !important;
            pointer-events: all !important;
            width: 100% !important;
            margin-bottom: 1rem !important;
            display: none;
            justify-content: center !important;
            box-shadow: none !important;
            border-color: #374151 !important;
            background-color: #1f2937 !important;
            z-index: 10;
        }

        #ebook-text-edit-toolbar:not(.hidden) {
            display: flex !important;
        }

        .text-edit-toolbar .toolbar-btn {
            background-color: #374151;
            color: #d1d5db;
            padding: 0.4rem 0.6rem;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            font-weight: 600;
            transition: background-color 0.2s ease;
        }
        .text-edit-toolbar .toolbar-btn:hover {
            background-color: #3b82f6;
        }
        .text-edit-toolbar .toolbar-btn.active {
            background-color: #3b82f6;
            color: white;
        }
        .text-edit-toolbar .color-picker {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            width: 2rem;
            height: 2rem;
            border: none;
            background: none;
            cursor: pointer;
            border-radius: 0.375rem;
            overflow: hidden;
            flex-shrink: 0;
        }
        .text-edit-toolbar .color-picker::-webkit-color-swatch-wrapper {
            padding: 0;
        }
        .text-edit-toolbar .color-picker::-webkit-color-swatch {
            border: 1px solid #4b5563;
            border-radius: 0.375rem;
        }
        .text-edit-toolbar .color-picker::-moz-color-swatch {
            border: 1px solid #4b5563;
            border-radius: 0.375rem;
        }

        /* Spinner/stepper maior e mais visível para controle de tamanho da fonte */
        .font-size-input::-webkit-inner-spin-button,
        .font-size-input::-webkit-outer-spin-button {
            opacity: 1;
            height: 28px;
            width: 18px;
        }
        .font-size-input::-webkit-outer-spin-button {
            margin-right: 2px;
        }

        /* MODIFICADO: Permite que botões de edição (com data-edit-button) e de bypass funcionem mesmo sem créditos */
        .credits-depleted [data-action-button="true"]:not([data-edit-button="true"]):not([data-bypass-credits="true"]),
        .credits-depleted #prompt-input:not([data-bypass-credits="true"]) {
            opacity: 0.6;
            cursor: not-allowed;
            pointer-events: none;
        }
        .credits-depleted #prompt-input::placeholder {
            color: #9ca3af;
        }

        #preview-container {
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }
        #preview-iframe {
            transition: max-width 0.4s ease-in-out;
            border-radius: 0.5rem;
            background-color: #1f2937;
            height: 100%;
        }
        .device-preview-button:hover {
            background-color: #4b5563;
        }
        .device-preview-button.active {
            background-color: #3b82f6;
            color: white;
        }

        .ai-message-content {
            position: relative;
        }
        .ai-message-content p, .ai-message-content pre {
            word-break: break-word;
        }
        .copy-chat-button {
            position: absolute;
            top: 8px;
            right: 8px;
            background-color: rgba(0,0,0,0.3);
            color: #d1d5db; /* gray-300 */
            border: none;
            border-radius: 5px;
            padding: 6px 10px;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.2s ease-in-out;
        }
        .copy-chat-button:hover {
            background-color: rgba(0,0,0,0.6);
            transform: scale(1.1);
        }
        @keyframes check-pop {
            0% { transform: scale(0.8); opacity: 0; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }
        .copy-chat-button .fa-check {
            display: none;
            color: #3b82f6; /* blue-500 */
        }
        .copy-chat-button.clicked .fa-copy {
            display: none;
        }
        .copy-chat-button.clicked .fa-check {
            display: inline-block;
            animation: check-pop 0.3s ease-out;
        }

        /* Animação da borda do cabeçalho */
        .header-animated-border {
            position: relative;
            overflow: hidden;
        }
        .header-animated::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(to right, #facc15, #8b5cf6, #c084fc, #facc15); /* Dourado -> Roxo -> Roxo Claro -> Dourado */
            background-size: 200% auto;
            animation: gradient-animation 4s linear infinite;
        }

        @keyframes gradient-animation {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* Animação de Carregamento do Site */
        .loader-container {
            position: relative;
            width: 150px;
            height: 150px;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .loader-ring {
            position: absolute;
            border-radius: 50%;
            border: 4px solid transparent;
            animation: spin 2s linear infinite;
        }
        .loader-ring:nth-child(1) {
            width: 150px;
            height: 150px;
            border-top-color: #facc15; /* gold */
            animation-delay: -0.45s;
        }
        .loader-ring:nth-child(2) {
            width: 130px;
            height: 130px;
            border-right-color: #8b5cf6; /* purple */
            animation-delay: -0.3s;
        }
        .loader-ring:nth-child(3) {
            width: 110px;
            height: 110px;
            border-bottom-color: #3b82f6; /* blue */
            animation-delay: -0.15s;
        }
        .loader-icon {
            font-size: 4rem; /* 64px */
            color: #c084fc; /* light purple */
            animation: cog-spin 5s linear infinite reverse; /* reverse direction for contrast */
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        @keyframes cog-spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Novo estilo para o menu responsivo */
        #mobile-menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 40;
            display: none; /* Controlado via JS */
        }

        #mobile-nav-menu {
            position: fixed;
            top: 0;
            right: -300px; /* Escondido por padrão */
            width: 280px;
            height: 100%;
            background-color: #1f2937;
            z-index: 50;
            padding: 1.5rem;
            transition: right 0.3s ease-in-out;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        #mobile-nav-menu.open {
            right: 0;
        }
        
        #mobile-nav-menu button, #mobile-nav-menu a {
            width: 100%;
            padding: 0.75rem;
            text-align: left;
            border-radius: 0.5rem;
            transition: background-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }
        #mobile-nav-menu button.active, #mobile-nav-menu a.active {
            background-color: #3b82f6;
            color: white;
        }
        #mobile-nav-menu button:hover, #mobile-nav-menu a:hover {
            background-color: #4b5563;
        }
        
        @media (min-width: 768px) { /* md breakpoint */
            #mobile-menu-button,
            #mobile-menu-overlay,
            #mobile-nav-menu {
                display: none !important; /* Esconde o menu mobile em telas maiores */
            }
        }

        /* Ajustes para o prompt input no mobile */
        @media (max-height: 700px) and (max-width: 767px) { /* Pequenas telas de celular */
            footer {
                padding-bottom: 2rem; /* Aumenta o padding inferior */
            }
            #prompt-input {
                min-height: 3rem; /* Garante altura mínima */
            }
        }

        /* Estilos para o microfone e indicador de áudio */
        .mic-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #3B82F6; /* blue-500 */
            animation: pulse-mic 1.2s infinite ease-in-out;
            transform-origin: center;
        }

        @keyframes pulse-mic {
            0% { transform: scale(0.6); opacity: 0.6; }
            50% { transform: scale(1); opacity: 1; }
            100% { transform: scale(0.6); opacity: 0.6; }
        }

        #microphone-button.microphone-active {
            background-color: #dc2626; /* red-600 */
            color: #fff;
            animation: none; /* Disable hover animation for active state */
        }
        #microphone-button.microphone-active:hover {
            background-color: #dc2626;
        }

        /* Adjustments for footer layout to accommodate new button */
        footer .flex {
            align-items: center; /* Align items vertically in the center */
        }

        /* Estilos para Tendências Virais */
        .viral-product-card {
            background-color: #1f2937; /* gray-800 */
            border-radius: 0.75rem; /* rounded-lg */
            padding: 1rem; /* p-4 - Ajustado para ser menor */
            margin-bottom: 1rem; /* mb-4 - Ajustado para ser menor */
            border: 1px solid #2d3748; /* Mais escuro */
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .viral-product-card h3 {
            font-size: 1.25rem; /* text-xl - Ajustado para ser menor */
            font-weight: 700; /* font-bold */
            color: #3b82f6; /* text-blue-500 - Cor ajustada para azul */
            margin-bottom: 0;
            line-height: 1.3;
        }
        .viral-product-card p {
            font-size: 0.8rem; /* text-sm - Ajustado para ser menor */
            color: #a0aec0; /* text-gray-400 */
            margin-bottom: 0;
            line-height: 1.4;
        }
        .viral-product-card img {
            max-width: 100%;
            height: auto; 
            min-height: 100px;
            max-height: 200px;
            object-fit: contain;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 0.375rem; /* rounded-md */
            margin-top: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .viral-product-card .chart-container {
            position: relative;
            height: 80px; /* Altura fixa para o gráfico ajustada */
            width: 100%;
            margin-top: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .viral-product-card .level-bar {
            height: 6px; /* Altura da barra de qualificação ajustada */
            background-color: #4a5568; /* gray-700 */
            border-radius: 3px;
            overflow: hidden;
            margin-top: 0.5rem;
        }
        .viral-product-card .level-fill {
            height: 100%;
            background-color: #facc15; /* yellow-400 */
            border-radius: 3px;
            transition: width 0.5s ease-out;
        }
        .viral-product-card .text-right {
            font-size: 0.75rem; /* text-xs */
            color: #facc15; /* yellow-400 */
            margin-top: 0.25rem;
        }

        /* Grid responsivo para viral-products-results */
        #viral-products-results {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Ajusta a largura mínima dos cards */
            gap: 1.5rem; /* Espaçamento entre os cards */
        }
        @media (min-width: 768px) { /* md breakpoint */
            #viral-products-results {
                grid-template-columns: repeat(2, 1fr); /* 2 colunas em telas médias */
            }
        }
        @media (min-width: 1024px) { /* lg breakpoint */
            #viral-products-results {
                grid-template-columns: repeat(3, 1fr); /* 3 colunas em telas grandes */
            }
        }
        /* Style for the Zayron Academy iframe */
        .zayron-iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        .ebook-page.landscape {
            width: 297mm;
            height: 210mm;
            padding: 15mm !important;
        }

        /* Novo estilo futurista para itens de menu ativos */
        .menu-item-active-futuristic {
            background-color: #1A365D; /* Darker blue for active state */
            color: #fff;
            position: relative;
            transform: scale(1.01); /* Subtle zoom effect */
            transition: all 0.2s ease-in-out; /* Smooth transition for scale and shadow */
            overflow: hidden; /* Ensure pseudo-element doesn't overflow rounded corners */
        }
        .menu-item-active-futuristic::after {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 4px; /* Thin yellow line on the right */
            background-color: #facc15; /* Tailwind yellow-400 */
            border-radius: 0 0.5rem 0.5rem 0; /* Rounded right edge */
        }
        /* Efeito de cursor piscando para o Typewriter */
        .typing-cursor::after {
            content: '|';
            animation: typewriter-blink 1s infinite;
            margin-left: 2px;
            color: var(--primary-color);
            font-weight: bold;
        }
        @keyframes typewriter-blink { 
            0%, 100% { opacity: 1; } 
            50% { opacity: 0; } 
        }
        #skip-typewriter {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 10000;
            padding: 12px 24px;
            background: #3b82f6;
            color: white;
            border-radius: 50px;
            font-weight: bold;
            cursor: pointer;
            border: none;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
            font-family: sans-serif;
        }
        #skip-typewriter:hover {
            background: #2563eb;
            transform: translateY(-2px);
        }
        #skip-typewriter:active {
            transform: translateY(0);
        }
