:root {
    --primary-color: #a61c1c;
            --primary-dark: #801212;
            --bg-app: #f1f5f9;
            --panel-bg: rgba(255, 255, 255, 0.94);
            --border-color: #cbd5e1;
            --text-main: #1e293b;
            --text-muted: #475569;
            
            /* Font Size Controls variables updated by JS sliders */
            --title-size: 23px;
            --subtitle-size: 14px;
            --cta-size: 20px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Outfit', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
            padding: 30px;
            gap: 30px;
            color: var(--text-main);
        }

        /* PAINEL DE CONTROLE (Glassmorphism) */
        .control-panel {
            background: var(--panel-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            padding: 20px;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
            width: 400px;
            max-height: 95vh;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 15px;
            scrollbar-width: thin;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        }

        .control-panel::-webkit-scrollbar {
            width: 6px;
        }
        .control-panel::-webkit-scrollbar-thumb {
            background-color: #cbd5e1;
            border-radius: 3px;
        }

        .control-panel h2 {
            font-size: 18px;
            font-weight: 800;
            color: var(--primary-color);
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .section-title {
            font-size: 11px;
            font-weight: 800;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: 5px;
            background: #f1f5f9;
            padding: 6px 12px;
            border-radius: 6px;
        }

        .control-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .control-group label {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-main);
        }

        .control-group input[type="text"], 
        .control-group textarea {
            padding: 8px 10px;
            border: 1.5px solid var(--border-color);
            border-radius: 8px;
            font-size: 13px;
            outline: none;
            width: 100%;
            transition: all 0.2s ease;
            background: #ffffff;
        }

        .control-group input[type="text"]:focus, 
        .control-group textarea:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(166, 28, 28, 0.15);
        }

        /* Custom File Upload */
        .file-upload-wrapper {
            position: relative;
            width: 100%;
        }
        
        .file-upload-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px;
            background: #ffffff;
            border: 2px dashed #cbd5e1;
            border-radius: 8px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            transition: all 0.2s;
        }
        
        .file-upload-btn:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: rgba(166, 28, 28, 0.02);
        }

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

        /* Slider de Enquadramento */
        .slider-wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .slider-wrapper input[type="range"] {
            flex-grow: 1;
            accent-color: var(--primary-color);
            cursor: pointer;
        }

        .post-selector-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #f1f5f9;
            padding: 10px;
            border-radius: 12px;
            gap: 12px;
        }

        .btn-nav {
            background: #334155;
            color: white;
            border: none;
            padding: 8px 16px;
            font-size: 12px;
            font-weight: 700;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-nav:hover {
            background: #1e293b;
            transform: translateY(-1px);
        }
        #postIndexDisplay {
            font-size: 13px;
            font-weight: 800;
            color: var(--text-main);
        }

        /* SELEÇÃO DE LAYOUTS / FORMATOS */
        .design-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        .btn-design {
            background: #ffffff;
            border: 1.5px solid var(--border-color);
            padding: 8px 4px;
            font-size: 11px;
            font-weight: 700;
            border-radius: 8px;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s;
            color: var(--text-muted);
        }
        .btn-design:hover {
            border-color: #94a3b8;
            color: var(--text-main);
        }
        .btn-design.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-dark);
            box-shadow: 0 4px 10px rgba(166, 28, 28, 0.2);
        }

        .btn-download {
            background-color: #2563eb;
            color: white;
            padding: 12px;
            border: none;
            border-radius: 10px;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            transition: all 0.2s;
            margin-top: 10px;
            box-shadow: 0 8px 16px rgba(37, 99, 235, 0.15);
        }
        .btn-download:hover {
            background-color: #1d4ed8;
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
        }

        /* PREVIEW CANVAS CONTAINER (MOLDE FORMATO DINÂMICO 1:1, 4:5 OU 9:16) */
        .post-container {
            background: #ffffff;
            position: relative;
            overflow: hidden;
            box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            flex-shrink: 0;
            border-radius: 0px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Definição de Dimensões dos Formatos */
        .post-container.format-1-1 {
            width: 500px;
            height: 500px;
        }
        .post-container.format-4-5 {
            width: 500px;
            height: 625px;
        }
        .post-container.format-9-16 {
            width: 500px;
            height: 888px;
        }
        
        .content {
            position: relative;
            z-index: 10;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .header-logo-container {
            width: 100%;
            display: flex;
            justify-content: flex-start;
            margin-bottom: 12px;
            z-index: 12;
        }
        
        .header-logo-img {
            height: 48px;
            max-width: 85%;
            object-fit: contain;
        }
        
        .image-container {
            width: 100%;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 8px 20px rgba(0,0,0,0.06);
            margin-bottom: 12px;
            z-index: 11;
            transition: all 0.3s ease;
        }

        /* Ajustes Proporcionais de Imagem */
        .format-1-1 .image-container {
            height: 175px;
        }
        .format-4-5 .image-container {
            height: 240px;
        }
        .format-9-16 .image-container {
            height: 320px;
        }
        .format-9-16 .main-title {
            font-size: calc(var(--title-size) * 1.35) !important;
        }
        .format-9-16 .subtitle {
            font-size: calc(var(--subtitle-size) * 1.35) !important;
        }
        .format-9-16 .cta-text {
            font-size: calc(var(--cta-size) * 1.35) !important;
        }
        
        .image-container div {
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center 50%;
            background-repeat: no-repeat;
            transition: background-position 0.1s ease;
        }

        /* Elementos de Texto Dinâmicos */
        .main-title {
            font-size: var(--title-size);
            line-height: 1.2;
            transition: font-size 0.1s ease;
        }
        .subtitle {
            font-size: var(--subtitle-size);
            line-height: 1.3;
            transition: font-size 0.1s ease;
        }
        .cta-text {
            font-size: var(--cta-size);
            line-height: 1.3;
            transition: font-size 0.1s ease;
        }

        /* ==========================================================================
           VARIAÇÕES DE DESIGN (ESTILOS 1 A 7) - PALETA VERMELHO, VERMELHO ESCURO E CINZA
           ========================================================================== */
        
        /* ESTILO 1: Original Crimson & Sand */
        .post-container.style-1 {
            background: linear-gradient(180deg, #ffffff 0%, #ffffff 65%, #ebdcc9 100%);
            padding-right: 24px;
        }
        .post-container.style-1 .content {
            padding-right: 20px;
        }
        .post-container.style-1 .bg-decor-1 {
            position: absolute;
            top: 0;
            right: 0;
            width: 50px;
            height: 100%;
            background: var(--primary-color);
            border-bottom-left-radius: 40px;
            z-index: 1;
        }
        .post-container.style-1 .bg-decor-2 {
            position: absolute;
            top: 0;
            right: 0;
            width: 38px;
            height: 180px;
            background: var(--primary-dark);
            border-bottom-left-radius: 30px;
            z-index: 2;
        }
        .post-container.style-1 .decor-stethoscope {
            display: block;
            position: absolute;
            left: -10px;
            top: 90px;
            font-size: 35px;
            color: #e3d2bf;
            transform: rotate(-15deg);
            opacity: 0.6;
            z-index: 5;
        }
        .post-container.style-1 .decor-stethoscope-bottom {
            display: block;
            position: absolute;
            left: -5px;
            bottom: 95px;
            font-size: 40px;
            color: #d9c4ad;
            transform: rotate(15deg);
            opacity: 0.6;
            z-index: 5;
        }
        .post-container.style-1 .main-title {
            color: var(--primary-color);
            text-align: center;
            font-weight: 800;
            text-transform: uppercase;
            margin-bottom: 4px;
        }
        .post-container.style-1 .subtitle {
            color: #000000;
            text-align: center;
            font-weight: 700;
            margin-bottom: 8px;
        }
        .post-container.style-1 .cta-text {
            color: var(--primary-dark);
            font-weight: 800;
            text-align: center;
            margin-top: auto;
            margin-bottom: auto;
        }
        .post-container.style-1 .footer-contacts {
            width: 100%;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid rgba(128,12,12,0.1);
            padding-top: 10px;
            color: #000;
            font-size: 11px;
            font-weight: 700;
        }
        .post-container.style-1 .footer-contacts i {
            color: var(--primary-color);
            margin-right: 5px;
        }

        /* ESTILO 2: Nordic Clean & Grey */
        .post-container.style-2 {
            background: #ffffff;
            padding: 24px;
            border: 10px solid #f1f5f9;
        }
        .post-container.style-2 .image-container {
            border-radius: 0px;
            box-shadow: none;
            border: 1px solid #cbd5e1;
        }
        .post-container.style-2 .main-title {
            color: var(--text-main);
            font-weight: 800;
            text-transform: none;
            text-align: left;
            width: 100%;
            margin-top: 4px;
        }
        .post-container.style-2 .subtitle {
            color: var(--text-muted);
            font-weight: 400;
            text-align: left;
            width: 100%;
            margin-bottom: 10px;
        }
        .post-container.style-2 .cta-text {
            color: var(--primary-color);
            font-weight: 700;
            text-align: left;
            width: 100%;
            margin-top: auto;
            margin-bottom: auto;
        }
        .post-container.style-2 .footer-contacts {
            width: 100%;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #e2e8f0;
            padding-top: 10px;
            font-size: 11px;
            color: var(--text-muted);
        }
        .post-container.style-2 .footer-contacts i {
            color: var(--primary-color);
            margin-right: 4px;
        }

        /* ESTILO 3: Dark Med (Dark Grey & Red) */
        .post-container.style-3 {
            background: #1e293b;
            padding: 20px;
        }
        .post-container.style-3 .image-container {
            border-radius: 16px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
            border: 2px solid #334155;
        }
        .post-container.style-3 .main-title {
            color: #ffffff;
            font-weight: 800;
            text-transform: uppercase;
            text-align: center;
        }
        .post-container.style-3 .subtitle {
            color: #cbd5e1;
            font-weight: 500;
            text-align: center;
        }
        .post-container.style-3 .cta-text {
            color: #ff5757;
            font-weight: 700;
            text-align: center;
            margin-top: auto;
            margin-bottom: auto;
        }
        .post-container.style-3 .footer-contacts {
            width: 100%;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #334155;
            padding-top: 10px;
            font-size: 11px;
            color: #94a3b8;
        }
        .post-container.style-3 .footer-contacts i {
            color: var(--primary-color);
            margin-right: 5px;
        }

        /* ESTILO 4: Editorial Grey & Crimson */
        .post-container.style-4 {
            background: #f8fafc;
            padding: 24px;
            border-bottom: 8px solid var(--primary-color);
        }
        .post-container.style-4 .header-logo-container {
            justify-content: center;
            margin-bottom: 12px;
        }
        .post-container.style-4 .image-container {
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            border: 1px solid #cbd5e1;
        }
        .post-container.style-4 .main-title {
            font-family: 'Playfair Display', serif;
            color: var(--primary-dark);
            font-weight: 800;
            text-transform: none;
            text-align: center;
        }
        .post-container.style-4 .subtitle {
            font-family: 'Outfit', sans-serif;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 600;
            text-align: center;
        }
        .post-container.style-4 .cta-text {
            font-family: 'Playfair Display', serif;
            color: var(--primary-color);
            font-weight: 700;
            font-style: italic;
            text-align: center;
            margin-top: auto;
            margin-bottom: auto;
        }
        .post-container.style-4 .footer-contacts {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            border-top: 1.5px solid #cbd5e1;
            padding-top: 10px;
            font-size: 11px;
            color: var(--text-muted);
        }
        .post-container.style-4 .contact-column {
            flex-direction: row;
            gap: 20px;
            justify-content: center;
            max-width: 100%;
        }
        .post-container.style-4 .footer-contacts i {
            color: var(--primary-color);
            margin-right: 4px;
        }

        /* ESTILO 5: Glassmorphism Card (Predomínio Vermelho & Cinza) */
        .post-container.style-5 {
            background: #e2e8f0;
            padding: 0px;
            position: relative;
        }
        .post-container.style-5 .image-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 0;
            margin-bottom: 0;
            z-index: 1;
        }
        .post-container.style-5 .content {
            position: relative;
            z-index: 10;
        }
        .post-container.style-5 .image-container div {
            width: 100%;
            height: 100%;
        }
        .post-container.style-5 .glass-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.4);
            z-index: 2;
        }
        .post-container.style-5 .content {
            padding: 24px;
            z-index: 3;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
        }
        .post-container.style-5 .header-logo-container {
            justify-content: center;
            background: rgba(255, 255, 255, 0.95);
            padding: 8px 16px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }
        
        .post-container.style-5 .text-glass-card {
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 16px;
            width: 100%;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }
        .style-5.format-1-1 .text-glass-card {
            margin-bottom: 8px;
            padding: 12px;
        }
        .style-5.format-4-5 .text-glass-card {
            margin-bottom: 15px;
            padding: 16px;
        }
        .style-5.format-9-16 .text-glass-card {
            margin-bottom: 24px;
            padding: 20px;
        }

        .post-container.style-5 .header-logo-container,
        .post-container.style-5 #mainTextCard,
        .post-container.style-5 .cta-text,
        .post-container.style-5 .footer-contacts {
            position: relative;
            z-index: 10;
        }

        .post-container.style-5 .main-title {
            color: var(--primary-color);
            font-weight: 800;
        }
        .post-container.style-5 .subtitle {
            color: var(--text-muted);
            font-weight: 400;
        }
        .post-container.style-5 .cta-text {
            color: var(--primary-color);
            background: #ffffff;
            border: 2px solid var(--primary-color);
            padding: 8px 20px;
            border-radius: 30px;
            font-weight: 800;
            margin-top: 8px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            display: inline-block;
            text-align: center;
        }
        .post-container.style-5 .footer-contacts {
            width: 100%;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid rgba(255, 255, 255, 0.3);
            padding-top: 10px;
            font-size: 11px;
            color: #ffffff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }
        .post-container.style-5 .footer-contacts i {
            color: #ff5757;
            margin-right: 4px;
        }

        /* ESTILO 6: Tech Graphic Grey & Red */
        .post-container.style-6 {
            background: #f8fafc;
            padding: 20px;
            border: 2px solid #cbd5e1;
        }
        .post-container.style-6 .bg-decor-1 {
            position: absolute;
            top: -50px;
            left: -50px;
            width: 200px;
            height: 200px;
            background: #ffffff;
            transform: rotate(45deg);
            z-index: 1;
            border-right: 4px solid #cbd5e1;
        }
        .post-container.style-6 .bg-decor-2 {
            position: absolute;
            bottom: -80px;
            right: -80px;
            width: 250px;
            height: 250px;
            background: rgba(166, 28, 28, 0.03);
            transform: rotate(15deg);
            z-index: 1;
            border-left: 2px solid rgba(166, 28, 28, 0.1);
        }
        .post-container.style-6 .image-container {
            border-radius: 40px 4px 40px 4px;
            border: 2px solid #cbd5e1;
        }
        .post-container.style-6 .main-title {
            color: var(--text-main);
            font-weight: 800;
            text-align: left;
            width: 100%;
            border-left: 5px solid var(--primary-color);
            padding-left: 10px;
        }
        .post-container.style-6 .subtitle {
            color: var(--text-muted);
            font-weight: 600;
            text-align: left;
            width: 100%;
            padding-left: 15px;
            margin-bottom: 10px;
        }
        .post-container.style-6 .cta-text {
            color: var(--primary-dark);
            font-weight: 800;
            text-align: center;
        }
        .post-container.style-6 .footer-contacts {
            width: 100%;
            display: flex;
            justify-content: space-between;
            border-top: 2px dashed #cbd5e1;
            padding-top: 10px;
            font-size: 11px;
            color: var(--text-muted);
            z-index: 10;
        }
        .post-container.style-6 .footer-contacts i {
            color: var(--primary-color);
            margin-right: 4px;
        }

        /* ESTILO 7: Border Framed */
        .post-container.style-7 {
            background: #f1f5f9;
            padding: 20px;
        }
        .post-container.style-7 .content {
            border: 2px solid var(--primary-color);
            padding: 16px;
            border-radius: 16px;
            height: 100%;
            width: 100%;
        }
        .post-container.style-7 .header-logo-container {
            justify-content: center;
        }
        .post-container.style-7 .image-container {
            border-radius: 12px;
            border: 1px solid #cbd5e1;
        }
        .post-container.style-7 .main-title {
            color: var(--primary-color);
            font-weight: 800;
            text-align: center;
        }
        .post-container.style-7 .subtitle {
            color: var(--text-main);
            font-weight: 700;
            text-align: center;
        }
        .post-container.style-7 .cta-text {
            color: var(--primary-dark);
            font-weight: 800;
            background: #cbd5e1;
            padding: 6px 18px;
            border-radius: 20px;
            text-align: center;
            margin-top: auto;
            margin-bottom: auto;
        }
        .post-container.style-7 .footer-contacts {
            width: 100%;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #cbd5e1;
            padding-top: 10px;
            font-size: 10px;
            color: var(--text-muted);
        }
        .post-container.style-7 .footer-contacts i {
            color: var(--primary-color);
            margin-right: 4px;
        }

        .contact-column {
            display: flex;
            flex-direction: column;
            gap: 4px;
            max-width: 100%;
            text-align: left;
        }

        /* Unsplash Gallery Modal Styles */
        .unsplash-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.65);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 1000;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .unsplash-modal.open {
            opacity: 1;
            pointer-events: auto;
        }

        .unsplash-modal-content {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 24px;
            width: 90%;
            max-width: 900px;
            height: 85vh;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: scale(0.95);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .unsplash-modal.open .unsplash-modal-content {
            transform: scale(1);
        }

        .unsplash-modal-header {
            padding: 20px 24px;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #ffffff;
        }

        .unsplash-modal-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .unsplash-close-btn {
            background: none;
            border: none;
            font-size: 22px;
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.2s, transform 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
        }

        .unsplash-close-btn:hover {
            color: var(--primary-color);
            background: #f1f5f9;
            transform: rotate(90deg);
        }

        .unsplash-modal-controls {
            padding: 16px 24px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .unsplash-search-wrapper {
            position: relative;
            flex-grow: 1;
        }

        .unsplash-search-input {
            width: 100%;
            padding: 12px 16px 12px 42px;
            border: 1.5px solid #cbd5e1;
            border-radius: 12px;
            font-size: 14px;
            outline: none;
            transition: all 0.2s;
            font-family: inherit;
        }

        .unsplash-search-input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(166, 28, 28, 0.15);
        }

        .unsplash-search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
            font-size: 16px;
        }

        .unsplash-modal-body {
            flex-grow: 1;
            overflow-y: auto;
            padding: 24px;
            background: #f1f5f9;
        }

        .unsplash-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 16px;
        }

        .unsplash-card {
            background: #ffffff;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            border: 1.5px solid #e2e8f0;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .unsplash-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 20px -8px rgba(166, 28, 28, 0.15);
            border-color: var(--primary-color);
        }

        .unsplash-card-img-wrapper {
            position: relative;
            width: 100%;
            padding-top: 70%;
            overflow: hidden;
            background: #e2e8f0;
        }

        .unsplash-card-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .unsplash-card:hover .unsplash-card-img {
            transform: scale(1.08);
        }

        .unsplash-card-info {
            padding: 12px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 4px;
        }

        .unsplash-card-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-main);
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-transform: capitalize;
        }

        .unsplash-select-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(166, 28, 28, 0.85);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.2s ease;
            color: #ffffff;
            gap: 8px;
            z-index: 2;
        }

        .unsplash-card:hover .unsplash-select-overlay {
            opacity: 1;
        }

        .unsplash-select-btn {
            background: #ffffff;
            color: var(--primary-color);
            border: none;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }

        .btn-gallery-trigger {
            background: #ffffff;
            color: var(--text-main);
            border: 1.5px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
            font-size: 12px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 8px;
            width: 100%;
        }

        .btn-gallery-trigger:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: rgba(166, 28, 28, 0.02);
            box-shadow: 0 4px 8px rgba(166, 28, 28, 0.05);
        }

        .btn-gallery-trigger i {
            font-size: 14px;
        }

        /* BOTÃO DO MENU MOBILE */
        .mobile-menu-toggle {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 60px;
            height: 60px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50%;
            box-shadow: 0 10px 25px rgba(166, 28, 28, 0.4);
            z-index: 10000;
            cursor: pointer;
            justify-content: center;
            align-items: center;
            font-size: 22px;
            transition: all 0.2s ease;
        }
        .mobile-menu-toggle:active {
            transform: scale(0.9);
        }

        .mobile-quick-actions {
            display: none;
            flex-direction: column;
            width: 100%;
            max-width: 500px;
            padding: 15px;
            background: var(--panel-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 20px;
            box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
            margin-top: 15px;
            gap: 10px;
            z-index: 100;
        }

        /* MEDIA QUERIES PARA DISPOSITIVOS MÓVEIS (Responsividade Completa) */
        @media (max-width: 990px) {
            .mobile-quick-actions {
                display: flex;
            }
            body {
                flex-direction: column;
                align-items: center;
                padding: 15px;
                gap: 20px;
            }
            .control-panel {
                width: 100%;
                max-width: 500px;
                max-height: none;
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                height: 100vh;
                border-radius: 0;
                transform: translateX(-100%);
                opacity: 0;
                pointer-events: none;
                z-index: 9999;
            }
            .control-panel.open {
                transform: translateX(0);
                opacity: 1;
                pointer-events: auto;
            }
            .mobile-menu-toggle {
                display: flex;
            }
            
            /* Ajuste de escala proporcional para o canvas caber em telas mobile pequenas */
            .post-container {
                transform: scale(0.75);
                transform-origin: center top;
                margin-bottom: -100px;
            }
        }

        @media (max-width: 520px) {
            .post-container {
                transform: scale(0.6);
                margin-bottom: -180px;
            }
        }
        @media (max-width: 380px) {
            .post-container {
                transform: scale(0.5);
                margin-bottom: -230px;
            }
        }
