* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #e9eef3;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}



header,
div,
section {
    margin: 0;
    padding: 0;
}

.banner-img {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    object-fit: contain;
}

.img-banner {
    width: 100%;
    max-width: 1280px;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: contain;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0px 5px;
}

#form {
    height: 150px;
}

.editor-panel {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 28px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    padding: 10px 24px 10px 10px;

    height: fit-content;
    position: sticky;
    top: 15px;
    max-height: calc(100vh - 48px);
    /* ← usa calc para altura dinâmica */
    overflow-y: auto;
    /* ← scroll vertical */
    overflow-x: hidden;
    /* ← esconde scroll horizontal */
}

.bloco-titulo {
    background-color: transparent;
    margin: 45px 0px 25px 0px;
    text-align: center;
    line-height: 30px;

}

.bloco1 {
    width: 100%;
    padding: 15px;
    margin: 8px 15px 8px 8px;
    background-color: #fddcb6;
    border: 1px solid rgb(215, 228, 238);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    gap: 20px;
    text-align: center;
}

.div-irmas {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

div button {
    font-weight: bolder;
}

.logo-div {
    text-align: center;
    padding: 15px 0px 25px 0px;
}

text .editor-panel h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 6px;
}

.panel-section {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin: 5px 0px;
}

.panel-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.form-group {
    flex: 1;
    min-width: 100px;
}

label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #334155;
    display: block;
    margin-bottom: 4px;
}

select,
input,
button {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: white;
    width: 100%;
}

input[type="file"] {
    padding: 6px 4px;
}

button {
    background: #f1f5f9;
    cursor: pointer;
    font-weight: 500;
}

button:hover {
    background: #e2e8f0;
}


#addLineBtn {
    text-align: center;
    justify-content: center;
    justify-items: center;
}

.btn-primary {
    width: 100px;
    background: #3b82f6;
    border-color: #2af19e;
    color: white;
    text-align: center;
}

.btn-primary:hover {
    background: #2563eb;
    color: black;
}

.btn-rec {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.btn-rec:hover {
    background: #dc2626;
}

.recording-status {
    font-size: 0.75rem;
    color: #ef4444;
    text-align: center;
    margin-top: 8px;
    padding: 4px;
    border-radius: 12px;
}

.recording-status.active {
    background: #fee2e2;
    animation: pulse 1s infinite;
}

/* Overlay de imagem - texto sobre a imagem */
.overlay-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    /*border-radius: 20px;*/
    overflow: hidden;
}

.overlay-container img {
    display: block;
    width: 100%;
    height: auto;
    background-color: red;
}

.overlay-text {
    position: absolute;
    /*bottom: 0;*/
    bottom: 0px;
    left: 0;
    right: 0;
    background-color: (90deg, transparent 0%, rgba(0, 0, 0, 0.65) 25%, rgba(0, 0, 0, 0.65) 75%, transparent 100%);
    backdrop-filter: blur(4px);
    color: white;
    padding: 8px 3px;
    text-align: center;
    font-size: 16px;
    /*border-radius: 0 0 20px 20px;*/
    /*white-space: pre-wrap;*/
    /* permite quebras de linha */
    white-space: normal;
    word-break: break-word;
    display: inline-block;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.line-list {
    max-height: 280px;
    overflow-y: auto;
    background: #ffffffdb;
    border-radius: 20px;
    padding: 4px;
}

.line-item {
    background: #f1f5f9;
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    gap: 8px;
    flex-wrap: wrap;
}

.line-item .line-info {
    flex: 1;
    word-break: break-word;
}

.line-item .line-buttons {
    display: flex;
    gap: 6px;
}

.line-item button {
    width: auto;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.7rem;
}

.line-item .edit-btn {
    background: #e0e7ff;
    color: #1e40af;
}

.line-item .remove-btn {
    background: #fee2e2;
    color: #991b1b;
}

.preview-area {
    flex: 2;
    max-width: 100%;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px;
    overflow: hidden;

}

.card-preview {
    background: white;
    border-radius: 32px;
    width: 100%;
    max-width: 560px;
    transition: all 0.2s;
    overflow: hidden;
    margin: 6px 0;
    box-sizing: border-box;
}

.card-inner {
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.card-block {
    word-break: break-word;
    width: 100%;
    transition: all 0.2s;
    border-radius: 16px;
    box-sizing: border-box;
    overflow: hidden;


}

/* Limita o tamanho da imagem no card */
.card-block img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
}

/* Para imagens com legenda à esquerda/direita */
.card-block .img-with-text img {
    max-height: 300px;
}

/* Vídeo */
.card-block video {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

.card-block audio {
    width: 100%;
    border-radius: 30px;
}

.video-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.video-container video {
    width: 100%;
}

.mute-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    width: auto;
}

.mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.img-with-text {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.img-with-text .img-container {
    flex: 1;
    min-width: 120px;
}

.img-with-text .text-side {
    flex: 1;
    min-width: 120px;
}

.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.download-buttons button {
    width: auto;
    padding: 12px 18px;
    background: #4aeea1;
    color: rgb(12, 12, 12);
    border: none;
    border-radius: 20px;
}

.download-buttons button:hover {
    width: auto;
    padding: 12px 18px;
    background: #4aeea1;
    color: rgb(12, 12, 12);
    border: none;
    border-radius: 20px;
    font-weight: bolder;
}


.info-tip {
    font-size: 0.7rem;
    color: #475569;
    text-align: left;
    margin-top: 12px;
}

.upload-preview {
    font-size: 0.7rem;
    color: #3b82f6;
    margin-top: 4px;
}

/* Esconder botões de mute na exportação */
.export-hidden {
    display: none !important;
}

#conteudoCriacao {
    display: none;
}

#painelMontagem {
    display: none;
}

/* Painel de montagem - inicialmente escondido */
.panel-montagem {
    display: none;
}

.panel-montagem.ativo {
    display: block;
}

.btn-iniciar {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.btn-iniciar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}


/* Texto sobre a imagem - sem interferir na imagem */


/* Responsividade */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .editor-panel {
        max-width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }

    .card-preview {
        max-width: 100%;
    }
}

/* Responsividade */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .editor-panel {
        max-width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }

    .card-preview {
        max-width: 100%;
    }
}

/* Responsividade para celular */
@media (max-width: 600px) {
    .app-container {
        padding: 0 5px;
        gap: 15px;
    }

    .editor-panel {
        min-width: 100%;
        max-width: 100%;
        padding: 15px;
    }

    .preview-area {
        min-width: 100%;
        padding: 0 5px;
    }

    .card-preview {
        max-width: 100%;
        margin: 0;
    }

    .card-inner {
        padding: 12px;
    }

    .card-block {
        padding: 8px !important;
    }

    /* Ajusta textos em celular */
    .card-block div {
        font-size: 14px !important;
    }

    /* Ajusta flex de imagem com texto */
    .img-with-text {
        flex-direction: column !important;
    }

    .img-with-text .img-container,
    .img-with-text .text-side {
        width: 100%;
        min-width: auto;
    }

    /* Ajuste para imagens em celular */
    .card-block img {
        max-height: 100%;
        width: auto;
        max-width: 100%;
    }
}

@media (max-width: 500px) {
    .card-inner {
        padding: 16px;
    }

    .img-with-text {
        flex-direction: column;
    }
}