/* ROOT VARIABLES & BODY DEFAULTS */
:root {
    --swiper-navigation-size: 38px;
    --swiper-theme-color: #EF4444;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    color: #E5E7EB;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* GENERAL LAYOUT & APP CONTAINERS */
#app-container,
#profile-selection-screen {
    visibility: hidden;
    display: none;
}

#app-container.details-blur {
    opacity: 0.5;
    pointer-events: none;
    filter: none; /* Optimized for weaker devices */
}

/* HEADER */
#main-header {
    background-color: transparent;
    transition: background-color 0.3s ease-in-out;
}

#main-header.scrolled {
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
}

.nav-link.active {
    color: white;
    font-weight: 700;
}

/* PLAYER MODAL */
#player-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease-in-out;
}

.player-wrapper {
    transition: max-width 0.3s ease-in-out, margin-right 0.3s ease-in-out;
    width: 100%;
    max-width: 1100px;
    background-color: #000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
    border-radius: 0.75rem; /* <-- ADICIONE ESTA LINHA (ou o mesmo valor que usar nos detalhes) */
}

.player-content-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
}

.player-content-container iframe,
.player-content-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 1rem 1.5rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
}

.player-header .title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 180px);
}

.player-header .actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-header .actions button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.player-header .actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-header .actions button svg {
    width: 24px;
    height: 24px;
}

.player-close-btn {
    transition: all 0.2s ease-in-out;
}

.player-close-btn:hover {
    transform: scale(1.2) rotate(90deg);
    color: #EF4444;
}

#player-favorite-btn {
    transition: all 0.2s ease-in-out;
}

#player-favorite-btn:hover {
    transform: scale(1.2);
}

#player-favorite-btn.favorited svg {
    stroke: #FBBF24;
    fill: #FBBF24;
}

.player-episode-nav {
    display: flex;
    gap: 1rem;
    white-space: nowrap;
}

.player-episode-btn {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(8px);
    color: #E5E7EB;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background-color 0.2s;
    cursor: pointer;
}

.player-episode-btn:hover {
    background-color: rgba(55, 65, 81, 0.8);
}

.player-info-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.player-info-top .nav-buttons {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 6px;
}

.player-info-top .nav-buttons button {
  flex: 1;
  padding: 8px;
  font-size: 0.9rem;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.player-info-top .nav-buttons button:hover {
  background: #333;
}

.player-info-bottom {
  margin-top: 8px;
  text-align: center;
}

.player-info-bottom .title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

/* DETAILS MODAL */
#details-modal-container {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.details-modal-content {
    background-color: #181818;
    border-radius: 0.75rem; /* <-- EDITE ESTA LINHA */
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.details-modal-scrollable {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.details-modal-scrollable::-webkit-scrollbar {
    width: 8px;
}

.details-modal-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.details-modal-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}
#mobile-watch-party-actions {
    display: none;
}
.details-hero {
    position: relative;
    width: 100%;
    height: 50vh;
    background-size: cover;
    background-position: center top;
}

.details-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #181818 5%, rgba(24, 24, 24, 0.5) 50%, rgba(24, 24, 24, 0) 100%);
}

.details-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    color: white;
}

.details-hero-content h2 {
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.details-body-content {
    padding: 0 1.5rem 2rem;
}

.details-meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #A1A1AA;
}

.details-meta-info span {
    font-weight: 600;
}

.details-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ESTILO BASE PARA BOTÕES DE AÇÃO DOS DETALHES (FALTANTE) */
.details-actions button {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

#details-mylist-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #181818;
}

#details-mylist-btn:hover {
    background-color: white;
}

#details-trailer-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#details-trailer-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.details-section {
    margin-top: 2rem;
}

.details-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cast-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.5rem;
}

.cast-member {
    text-align: center;
    cursor: pointer;
}

.cast-member img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.5rem;
}

.cast-member .name {
    font-weight: 600;
    font-size: 0.875rem;
}

.cast-member .character {
    font-size: 0.75rem;
    color: #A1A1AA;
}

.provider-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.provider-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.provider-btn:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: #71717A;
    cursor: not-allowed;
}

