.settings-panel { background: var(--card-bg); flex: 1; padding: 25px; border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid var(--border-color); }
       
        .control-group { margin-bottom: 15px; }
        .control-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: var(--text-main); }
        .file-input, .text-input, .select-input { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; background: #fafafa; }
        .text-input:focus, .select-input:focus { outline: 2px solid var(--primary-color); background: #fff; }

        .action-btn { width: 100%; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; padding: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; margin-top: 10px; }
        .action-btn:hover { background-color: var(--primary-hover); }
        .action-btn:disabled { background-color: #cccccc; cursor: not-allowed; }

        .preview-panel { background: #fff; flex: 1; padding: 25px; border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; justify-content: center; }
        
        .media-container {
           position: relative;
    width: 100%;
    max-width: 320px;
    height: auto; /* Deixa a altura fluida baseada no conteúdo */
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: crosshair;
    background-image: linear-gradient(45deg, #e9edef 25%, transparent 25%), 
                      linear-gradient(-45deg, #e9edef 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #e9edef 75%), 
                      linear-gradient(-45deg, transparent 75%, #e9edef 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        }

        #videoPreview {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: none;
        }

        /* Elementos arrastráveis de texto e imagem sobrepostos */
        .draggable-element {
            position: absolute;
            cursor: move;
            user-select: none;
            touch-action: none;
            display: none;
        }

        .preview-text-overlay {
            font-family: 'Impact', sans-serif;
            font-size: 24px;
            color: #ffffff;
            text-shadow: 
                -2px -2px 0 #000,  2px -2px 0 #000,
                -2px  2px 0 #000,  2px  2px 0 #000,
                 0px -2px 0 #000,  0px  2px 0 #000,
                -2px  0px 0 #000,  2px  0px 0 #000;
            padding: 4px;
        }

        .preview-image-overlay img {
            width: 80px;
            height: auto;
            pointer-events: none;
        }

        .instruction { position: absolute; color: var(--text-muted); text-align: center; padding: 10px; font-size: 0.8rem; pointer-events: none; }
        .specs-info { font-size: 0.75rem; color: var(--text-muted); margin-top: 15px; text-align: center; }

        @media (max-width: 768px) { .main-container { flex-direction: column; } }