/**
 * CineFlow - Custom Netflix Styling & Layout Polish
 * Estilização cinematográfica personalizada integrada ao template Mazer
 */

:root {
    --cf-netflix-red: #e50914;
    --cf-netflix-dark-red: #b81d24;
    --cf-card-bg: #1f1f2e;
    --cf-card-hover-border: #435ebe;
    --cf-glass-bg: rgba(18, 20, 32, 0.85);
    --cf-glass-border: rgba(255, 255, 255, 0.1);
    --cf-text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    --cf-card-radius: 14px;
}

[data-bs-theme="dark"] {
    --cf-card-bg: #1b1e2e;
    --cf-glass-bg: rgba(15, 17, 26, 0.88);
}

[data-bs-theme="light"] {
    --cf-card-bg: #ffffff;
    --cf-glass-bg: rgba(255, 255, 255, 0.92);
    --cf-glass-border: rgba(0, 0, 0, 0.1);
    --cf-text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   0. ESTRUTURA GERAL, ENQUADRAMENTO RESPONSIVO & STICKY FOOTER
   ========================================================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    margin: 0;
    padding: 0;
}

#app {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: block;
}

#sidebar .sidebar-wrapper {
    background: var(--cf-card-bg);
}

#main,
#main.layout-navbar,
#main.navbar-fixed,
.layout-navbar #main {
    margin-left: 300px !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2.5rem 2rem 2.5rem !important;
    min-width: 0;
    transition: margin-left 0.3s ease;
    background-color: var(--bs-body-bg);
}

@media (min-width: 1600px) {
    #main,
    #main.layout-navbar,
    #main.navbar-fixed,
    .layout-navbar #main {
        padding: 2rem 3.5rem 2rem 3.5rem !important;
    }
}

@media (max-width: 1200px) {
    #main,
    #main.layout-navbar,
    #main.navbar-fixed,
    .layout-navbar #main {
        margin-left: 0 !important;
        padding: 1rem 1.25rem 2rem 1.25rem !important;
    }
}

/* Enquadramento centralizado para manter alinhamento milimétrico em todas as páginas */
.page-heading,
.page-content,
.main-content,
header,
footer,
.layout-navbar footer,
.settings-content-wrapper {
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.page-heading {
    flex: 1 0 auto;
    width: 100%;
    margin-bottom: 2rem;
}

.settings-content-wrapper {
    width: 100%;
}

/* Sticky Footer ancorado perfeitamente na base do conteúdo e alinhado milimetricamente às margens do layout */
footer,
.layout-navbar footer {
    margin-top: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 1.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-top: 1px solid var(--cf-glass-border);
    width: 100%;
    display: block;
    clear: both;
}

footer .footer,
.layout-navbar footer .footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
}

/* Theme Toggle Container na Sidebar */
.theme-toggle-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cf-glass-border);
    transition: all 0.25s ease;
}

.theme-toggle-box:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   1. HERO BANNER CINEMATOGRÁFICO
   ========================================================================== */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 480px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 2.8rem;
    display: flex;
    align-items: flex-end;
    background-color: #0f1016;
    background-size: cover;
    background-position: center top;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    transition: background-image 0.5s ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(10,12,18,0.72) 60%, rgba(10,12,18,0.98) 100%),
                linear-gradient(90deg, rgba(10,12,18,0.92) 0%, rgba(10,12,18,0.45) 60%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2.8rem;
    max-width: 760px;
}

@media (max-width: 576px) {
    .hero-content {
        padding: 1.5rem;
    }
}

.hero-title {
    font-size: 2.7rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: var(--cf-text-shadow);
    line-height: 1.15;
    margin-bottom: 0.9rem;
    letter-spacing: -0.5px;
}