/* PROVIDERS (PLATAFORMAS) - (FALTANTE) */
.provider-grid {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.provider-grid::-webkit-scrollbar {
    display: none;
}
.provider-card {
    background-image: linear-gradient(to top, #e5e7eb, #ffffff);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    flex-shrink: 0;
    width: 150px;
}
.provider-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #EF4444;
    box-shadow: 0 10px 15px -3px rgba(239,68,68,0.3), 0 4px 6px -4px rgba(239,68,68,0.3);
}
.provider-card img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}


/* MEDIA CARDS (Filmes, Séries, etc) */
.media-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 2 / 3;
    background-color: #374151;
}

.media-card-img {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
}

.media-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, transparent);
}

.overlay .card-title {
    font-weight: 600;
    color: white;
}

.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #EF4444;
    transition: width 0.3s ease;
}

.rating-tag {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: #FBBF24;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.new-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #EF4444;
    color: white;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}


/* CHANNEL CARDS */
.is-channel-card {
    aspect-ratio: 16 / 9;
    background: linear-gradient(to bottom, #1F2937, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
}

.is-channel-card .media-card-img {
    position: relative;
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.is-channel-card .overlay {
    display: none;
}


/* SWIPER & BANNERS */
.swiper-slide {
    position: relative;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 1) 0%, transparent 100%);
    z-index: 2;
}

.swiper-pagination-bullet-active {
    background-color: var(--swiper-theme-color);
}

@keyframes kenburns {
    0% {
        transform: scale(1.1) translate(0, 0);
    }
    100% {
        transform: scale(1.2) translate(-2%, 2%);
    }
}

.swiper-slide-active .kenburns-img {
    animation: kenburns 20s ease-out forwards;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 90vh;
    background-size: cover;
    background-position: center 20%;
    display: flex;
    align-items: center;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.8) 0%, transparent 20%), linear-gradient(to right, rgba(17, 24, 39, 1) 20%, rgba(17, 24, 39, 0.5) 50%, rgba(17, 24, 39, 0) 100%);
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 1) 10%, transparent 50%);
}

.hero-banner-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 50%;
}

.hero-banner-logo {
    max-width: 400px;
    max-height: 200px;
    margin-bottom: 1.5rem;
}

.hero-banner-description {
    font-size: 1.125rem;
    font-weight: 400;
    max-width: 600px;
    margin-top: 1rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-banner-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.hero-banner-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mosaic-banner {
    width: 100%;
    height: 60vh;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.mosaic-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(17, 24, 39, 1) 20%, transparent 50%), linear-gradient(to top, rgba(17, 24, 39, 1) 10%, transparent 50%);
}

.mosaic-item {
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.mosaic-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.mosaic-item:nth-child(2) {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.mosaic-item:nth-child(3) {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

.mosaic-item:nth-child(4) {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
}

.mosaic-banner-content {
    position: absolute;
    bottom: 10%;
    left: 5%;
    z-index: 2;
}

.mosaic-banner-content img {
    max-height: 100px;
    max-width: 250px;
}

/* SEARCH */
#search-box {
    position: relative;
}

#search-input, #search-input-mobile {
    width: 38px;
    height: 38px;
    background-color: transparent;
    border: 1px solid #4B5563;
    color: white;
    padding-left: 38px;
    border-radius: 9999px;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
}

#search-input:focus, #search-input-mobile:focus {
    background-color: rgba(0, 0, 0, 0.3);
    cursor: text;
}
#search-input:focus {
    width: 180px;
}
#search-input-mobile:focus {
    width: 200px;
    border-color: #EF4444;
}

#search-icon-btn, #search-icon-btn-mobile {
    position: absolute;
    left: 0;
    top: 0;
    height: 38px;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    transition: color 0.2s;
    pointer-events: none;
}

#search-input:focus~#search-icon-btn,
#search-input.loading~#search-icon-btn,
#search-input-mobile:focus~#search-icon-btn-mobile {
    color: white;
}

.search-spinner {
    display: none;
}

#search-input.loading~#search-icon-btn .search-spinner,
#search-input-mobile.loading~#search-icon-btn-mobile .search-spinner {
    display: block;
}

#search-input.loading~#search-icon-btn .search-lupe,
#search-input-mobile.loading~#search-icon-btn-mobile .search-lupe {
    display: none;
}

