/* @import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@12..36,300..900&display=swap'); */

@font-face {
    font-family: 'Inter-ExtraLight';
    src: url('fonts/Inter18pt-ExtraLight.woff');
    font-weight: 300 900;
    font-style: normal;

}

@font-face {
    font-family: 'Inter-Regular';
    src: url('fonts/Inter18pt-Regular.woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Inter-Bold';
    src: url('fonts/Inter18pt-Bold.woff');
    font-weight: 700;
    font-style: bold;
}

 body {
     margin: 0;
     padding: 0;
     background-color: #f0f0f0;
     /* NOVO: Inicia o corpo como invisível para a animação de entrada */
     opacity: 0;
     transition: opacity 1.5s ease-in;
 }

 body.visible {
     opacity: 1;
 }

 #map {
     position: absolute;
     top: 0;
     bottom: 0;
     width: 100%;
 }
 
 /* NOVO: Estilos para a animação cinematográfica */
 .ui-element {
    /* Adiciona transição suave a todos os elementos da UI */
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
 }
 
 body.intro-animation .ui-element {
    /* Esconde os elementos da UI durante a animação */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
 }

 #searchContainer {
     position: absolute;
     top: 20px;
     left: 20px;
     z-index: 100;
     width: 400px;
     background: rgba(255, 255, 255, 0.98);
     border-radius: 12px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
     overflow: hidden;
     color: #333;
     font-family: "Inter", sans-serif;
 }


 .search-header {
     background: linear-gradient(135deg, #0549e1 0%, #0549e1 100%);
     padding: 15px 20px;
     display: flex;
     align-items: center;
     gap: 10px;
     font-family: "Inter", sans-serif;

 }

 .search-input-container {
     flex: 1;
     position: relative;
 }

 #searchInput {
     width: 100%;
     padding: 10px 40px 10px 15px;
     border: 1px solid #ddd;
     border-radius: 25px;
     background: #fff;
     font-size: 1em;
     outline: none;
     transition: all 0.3s;
     font-family: "Inter", sans-serif;
 }

 #searchInput:focus {
     border-color: #0549e1;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
 }

 .search-icon {
     position: absolute;
     right: 15px;
     top: 50%;
     transform: translateY(-50%);
     color: #666;
     pointer-events: none;
 }

 .search-filters {
     padding: 10px 20px;
     display: flex;
     gap: 10px;
     background: #f7f7f7;
     border-bottom: 1px solid #eee;
     font-family: "Inter", sans-serif;

 }

 .filter-btn {
     padding: 6px 12px;
     border: 1px solid #ccc;
     background: #fff;
     color: #555;
     border-radius: 20px;
     cursor: pointer;
     font-size: 0.85em;
     transition: all 0.2s;
 }

 .filter-btn:hover {
     background: #e9e9e9;
     border-color: #bbb;
 }

 .filter-btn.active {
     background: #0549e1;
     border-color: #0549e1;
     color: #fff;
 }

 #searchResults {
     max-height: 400px;
     overflow-y: auto;
     display: none;
     font-family: "Inter", sans-serif;

 }

 .search-result-item {
     padding: 15px 20px;
     border-bottom: 1px solid #eee;
     cursor: pointer;
     transition: background 0.2s;
     display: flex;
     align-items: center;
     gap: 15px;
     font-family: "Inter", sans-serif;


 }

 .search-result-item:hover {
     background: #f5f5f5;
 }

 .result-logo {
     width: 40px;
     height: 40px;
     border-radius: 50%;
     object-fit: cover;
     flex-shrink: 0;
 }

 .result-info {
     flex: 1;
 }

 .result-name {
     font-weight: 600;
     color: #222;
     margin-bottom: 3px;
     font-family: "Inter", sans-serif;


 }

 .result-location {
     font-size: 0.85em;
     color: #666;
 }

 .result-action {
     display: flex;
     gap: 10px;
 }

 .result-btn {
     padding: 6px 12px;
     border: none;
     border-radius: 6px;
     cursor: pointer;
     font-size: 0.85em;
     transition: all 0.2s;
 }

 .result-btn.go-to {
     background: #0549e1;
     color: white;
 }

 .result-btn.play {
     background: #eee;
     color: #333;
     border: 1px solid #ddd;
 }

 .result-btn:hover {
     transform: translateY(-1px);
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
 }

 .no-results {
     padding: 30px;
     text-align: center;
     color: #777;
 }

 .search-stats {
     padding: 10px 20px;
     font-size: 0.85em;
     color: #888;
     background: #fafafa;
     border-top: 1px solid #eee;
     font-family: "Inter", sans-serif;


 }

 @media (max-width: 768px) {
     #searchContainer {
         width: calc(100% - 40px);
         left: 20px;
         right: 20px;
     }
 }

 #floatingPlayer {
     position: fixed;
     bottom: 20px;
     right: 20px;
     width: 400px;
     background: #fff;
     color: #333;
     border-radius: 20px;
     padding: 0;
     box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
     display: none;
     z-index: 1000;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     font-family: "Inter", sans-serif;
     overflow: hidden;
     border: 1px solid #eee;
 }

 #floatingPlayer.minimized {
     width: 70px;
     height: 70px;
     border-radius: 50%;
     overflow: hidden;
     cursor: pointer;
 }

 #floatingPlayer.minimized #playerContent,
 #floatingPlayer.minimized .header-actions,
 #floatingPlayer.minimized .player-info {
     display: none;
 }

 #floatingPlayer.minimized .player-header {
     padding: 0;
     background: none;
 }

 #floatingPlayer.minimized #playerLogo {
     width: 70px;
     height: 70px;
     margin: 0;
     border-radius: 50%;
     border: none;
 }

 .player-header {
     background: linear-gradient(135deg, #0549E1 0%, #0549E1 100%);
     padding: 15px;
     display: flex;
     align-items: center;
     gap: 15px;
     position: relative;
     overflow: hidden;
 }

 .player-header::before {
     content: '';
     position: absolute;
     top: -50%;
     right: -50%;
     width: 200%;
     height: 200%;
     background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
     animation: pulse 3s ease-in-out infinite;
     font-family: "Inter", sans-serif;

 }

 @keyframes pulse {

     0%,
     100% {
         transform: scale(0.8);
         opacity: 0.5;
     }

     50% {
         transform: scale(1.2);
         opacity: 0.8;
     }
 }

 #playerLogo {
     width: 60px;
     height: 60px;
     border-radius: 12px;
     object-fit: cover;
     border: 2px solid rgba(255, 255, 255, 0.9);
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
     flex-shrink: 0;
     position: relative;
     z-index: 1;
 }

 .player-info {
     flex: 1;
     position: relative;
     z-index: 1;
     overflow: hidden;
 }

 #playerName {
     font-size: 1.2em;
     margin: 0 0 4px;
     font-weight: 700;
     color: #fff;
     text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
     font-family: "Inter", sans-serif;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
 }
 
 .player-sub-info {
    display: flex;
    align-items: center;
    gap: 10px;
 }
 
 #playerLocation {
    font-size: 0.85em;
    color: #fff;
    opacity: 0.8;
 }

 .player-status {
     font-size: 0.85em;
     opacity: 0.9;
     display: flex;
     color: #fff;
     align-items: center;
     gap: 6px;
 }

 .live-indicator {
     width: 8px;
     height: 8px;
     background: #ff4444;
     border-radius: 50%;
     animation: livePulse 2s ease-in-out infinite;
 }

 @keyframes livePulse {

     0%,
     100% {
         opacity: 1;
         transform: scale(1);
     }

     50% {
         opacity: 0.6;
         transform: scale(1.2);
     }
 }
 
 .header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
 }

 #playerContent {
     padding: 25px;
     background: #f9f9f9;
 }

 #videoContainer {
     width: 100%;
     aspect-ratio: 16 / 9;
     background: #000;
     position: relative;
     border-radius: 8px;
     overflow: hidden;
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
 }

 #videoContainer video,
 #videoContainer .plyr {
     width: 100% !important;
     height: 100% !important;
 }

 #playerControls {
     display: flex;
     align-items: center;
     gap: 20px;
 }

 #playPauseBtn {
     background: linear-gradient(135deg, #1DB954 0%, #1ED760 100%);
     border: none;
     color: white;
     font-size: 1.5em;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: 0 4px 20px rgba(29, 185, 84, 0.4);
     transition: all 0.3s ease;
     font-family: "Inter", sans-serif;

 }

 #playPauseBtn:hover {
     transform: scale(1.1);
     box-shadow: 0 6px 30px rgba(29, 185, 84, 0.6);
 }

 #playPauseBtn:active {
     transform: scale(0.95);
 }

 .volume-container {
     flex: 1;
     display: flex;
     align-items: center;
     gap: 15px;
     background: #f0f0f0;
     padding: 10px 15px;
     border-radius: 30px;
 }

 .volume-icon {
     font-size: 1.2em;
     opacity: 0.8;
     color: #333;
 }

 #volumeSlider {
     flex: 1;
     height: 5px;
     background: #ddd;
     outline: none;
     -webkit-appearance: none;
     border-radius: 5px;
     cursor: pointer;
 }

 #volumeSlider::-webkit-slider-thumb {
     -webkit-appearance: none;
     appearance: none;
     width: 18px;
     height: 18px;
     background: #1DB954;
     cursor: pointer;
     border-radius: 50%;
     box-shadow: 0 2px 10px rgba(29, 185, 84, 0.4);
     transition: all 0.2s;
 }

 #volumeSlider::-webkit-slider-thumb:hover {
     transform: scale(1.2);
     box-shadow: 0 2px 15px rgba(29, 185, 84, 0.6);
 }

 .volume-value {
     font-size: 0.9em;
     opacity: 0.8;
     min-width: 35px;
     text-align: right;
     color: #333;
 }
 
 /* NOVO: Estilos para informações extras no player */
 #playerExtraInfo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    margin-top: 15px;
    margin-bottom: 20px;
 }
 #playerContentName {
    font-family: "Inter-Regular", sans-serif;
    font-size: 0.9em;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
 }
 .button-link {
    background-color: #f0f0f0;
    color: #333;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
 }
 .button-link:hover {
    background-color: #e2e2e2;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
 }

 .player-visualizer {
     height: 50px;
     background: #f0f0f0;
     border-radius: 15px;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 4px;
     padding: 0 30px;
     overflow: hidden;
     border: 1px solid #eee;
 }

 .bar {
     width: 4px;
     background: linear-gradient(to top, #1DB954, #1ED760);
     border-radius: 4px;
     transition: height 0.2s ease;
 }

 #closeBtn,
 #minimizeBtn,
 .portal-btn {
     background: rgba(0, 0, 0, 0.15);
     border: none;
     color: #fff;
     font-size: 1.1em;
     cursor: pointer;
     border-radius: 50%;
     transition: all 0.2s;
     position: relative;
     width: 32px;
     height: 32px;
     display: flex;
     align-items: center;
     justify-content: center;
     text-decoration: none;
 }
 
 .portal-btn {
     font-size: 0.9em;
 }

 #closeBtn:hover,
 #minimizeBtn:hover,
 .portal-btn:hover {
     background: rgba(0, 0, 0, 0.3);
     transform: scale(1.1);
 }

 #center-reticle {
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     width: 30px;
     height: 30px;
     border: 2px solid rgba(255, 255, 255, 0.9);
     background-color: rgba(5, 73, 225, 0.4);
     border-radius: 50%;
     box-shadow: 0 0 15px rgba(5, 73, 225, 0.7);
     animation: pulse-reticle 2s infinite ease-in-out;
     pointer-events: none;
     z-index: 101;
 }

 @keyframes pulse-reticle {
     0% {
         transform: translate(-50%, -50%) scale(1);
         opacity: 0.7;
     }

     50% {
         transform: translate(-50%, -50%) scale(1.2);
         opacity: 1;
     }

     100% {
         transform: translate(-50%, -50%) scale(1);
         opacity: 0.7;
     }
 }
 
