body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    font-family: sans-serif;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.5s; /* Transição suave para a cor de fundo */
}

/* --- ALTERAÇÃO 2: Novas classes para o feedback de velocidade --- */
body.bg-speed-up {
    background-color: #000000; /* Cinza escuro */
}

body.bg-slow-down {
    background-color: #000000; /* Azul bem escuro */
}


.screen {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 20px;
}

.screen.active {
    display: flex;
}

#progress-container {
    width: 80%;
    max-width: 400px;
    background-color: #333;
    border-radius: 5px;
    margin: 20px 0;
    border: 1px solid #555;
}

#progress-bar {
    width: 0%;
    height: 20px;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 0.3s ease-in-out;
}

#loading-status {
    margin-top: 10px;
    color: #ccc;
    font-size: 14px;
}

#main-app {
    position: relative;
    justify-content: flex-end;
}

#media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 65px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.media-element {
    display: none; 
    max-width: 100%;
    max-height: 100%;
}

.media-element.active {
    display: block;
}

.layout-libras-only #libras-player,
.layout-legenda-only #legenda-player {
    object-fit: contain;
}

.layout-both {
    flex-direction: column;
}

.layout-both #libras-player,
.layout-both #legenda-player {
    object-fit: contain;
    max-height: none; 
}

.layout-both #libras-player {
    flex-grow: 1;
    flex-basis: 0;
    min-height: 0;
}

.layout-both #legenda-player {
    flex-grow: 0.2;
    flex-basis: 0;
    min-height: 0;
}

/* --- ALTERAÇÃO 6: Estilos para a mensagem de status --- */
#status-message-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 65px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Permite clicar através */
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

#status-message-container.visible {
    opacity: 1;
}

#status-message {
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    font-size: 18px;
}

#controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 15px 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    position: absolute;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    height: 65px;
}

.control-btn {
    padding: 12px 22px;
    font-size: 16px;
    border: 1px solid #fff;
    background-color: #333;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.control-btn.active {
    background-color: #4CAF50;
    border-color: #4CAF50;
}