.search-results-view .category-row {
    background-color: rgba(31, 41, 55, 0.5);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #4B5563;
}


/* PROFILE SELECTION */
.profile-card {
    transition: transform 0.2s;
}

.profile-card:hover {
    transform: scale(1.05);
}

.profile-avatar {
    border: 4px solid transparent;
    transition: border-color 0.2s;
}

.profile-card:hover .profile-avatar {
    border-color: #E5E7EB;
}

.profile-card.edit-mode .profile-avatar::after {
    content: '✎';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 9999px;
}

.kids-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #3B82F6;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 9999px;
}

/* ACCESSIBILITY & FOCUS STATES (TV OPTIMIZATIONS) */
.user-is-using-keyboard .focusable:focus,
.user-is-using-keyboard .focused {
    outline: 4px solid #EF4444 !important;
    outline-offset: 3px;
    box-shadow: none !important;
    transform: none !important;
    z-index: 30;
}

.user-is-using-keyboard .media-card.focused {
    transform: scale(1.07) !important;
}

/* GENRES PAGE */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.genre-card {
    background-color: #1F2937;
    color: white;
    padding: 2rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.genre-card:hover {
    background-color: #374151;
}

/* HORIZONTAL SCROLL CONTAINERS */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px; /* Reduzido de 24px para deixar os cards mais juntos */
    align-items: flex-start;
    padding: 6px 26px; /* Mantém um padding lateral para a página */
    scroll-padding: 26px; /* Garante que ao navegar com teclado, o card focado não fique colado na borda */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* 2. EFEITO DE HOVER/FOCO NO MEDIA-CARD */
/* Esta é a principal mudança para criar o efeito dinâmico */

/* Base do card: preparamos para a animação */
.horizontal-scroll .media-card {
    width: 150px; /* Mantém a largura base */
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0.15s; /* Transição suave para a transformação */
    position: relative; /* Necessário para o z-index funcionar corretamente */
    z-index: 10;
}

/* O efeito "mágico" ao passar o mouse ou focar (com teclado/controle) */
.horizontal-scroll .media-card:hover,
.user-is-using-keyboard .horizontal-scroll .media-card.focused {
    transform: scale(1.15); /* Aumenta o tamanho do card */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); /* Adiciona uma sombra para dar profundidade */
    z-index: 20; /* Coloca o card na frente dos outros */
    transition-delay: 0.15s; /* Um pequeno atraso para o efeito não ser instantâneo */
}

/* Ajusta o overlay (título) para aparecer somente no hover */
.media-card .overlay {
    opacity: 0; /* Esconde o overlay por padrão */
    transition: opacity 0.3s ease;
    transition-delay: 0.15s;
}

.media-card:hover .overlay {
    opacity: 1; /* Mostra o overlay quando o card está em foco/hover */
}


/* 3. NOVO ESTILO PARA O TÍTULO DA CATEGORIA */
/* Deixamos o título mais limpo e alinhado à esquerda, como um cabeçalho de seção */
.category-title {
    /* Removemos todos os estilos antigos de "pílula" */
    background-color: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;

    /* Novas regras */
    margin: 0 0 1rem 26px; /* Alinha com o padding do .horizontal-scroll */
    padding: 0;
    text-align: left; /* Alinha à esquerda */
    font-size: 1.25rem; /* Um pouco maior e mais destacado */
    font-weight: 700;
    color: #E5E7EB;
    display: block; /* Garante que ocupe a linha toda */
}
/* TOP 10 LIST */
.top-10-card {
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.top-10-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 8rem;
    line-height: 1;
    font-weight: 900;
    color: #111827;
    -webkit-text-stroke: 2px #A1A1AA;
    text-shadow: -1px 1px 0 #E5E7EB, 1px 1px 0 #E5E7EB, 1px -1px 0 #E5E7EB, -1px -1px 0 #E5E7EB;
    z-index: 1;
    transform: translateX(15%);
    transition: all 0.3s ease;
}

.top-10-card:hover .top-10-rank {
    color: #1F2937;
    -webkit-text-stroke: 2px #E5E7EB;
}