#center-reticle.loading {
    animation: pulse-loading 1s infinite;
    background-color: rgba(255, 187, 0, 0.7);
    box-shadow: 0 0 20px rgba(255, 187, 0, 1);
}

@keyframes pulse-loading {
    0% { transform: translate(-50%, -50%) scale(1.2); }
    50% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.2); }
}

.canal-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4444;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: none;
    animation: slideInError 0.3s ease;
    max-width: 300px;
}

.floating-player.loading {
    opacity: 0.9;
    border: 2px solid #007bff;
}

.floating-player.loading .player-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.floating-player.loading .player-visualizer {
    opacity: 0.3;
}

.floating-player.loading .player-visualizer .bar {
    animation: loadingPulse 1.5s ease-in-out infinite alternate;
}

@keyframes slideInError {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes loadingPulse {
    from { 
        height: 5px; 
        opacity: 0.3; 
    }
    to { 
        height: 15px; 
        opacity: 0.8; 
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* NOVO: Estilos para a seção de metadados */
#playerMetadata {
    padding: 15px 25px 20px 25px;
    background-color: #f0f0f0; /* Cor de fundo suave */
    border-top: 1px solid #e0e0e0; /* Linha separadora */
    text-align: center;
    overflow: hidden; /* Essencial para o efeito de rolagem */
    white-space: nowrap; /* Impede que o texto quebre a linha */
}

#playerMetadataContent {
    font-family: "Inter-Regular", sans-serif;
    font-size: 0.9em;
    color: #333;
    display: inline-block; /* Necessário para a animação */
    padding-left: 100%; /* Inicia a animação fora da tela */
    animation: marquee 15s linear infinite; /* Animação de rolagem */
}

/* Animação de rolagem para textos longos */
@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-200%, 0); }
}