.hero-overview {
    font-size: 1.05rem;
    color: #e2e8f0;
    line-height: 1.55;
    margin-bottom: 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.badge-tmdb {
    background: linear-gradient(135deg, #f5c518, #e5a00d);
    color: #000000;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.3);
}

.hero-actions .btn {
    border-radius: 50px;
    padding: 0.75rem 1.6rem;
    font-size: 0.98rem;
    transition: all 0.25s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   2. FILEIRAS & CARROSSÉIS ESTILO NETFLIX
   ========================================================================== */
.movie-section {
    position: relative;
    margin-bottom: 2.8rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.movie-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    padding: 0 0.25rem;
}

.movie-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    letter-spacing: -0.3px;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.movie-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0.75rem 0.35rem 1.35rem 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.movie-row::-webkit-scrollbar {
    height: 6px;
}

.movie-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

.movie-row::-webkit-scrollbar-track {
    background: transparent;
}

/* Botões de navegação lateral do carrossel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 84px;
    background: rgba(15, 17, 26, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    border-radius: 10px;
    opacity: 0.9; /* SEMPRE VISÍVEL para o usuário conseguir ver e clicar nos filmes à direita */
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    opacity: 1;
    background: #e50914;
    color: #ffffff;
    border-color: #e50914;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
}

.carousel-btn.btn-prev {
    left: 4px;
}

.carousel-btn.btn-next {
    right: 4px;
    border-color: rgba(229, 9, 20, 0.6);
}

.btn-carousel-header {
    transition: all 0.2s ease;
}

.btn-carousel-header:hover {
    transform: scale(1.12);
    background-color: #e50914 !important;
    border-color: #e50914 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   3. CARDS DE FILMES (CATÁLOGO & BIBLIOTECA)
   ========================================================================== */
.movie-card {
    position: relative;
    border-radius: var(--cf-card-radius);
    overflow: hidden;
    background: var(--cf-card-bg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid var(--cf-glass-border);
}

.movie-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    border-color: var(--cf-card-hover-border);
    z-index: 5;
}

.movie-row .movie-card {
    flex: 0 0 195px;
    width: 195px;
}

/* Grid perfeitamente encaixado para página de Dicas e Minha Biblioteca */
.movie-grid,
#gridResultadosDicas,
#gridMinhaBiblioteca {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.15rem;
    padding: 0.5rem 0.25rem 2rem 0.25rem;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1200px) {
    .movie-grid,
    #gridResultadosDicas,
    #gridMinhaBiblioteca {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .movie-grid,
    #gridResultadosDicas,
    #gridMinhaBiblioteca {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.9rem;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    #gridResultadosDicas,
    #gridMinhaBiblioteca {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.movie-grid .movie-card,
#gridResultadosDicas .movie-card,
#gridMinhaBiblioteca .movie-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
}

.movie-card-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    background-color: #1a1c29;
}

.movie-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 0.25rem 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.movie-card-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.movie-card-body {
    padding: 0.9rem;
}

.movie-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card-meta {
    font-size: 0.82rem;
    color: #8c98a4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Botão flutuante de remoção da lista pessoal */
.btn-remove-floating {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ff5f6d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.btn-remove-floating:hover {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
    transform: scale(1.15);
}

/* ==========================================================================
   4. MODAL CINEMATOGRÁFICO DE DETALHES & TRAILER
   ========================================================================== */
.modal-movie .modal-dialog {
    max-width: 880px;
}

.modal-movie .modal-content {
    background: var(--cf-glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--cf-glass-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.65);
}

.modal-movie-media-wrapper {
    position: relative;
    width: 100%;
    background-color: #000;
    aspect-ratio: 16 / 9;
    max-height: 440px;
    overflow: hidden;
}

.modal-movie-media-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-movie-backdrop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close-float {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-float:hover {
    background: #e50914;
    transform: scale(1.1);
}

.cast-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #435ebe;
}

/* ==========================================================================
   5. STAT WIDGETS & ROLETA DE DICAS
   ========================================================================== */
.card-stat-widget {
    border-radius: 16px;
    border: 1px solid var(--cf-glass-border);
    background: var(--cf-card-bg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card-stat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
}

.card-stat-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border-color: var(--cf-card-hover-border);
}

.card-stat-widget.stat-green:hover::before { background: #198754; }
.card-stat-widget.stat-blue:hover::before { background: #0dcaf0; }
.card-stat-widget.stat-yellow:hover::before { background: #ffc107; }
.card-stat-widget.stat-red:hover::before { background: #dc3545; }

.stats-icon-wrap {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.stats-icon-wrap i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.65rem;
    margin: 0;
    padding: 0;
}

.roulette-box {
    background: linear-gradient(135deg, rgba(67, 94, 190, 0.15), rgba(87, 202, 244, 0.15));
    border: 2px dashed #435ebe;
    border-radius: 18px;
    padding: 2.5rem;
    text-align: center;
}

.roulette-animating {
    animation: pulseGlow 1s infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 10px rgba(67, 94, 190, 0.3);
    }
    to {
        box-shadow: 0 0 25px rgba(67, 94, 190, 0.8);
    }
}

/* Dropdown de Busca Instantânea */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 340px;
    max-height: 460px;
    overflow-y: auto;
    background: var(--cf-glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--cf-glass-border);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    z-index: 1050;
    display: none;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-item:hover {
    background: rgba(67, 94, 190, 0.22);
}

.search-item-poster {
    width: 42px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

/* ==========================================================================
   6. ALINHAMENTO GLOBAL E PERFEITO DE ÍCONES (BOOTSTRAP ICONS)
   ========================================================================== */

/* Normalização de todos os ícones em botões, links, badges, formulários e cabeçalhos */
.btn i,
.btn .bi,
.nav-link i,
.nav-link .bi,
.badge i,
.badge .bi,
.dropdown-item i,
.dropdown-item .bi,
.dropdown-header i,
.dropdown-header .bi,
.input-group-text i,
.input-group-text .bi,
.page-title i,
.page-title .bi,
.card-header i,
.card-header .bi,
.alert i,
.alert .bi,
.sidebar-link i,
.sidebar-link .bi {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    flex-shrink: 0;
}

/* Neutraliza o deslocamento de baseline (.bi::before) que desalinha ícones e gera rotação torta */
.btn i::before,
.btn .bi::before,
.nav-link i::before,
.nav-link .bi::before,
.badge i::before,
.badge .bi::before,
.dropdown-item i::before,
.dropdown-item .bi::before,
.dropdown-header i::before,
.dropdown-header .bi::before,
.input-group-text i::before,
.input-group-text .bi::before,
.page-title i::before,
.page-title .bi::before,
.card-header i::before,
.card-header .bi::before,
.alert i::before,
.alert .bi::before,
.sidebar-link i::before,
.sidebar-link .bi::before,
.spin-anim::before,
.spin-rotate::before {
    display: inline-block !important;
    line-height: 1 !important;
    vertical-align: 0 !important;
    margin: 0 !important;
    transform-origin: 50% 50% !important;
}

/* Animação de rotação contínua e perfeitamente centrada no próprio eixo */
.spin-anim,
.spin-rotate {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.15em !important;
    height: 1.15em !important;
    line-height: 1 !important;
    transform-origin: 50% 50% !important;
    animation: spinRotate 0.85s linear infinite !important;
    will-change: transform;
}

.spin-anim::before,
.spin-rotate::before {
    display: block !important;
    line-height: 1 !important;
    vertical-align: 0 !important;
    margin: 0 !important;
    transform-origin: 50% 50% !important;
}

@keyframes spinRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   8. SWEETALERT 2 - BARRA DE PROGRESSO & LISTA DE FILMES ATUALIZADOS
   ========================================================================== */
.cineflow-swal-popup {
    border-radius: 18px !important;
    padding: 1.5rem !important;
    background: var(--cf-card-bg) !important;
    border: 1px solid var(--cf-glass-border) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45) !important;
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .cineflow-swal-popup {
    background: #191c2b !important;
    color: #e9ecef !important;
}

.cineflow-sync-progress-wrap {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    height: 14px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cineflow-sync-progress-bar {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, #e50914, #ff334b);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.6);
}

.cineflow-sync-results-list {
    max-height: 310px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 9, 20, 0.5) rgba(0, 0, 0, 0.1);
}

.cineflow-sync-results-list::-webkit-scrollbar {
    width: 6px;
}

.cineflow-sync-results-list::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.5);
    border-radius: 6px;
}

.cineflow-sync-results-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.cineflow-sync-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease, transform 0.15s ease;
    text-align: left;
}

.cineflow-sync-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.cineflow-sync-item-poster {
    width: 36px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

/* Sub-progresso específico da Etapa 4 (Indexação no Banco Local) */
.cineflow-sync-subprogress-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 12px;
    text-align: left;
    animation: fadeInSlide 0.3s ease-out;
}

[data-bs-theme="dark"] .cineflow-sync-subprogress-card {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.08);
}

.cineflow-sync-subprogress-wrap {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.cineflow-sync-subprogress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #0dcaf0, #0d6efd);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(13, 202, 240, 0.5);
}

/* Abas de Navegação e Filtros do SweetAlert 2 */
.cineflow-sync-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cineflow-sync-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.cineflow-sync-tab-btn:hover {
    color: var(--bs-body-color);
    background: rgba(255, 255, 255, 0.05);
}

.cineflow-sync-tab-btn.active {
    background: #e50914 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   14. PÁGINA DE PERFIL DO USUÁRIO & SELEÇÃO DE AVATAR
   ========================================================================== */
.profile-hero-card {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.12) 0%, rgba(31, 31, 46, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="light"] .profile-hero-card {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.08) 0%, rgba(245, 246, 250, 0.95) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-hero-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e50914;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.35);
    transition: transform 0.3s ease;
}

.profile-stat-widget {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

[data-bs-theme="light"] .profile-stat-widget {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-stat-widget:hover {
    transform: translateY(-2px);
    border-color: rgba(229, 9, 20, 0.3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.profile-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 12px;
}

.avatar-option {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    padding: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-option:hover {
    transform: scale(1.08);
    border-color: rgba(229, 9, 20, 0.5);
}

.avatar-option.selected {
    border-color: #e50914 !important;
    box-shadow: 0 0 14px rgba(229, 9, 20, 0.6);
    transform: scale(1.05);
}

.avatar-option.selected::after {
    content: "✓";
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #e50914;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--cf-card-bg);
}

.password-meter-bar {
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.password-meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.input-password-toggle {
    cursor: pointer;
    background: transparent;
    border-left: 0;
    color: var(--bs-secondary-color);
    transition: color 0.2s ease;
}

.input-password-toggle:hover {
    color: var(--bs-body-color);
}