.top-10-img-wrapper {
    width: 120px;
    aspect-ratio: 2/3;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.top-10-card:hover .top-10-img-wrapper {
    transform: scale(1.15) translateX(-5%);
}

.top-10-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* AUTOPLAY OVERLAY */
#autoplay-overlay {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#autoplay-overlay img {
    width: 120px;
    height: 67.5px;
    object-fit: cover;
    border-radius: 0.25rem;
}

#autoplay-cancel-btn {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 9999px;
    line-height: 1;
}

/* MISC & UTILITIES */
#load-more-btn {
    display: block !important;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #ef4444;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* BOTTOM NAVIGATION */
#bottom-nav {
    display: none;
}

.bottom-nav-link .nav-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.bottom-nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    height: 38px;
    background-color: rgba(239, 68, 68, 0.15);
    border-radius: 9999px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-link .icon-solid {
    display: none;
}

.bottom-nav-link.active {
    color: #ef4444;
    font-weight: 600;
}

.bottom-nav-link.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.bottom-nav-link.active .icon-outline {
    display: none;
}

.bottom-nav-link.active .icon-solid {
    display: block;
}

.bottom-nav-link[data-view="perfil"] img {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.bottom-nav-link[data-view="perfil"].active img {
    border-color: #ef4444;
}

/* PROFILE PAGE & MENU */
.profile-page-container {
    padding-top: 80px;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid #4B5563;
}

.profile-menu-list a {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #1F2937;
    border-radius: 9999px !important;
    color: #E5E7EB;
    font-weight: 500;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease-in-out;
}

.profile-menu-list a:hover {
    background-color: #374151;
    border-color: #4B5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-menu-list a svg {
    margin-right: 1rem;
    color: #9CA3AF;
}

#profile-menu-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #E5E7EB;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
    margin: 0.25rem;
    border-radius: 9999px !important;
}

#profile-menu-dropdown a:hover {
    background-color: #374151;
    color: #FFFFFF;
}

#profile-menu-dropdown a.logout-btn {
    color: #f87171;
}

#profile-menu-dropdown a.logout-btn:hover {
    background-color: #ef4444;
    color: #FFFFFF;
}
#profile-menu-dropdown {
    background-color: #1F2937; 
    border-radius: 1rem; 
    padding: 0.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); 
}
#profile-menu-dropdown {
    border-radius: 2rem;
}


/* RESPONSIVE & MOBILE STYLES */
@media (max-width: 768px) {
    #bottom-nav {
        display: flex;
    }
    #player-modal {
        padding: 0;
        background-color: #000;
    }
    .player-wrapper {
        height: auto;
        width: 100%;
        border-radius: 0;
    }
    body.chat-open #player-modal {
        height: 50vh;
        top: 0;
        bottom: auto;
        align-items: flex-end;
        padding-bottom: 1rem;
    }
    .details-hero {
        height: 40vh;
    }
    .details-hero-content h2 {
        font-size: 1.75rem;
    }
    .details-body-content,
    .details-hero-content {
        padding: 1rem;
    }
    .details-actions {
        flex-direction: column;
    }
    #details-actions #btn-create-room-details,
    #details-actions #btn-join-room-details {
        display: none;
    }
    #mobile-watch-party-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    #mobile-watch-party-actions button {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        transition: all 0.2s;
    }
    .cast-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 1rem;
    }
    .cast-member img {
        width: 60px;
        height: 60px;
    }
    .hero-banner {
        height: 70vh;
    }
    .hero-banner-content {
        max-width: 90%;
    }
    .hero-banner-logo {
        max-width: 250px;
    }
    .mosaic-banner {
        height: 50vh;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    .mosaic-item:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
    .mosaic-item:nth-child(2) {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    .mosaic-item:nth-child(3) {
        display: none;
    }
    .mosaic-item:nth-child(4) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }
}
/* Estilo para os cards de Gênero com efeito pílula */
.genre-card {
    background-color: #45495025; 
    border: 1px solid #4A5568;  
    color: #E2E8F0;             
    padding: 8px 20px;          
    border-radius: 9999px;      
    text-align: center;      
    cursor: pointer;           
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s; 
    font-weight: 500;          
}

.genre-card:hover {
    background-color: #4A5568; 
    border-color: #60A5FA;    
    transform: translateY(-2px); 
}