/* ================================================================== */
/* ===== INÍCIO DA SEÇÃO ADICIONADA PARA CELULARES ===== */
/* ================================================================== */

@media (max-width: 768px) {
    /* Ajusta o container da busca para não ocupar a tela toda */
    #searchContainer {
        width: auto;
        left: 10px;
        right: 10px;
        top: 10px;
    }

    /* Ajusta o player flutuante */
    #floatingPlayer {
        width: auto; /* Remove a largura fixa */
        left: 10px;  /* Define margem esquerda */
        right: 10px; /* Define margem direita */
        bottom: 10px;/* Define margem inferior */
    }

    /* Reduz o padding interno do player */
    #playerContent {
        padding: 20px 15px;
    }
    
    .player-header {
        padding: 10px 15px;
        gap: 10px;
    }

    /* Reduz o tamanho do logo */
    #playerLogo {
        width: 50px;
        height: 50px;
    }

    /* Reduz o tamanho da fonte do nome do canal */
    #playerName {
        font-size: 1.1em;
    }
    
    .player-sub-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    /* Reduz um pouco os controles de volume */
    .volume-container {
        padding: 8px 12px;
        gap: 10px;
    }

    #playerControls {
        gap: 15px;
    }
    
    #playerExtraInfo {
        margin-top: 10px;
        margin-bottom: 15px;
    }
    
    #playerMetadata {
        padding: 10px 15px 15px 15px;
    }

    /* Ocultar botão de minimizar no mobile para forçar o fechamento total */
    #minimizeBtn {
        display: none !important;
    }
}

/* MODAL & SIDEBAR STYLES ADDED BY ANTIGRAVITY */

#floatingPlayer {
    z-index: 2000 !important;
}

#floatingPlayer.modal-view {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 800px;
    max-width: 95vw;
    z-index: 2001 !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1500;
    display: none;
}

#toggleListBtn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

#toggleListBtn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tv-list-container {
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.tv-list-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.tv-list-item:hover {
    background: #f8f9fa;
}

.tv-list-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.tv-list-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.tv-list-city {
    font-size: 0.8em;
    color: #777;
}

@media (max-width: 768px) {
    #floatingPlayer.modal-view {
        width: 90vw;
        max-width: 400px; /* Limite para não ficar gigante em tablets */
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        top: 50% !important;
        border-radius: 16px;
    }
}

