/* styles.css */
/* Estilos globais removidos para evitar conflito com o layout do site */

.app-container {
    display: flex;
    flex-direction: column;
    /* height: 100vh; Removido para permitir rolagem natural */
    min-height: 600px;
    /* Altura mínima para garantir usabilidade */
}

/* Espaços de cabeçalho e rodapé */
.header-space {
    background-color: #999;
    color: #ff0000;
    text-align: center;
    padding: 20px 0;
    font-weight: bold;
    height: 60px;
}

.footer-space {
    background-color: #999;
    color: #ff0000;
    text-align: center;
    padding: 20px 0;
    font-weight: bold;
    height: 80px;
    /* Footer mais alto conforme solicitado */
}

/* Área de conteúdo principal */
.content-area {
    display: flex;
    flex: 1;
    /* overflow: hidden; Removido */
    gap: 20px;
    /* Adicionado gap para espaçamento */
}

.ads-space {
    background-color: #eee;
    width: 300px;
    /* Tamanho padrão do Google Ads (300x600) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ff0000;
    font-weight: bold;
    text-align: center;
    min-height: 600px;
    border-radius: 8px;
    /* Melhoria visual */
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* overflow: hidden; Removido */
    background-color: #fff;
    /* Fundo branco para contraste */
    border-radius: 8px;
    /* Melhoria visual */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Melhoria visual */
    padding: 20px;
    /* Espaçamento interno */
}

/* Cabeçalho do editor */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #444;
    border-bottom: 1px solid #555;
}

.editor-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.editor-actions button {
    background-color: transparent;
    border: 1px solid #666;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

/* Controles de formatação */
.formatting-controls {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    background-color: #444;
    border-bottom: 1px solid #555;
    gap: 15px;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-group label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    gap: 5px;
}

.size-control,
.line-height-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

button {
    background-color: #555;
    border: none;
    color: white;
    cursor: pointer;
}

.size-control button,
.line-height-control button {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="number"] {
    width: 50px;
    background-color: #555;
    border: none;
    color: white;
    padding: 3px 5px;
    text-align: center;
}

input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

select {
    background-color: #555;
    border: none;
    color: white;
    padding: 5px;
}

#btnMarker {
    width: 30px;
    height: 30px;
}

.alignment-buttons {
    display: flex;
    gap: 2px;
}

.alignment-buttons button,
#btnBold,
#btnItalic {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Área de conteúdo do editor */
.editor-content {
    flex: 1;
    padding: 10px;
    background-color: #000;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.editor-content-inner {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    position: relative;
    margin: 0 auto;
    border: 1px dotted #333;
}

.editor-content textarea {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: none;
    color: #FFFF00;
    resize: none;
    outline: none;
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 36px;
    line-height: 1.0;
    position: absolute;
    top: 0;
    left: 0;
}

/* Rodapé do editor */
.editor-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #444;
    border-top: 1px solid #555;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.playback-controls button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-after {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.time-input {
    width: 40px;
    background-color: #555;
    border: none;
    color: white;
    padding: 3px 5px;
    text-align: center;
}

.scroll-speed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.speed-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speed-slider input[type="range"] {
    width: 200px;
}

.additional-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.additional-controls button {
    padding: 5px 10px;
    font-size: 12px;
}

/* Classe para botões ativos */
.active {
    background-color: #ff6600;
}

/* Responsividade - Tablets */
@media (max-width: 768px) {
    .content-area {
        flex-direction: column;
    }

    .ads-space {
        width: 100%;
        height: 60px;
    }

    .formatting-controls {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px;
    }

    .control-group {
        flex: 0 0 auto;
        gap: 4px;
    }

    .control-group label {
        font-size: 10px;
    }

    .size-control,
    .line-height-control {
        gap: 2px;
    }

    .size-control button,
    .line-height-control button {
        width: 28px;
        height: 28px;
    }

    .size-control input,
    .line-height-control input {
        width: 40px;
    }

    .editor-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px;
    }

    .playback-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .playback-controls button {
        width: 44px;
        height: 44px;
    }

    .start-after {
        margin-left: 0 !important;
    }

    .scroll-speed {
        width: 100%;
        padding: 8px;
    }

    .speed-slider input[type="range"] {
        width: 100%;
        min-width: 150px;
    }

    .additional-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .additional-controls button {
        flex: 1;
        min-width: 100px;
        padding: 10px 16px;
    }
}

/* Responsividade - Smartphones */
@media (max-width: 480px) {
    .app-container {
        min-height: auto;
    }

    .main-content {
        padding: 10px;
    }

    .editor-header {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .editor-header h2 {
        font-size: 14px;
    }

    .editor-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    .editor-actions button {
        flex: 1;
        padding: 8px;
        font-size: 11px;
    }

    .formatting-controls {
        gap: 6px;
        padding: 6px;
    }

    .control-group {
        gap: 2px;
    }

    .control-group label {
        font-size: 9px;
        white-space: nowrap;
    }

    .size-control button,
    .line-height-control button {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .size-control input,
    .line-height-control input {
        width: 32px;
        font-size: 11px;
    }

    .alignment-buttons button {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    input[type="color"] {
        width: 28px;
        height: 28px;
    }

    select {
        max-width: 90px;
        font-size: 11px;
        padding: 4px;
    }

    .editor-content textarea {
        font-size: 24px !important;
        height: 300px !important;
    }

    .editor-footer {
        padding: 10px;
        gap: 10px;
    }

    .playback-controls {
        gap: 6px;
    }

    .playback-controls button {
        width: 40px;
        height: 40px;
    }

    .start-after {
        font-size: 10px;
        padding: 4px 6px;
    }

    .start-after input {
        width: 36px;
        font-size: 11px;
    }

    .scroll-speed {
        padding: 6px;
    }

    .scroll-speed span {
        font-size: 10px;
    }

    .speed-slider {
        gap: 6px;
    }

    .speed-slider span {
        font-size: 9px;
    }

    .additional-controls {
        gap: 6px;
    }

    .additional-controls button {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* Suporte à rotação de tela (landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .formatting-controls {
        padding: 4px;
        gap: 4px;
    }

    .control-group label {
        display: none;
    }

    .editor-content textarea {
        height: 200px !important;
    }

    .editor-footer {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px;
        gap: 4px;
    }

    .playback-controls {
        gap: 4px;
    }

    .playback-controls button {
        width: 36px;
        height: 36px;
    }

    .start-after {
        display: none;
    }

    .scroll-speed {
        flex-direction: row;
        padding: 4px 8px;
        gap: 8px;
    }

    .scroll-speed>span:first-child {
        display: none;
    }

    .speed-slider input[type="range"] {
        width: 80px;
    }

    .additional-controls button {
        padding: 6px 10px;
        font-size: 10px;
    }

    .additional-controls button span {
        display: none;
    }
}

.speed-value {
    margin-top: 5px;
    text-align: center;
    font-size: 12px;
    color: #ff6600;
    font-weight: bold;
}

/* Classe para espelhamento */
.mirrored {
    transform: scaleX(-1);
}