.genre-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; 
    gap: 16px;                   
}
.genres-container {
    max-width: 1200px; 
    margin: 0 auto;    
    padding: 0 24px;   
}

@media (min-width: 640px) {
    .provider-card {
        width: 220px;
    }
}
.horizontal-scroll .channel-card-wrapper {
    width: 140px;
    text-align: center;
}

/* 1. O CARD (O "PALCO") */
.horizontal-scroll .media-card.is-channel-card {
    display: flex;             
    align-items: center;       
    justify-content: center;   
    
    aspect-ratio: 16 / 9;      
    
    background-color: #2a2a33;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    gap: 18px;
}

.horizontal-scroll .media-card.is-channel-card .media-card-img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain; 
    width: auto;
    height: auto;
}

.horizontal-scroll .media-card.is-channel-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 75%;
    height: 90%;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.7) 0%, transparent 100%);
    pointer-events: none;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 24px;

    align-items: flex-start;

    padding: 6px 26px;
    scroll-padding: 1px 1px;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}
.category-title {
    display: table;
    margin: 0 auto 1.5rem;
    background-color: rgba(42, 42, 51, 0.5);  
    border: 1px solid rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(8px);                 
    -webkit-backdrop-filter: blur(8px);       
    color: #E5E7EB;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    text-align: center; 
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
}

@media (min-width: 1200px) {
    .player-info-top .nav-buttons button {
        font-size: 1.2rem !important;
        padding: 12px 18px !important;
    }
    .player-info-bottom .title {
        font-size: 1.2rem !important;
    }
    .focusable:focus {
        outline: 3px solid #00aaff !important;
        box-shadow: 0 0 12px #00aaff !important;
        border-radius: 8px;
    }
}
body {
    /* O gradiente vai de um cinza-azulado um pouco mais claro no topo para o seu tom escuro original */
    background: radial-gradient(ellipse at top, #141a22, #111827);
    
    /* A cor sólida original serve como fallback caso o gradiente não carregue */
    background-color: #111827;
    
    /* Garante que o gradiente não se mova ao rolar a página, criando um efeito mais elegante */
    background-attachment: fixed;
    
    /* Garante que o gradiente cubra toda a altura da tela, mesmo com pouco conteúdo */
    min-height: 100vh;
}

.category-row {
    margin-bottom: 1rem; /* Define o espaço abaixo de cada fileira. Aumente ou diminua conforme desejar (ex: 1.5rem, 3rem) */
    position: relative; /* Ajuda a garantir que os cards com z-index elevado não afetem o layout de outras fileiras */
}

#app-container {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* A "Prateleira" de conteúdo com altura e espaçamento mínimos */
.category-row {
    margin: 0 0.25rem 0.75rem 0.25rem;
    
    /* Altura da prateleira reduzida ao mínimo (padding vertical) */
    padding: 0.25rem 0.5rem; /* Apenas 4px de respiro em cima/baixo */
    
    background-color: rgba(28, 37, 51, 0.5); 
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

/* Título da categoria, mais próximo dos cards */
.category-title {
    /* Margem inferior ainda menor para diminuir a altura total */
    margin: 0 0 0.25rem 0; 
    padding-left: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

/* A fileira de cards, com espaçamento mínimo entre eles */
.horizontal-scroll {
    gap: 4px;
    padding-left: 0;
    padding-right: 0;
}


/* --- AJUSTES FINAIS PARA TELAS PEQUENAS (SMARTPHONES) --- */

@media (max-width: 640px) {
    .category-row {
        margin: 0 0 0.75rem 0;
        /* Altura e padding lateral mínimos no celular */
        padding: 0.25rem;
        border-radius: 8px;
    }

    .category-title {
        font-size: 1.125rem;
        /* Título centralizado e em maiúsculas */
        text-align: center;
        text-transform: uppercase;
    }
}
/* Desativa os eventos do mouse na imagem, impedindo o "arrastar" */
.media-card-img {
    pointer-events: none;
}

/* Opcional: Impede a seleção de texto no card, melhorando a sensação */
.media-card {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;    /* IE 10+ */
    user-select: none;        /* Padrão */
}
