:root {
    --glass-bg-color: rgba(0, 0, 0, 0.25);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --glass-text: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0c0a09;
    /* stone-950 */
    color: #ffffff;
    overflow-x: hidden;
}

body.auth-loading {
    visibility: hidden;
}

#login-view {
    background-image: url('https://image.tmdb.org/t/p/original/c2dPK558peXs9QzacwzHYQqqS2r.jpg');
    /* ADICIONE ESTA LINHA */
    animation: slowPan 20s ease-in-out infinite alternate;
}

@media (max-width: 768px) {
    #login-view {
        background-image: url('https://image.tmdb.org/t/p/original/8RivlvIUNxwrI19w9ypiC4ZzJ6S.jpg');
    }
}


.main-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100dvh;
    /* Use 'dvh' (dynamic) ao invés de 'vh' (viewport) */
    background-size: cover;
    background-position: center top;
    /* Alinha pelo centro (horizontal) e topo (vertical) */
    transition: background-image 0.5s ease-in-out, opacity 0.5s ease-in-out;
    z-index: -2;
    opacity: 0;
    /* Começa escondido */
}

.main-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0c0a09 15%, transparent 50%),
        linear-gradient(to right, #0c0a09 2%, transparent 50%);
}

@media (max-width: 767px) {

    /* Aplica para telas até 767px de largura (smartphones) */
    .main-background {
        background-position: 51% top;
        /* 50% é centro. 40% é um pouco à esquerda. */
        /* Move a imagem para a esquerda no mobile */
    }
}

.glass-container {
    position: relative;
    overflow: hidden;
    background: transparent;
}

.glass-container .glass-filter,
.glass-container .glass-overlay,
.glass-container .glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.glass-container .glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}

.glass-container .glass-overlay {
    z-index: 2;
    background: var(--glass-bg-color);
}

.glass-container .glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px var(--glass-highlight);
    background: radial-gradient(circle at 50% 50%, transparent 50%, transparent 100%);
    /* Inicial */
    transition: background 0.5s ease;
}

.glass-container .glass-content {
    position: relative;
    z-index: 4;
}

.glass-button {
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    outline: none;
}

.glass-button:hover {
    transform: scale(1.05);
}

.glass-button:active {
    transform: scale(0.95);
}

.glass-button .glass-content {
    color: var(--glass-text);
    font-weight: 500;
}

.nav-item {
    position: relative;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20%;
    right: 20%;
    height: 2px;
    background-image: linear-gradient(to right, #a855f7, #ec4899);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.nav-item.active::after {
    transform: scaleX(1);
}

.nav-item.active {
    color: #ffffff;
    font-weight: 700;
}

#mobile-nav-container {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#mobile-nav-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid white;
    opacity: 0;
    animation: float-pulse 6s ease-in-out infinite;
    pointer-events: none;
}

.mobile-nav-item {
    color: #a0aec0;
    transition: color 0.3s ease;
    border-radius: 9999px;
    flex-shrink: 0;
}

.mobile-nav-item.active {
    color: #ffffff;
    font-weight: 600;
}

@keyframes float-pulse {
    0% {
        transform: translateY(0) scale(1.02);
        opacity: 0;
    }

    50% {
        transform: translateY(-10px) scale(1.05);
        opacity: 0.7;
    }

    100% {
        transform: translateY(0) scale(1.02);
        opacity: 0;
    }
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.content-view {
    padding-top: 100px;
    min-height: 100vh;
}

#home-view {
    padding-top: 0;
}

.details-gradient-overlay {
    background: linear-gradient(to top, #0c0a09 20%, rgba(12, 10, 9, 0.7) 50%, transparent 100%);
}

#hero-content-wrapper {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#hero-content-wrapper.hero-fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #475569;
    /* slate-600 */
    border-bottom-color: #818cf8;
    /* indigo-400 */
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.carousel-container {
    position: relative;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.carousel-item {
    scroll-snap-align: start;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 0.5rem;
    color: white;
    transition: background-color 0.2s;
}

.carousel-btn:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn.prev {
    left: 0.5rem;
}

.carousel-btn.next {
    right: 0.5rem;
}

/* Liquid Glass Effect & Profile Card styles*/
.liquid-glass-card {
    --bg-color: rgba(0, 0, 0, 0.25);
    --highlight: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.liquid-glass-card:hover {
    transform: scale(1.05);
    /* Aplica em cards de filme/serie */
}

.liquid-glass-card .glass-filter,
.liquid-glass-card .glass-overlay,
.liquid-glass-card .glass-specular,
.liquid-glass-card .glass-distortion-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.liquid-glass-card .glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}

.liquid-glass-card .glass-overlay {
    z-index: 2;
    background: var(--bg-color);
}

.liquid-glass-card .glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px var(--highlight);
    background: radial-gradient(circle at 50% 50%, transparent 50%, transparent 100%);
    /* Inicial */
    transition: background 0.5s ease;
}

/* * -----------------------------------------------------------------
 * !!!! CORREÇÃO IMPORTANTE !!!!
 * -----------------------------------------------------------------
 * 'height: auto' é o padrão. Isso conserta "Novidades".
 * Regras específicas no fim do arquivo vão forçar 'height: 100%'
 * onde for necessário (posters, página de pedidos, etc.).
*/
.liquid-glass-card .glass-content {
    position: relative;
    z-index: 4;
    color: var(--text);
    height: auto;
}

.glass-distortion-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 80%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 80%);
    background-size: 300% 300%;
    animation: floatDistort 10s infinite ease-in-out;
    mix-blend-mode: overlay;
    z-index: 2;
    pointer-events: none;
}

@keyframes floatDistort {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* Animation for episode list & panels */
@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in-down {
    animation: fade-in-down 0.3s ease-out forwards;
}

@keyframes fade-out-up {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
}

.animate-fade-out-up {
    animation: fade-out-up 0.3s ease-out forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.4s ease-out forwards;
}

.vote-btn .glass-overlay {
    --glass-bg-color: rgba(79, 70, 229, 0.3);
    /* indigo-600 */
    transition: background-color 0.2s;
}

.vote-btn:hover .glass-overlay {
    --glass-bg-color: rgba(79, 70, 229, 0.4);
}

.vote-btn.voted .glass-overlay {
    --glass-bg-color: rgba(219, 39, 119, 0.3);
    /* pink-600 */
}

.vote-btn.voted:hover .glass-overlay {
    --glass-bg-color: rgba(219, 39, 119, 0.4);
}


/* Custom Select Styles */
.custom-select-container {
    position: relative;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    transform-origin: top;
}

.custom-select-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.episode-item .glass-overlay {
    transition: background-color 0.2s;
}

.episode-item:hover .glass-overlay {
    --glass-bg-color: rgba(255, 255, 255, 0.1) !important;
}

/* Age Rating Styles */
.rating-box {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

#hero-meta .rating-box {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.rating-L {
    --glass-bg-color: rgba(34, 197, 94, 0.5);
}

/* green-500 */
.rating-10 {
    --glass-bg-color: rgba(59, 130, 246, 0.5);
}

/* blue-500 */
.rating-12 {
    --glass-bg-color: rgba(234, 179, 8, 0.5);
}

/* yellow-500 */
.rating-14 {
    --glass-bg-color: rgba(249, 115, 22, 0.5);
}

/* orange-500 */
.rating-16 {
    --glass-bg-color: rgba(239, 68, 68, 0.5);
}

/* red-500 */
.rating-18 {
    --glass-bg-color: rgba(17, 24, 39, 0.6);
}

/* gray-900 */

.episode-list-glass-card {
    --glass-bg-color: rgba(25, 25, 25, 0.5);
    --glass-highlight: rgba(255, 255, 255, 0.1);
}

/* Video Player Styles */
#player-view {
    background-color: #000;
}

#player-view video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Padrão é 'contain'. JS irá alternar para 'cover' */
}

.player-controls-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 50%);
}

#player-view.controls-active .player-controls-wrapper {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.player-control-btn {
    --glass-bg-color: rgba(30, 30, 30, 0.3);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    padding: 0;
}

.player-control-btn .glass-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.player-control-btn svg {
    width: 24px;
    height: 24px;
}

.player-seek-bar-container {
    position: relative;
    width: 100%;
    height: 16px;
    display: flex;
    align-items: center;
}

input[type="range"].player-seek-bar {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    margin: 0;
}

.seek-track {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 1;
    overflow: hidden;
}

.seek-progress {
    background: #e50914;
    /* Cor da Netflix */
    height: 100%;
    width: 0;
}

input[type="range"].player-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background-color: #e50914;
    /* Cor da Netflix */
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

input[type="range"].player-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"].player-volume-slider::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.3);
    height: 4px;
    border-radius: 2px;
}

input[type="range"].player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -5px;
    background-color: #fff;
    height: 14px;
    width: 14px;
    border-radius: 50%;
}

#player-volume-container {
    opacity: 0;
    width: 0;
    transition: all 0.3s ease;
}

#player-volume-container:hover,
.volume-btn-container:hover+#player-volume-container {
    opacity: 1;
    width: 112px;
    /* 7rem */
}

#player-settings-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 1rem;
    width: 200px;
    --glass-bg-color: rgba(30, 30, 30, 0.5);
}

.settings-option-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    border-radius: 6px;
    /* Adicionado */
    color: white;
    /* Adicionado */
}

.settings-option-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.settings-option-btn.active {
    background-color: rgba(229, 9, 20, 0.5);
    font-weight: bold;
}

/* Progress Bar for Continue Watching */
.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 4;
}

.progress-bar-fill {
    height: 100%;
    background-color: #e50914;
    width: 0%;
}

.episode-item .progress-bar-container {
    height: 4px;
    border-radius: 99px;
    overflow: hidden;
}

/* LOGIN FORM STYLES */
.glass-form {
    --bg-color: rgba(0, 0, 0, 0.25);
    /* <-- MUDANÇA (era 0.25) */
    --highlight: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(0, 0, 0, 0.3);

    position: relative;
    width: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.glass-form .glass-filter,
.glass-form .glass-overlay,
.glass-form .glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    /* Adicionado */
}

.glass-form .glass-filter {
    z-index: 1;
    backdrop-filter: blur(10px);
    /* <-- MUDANÇA (era 4px) */
    -webkit-backdrop-filter: blur(10px);
    /* <-- MUDANÇA (era 4px) */
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}

.glass-form .glass-overlay {
    z-index: 2;
    background: var(--bg-color);
}

.glass-form .glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px var(--highlight);
}

.glass-form .glass-content {
    position: relative;
    z-index: 4;
    padding: 30px;
    color: var(--text);
    height: 100%;
}

.form-container {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-container.active {
    display: block;
    opacity: 1;
}

.form-container h3 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text);
    opacity: 0.8;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: var(--input-focus);
    border-color: var(--highlight);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.form-switch a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    opacity: 1;
}

.form-switch a:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.6);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.google-btn i {
    font-size: 1.2rem;
}

/* Notification styles */
#notification-btn.has-new svg {
    color: #ec4899;
    /* pink-500 */
    animation: ring-bell 0.8s ease-in-out;
}

@keyframes ring-bell {

    0%,
    100% {
        transform: rotate(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: rotate(-10deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: rotate(10deg);
    }
}

.notification-tab {
    transition: all 0.2s ease-in-out;
    color: #a1a1aa;
    /* stone-400 */
}

.notification-tab.active {
    color: #ffffff;
    font-weight: 600;
    border-bottom-color: transparent;
    position: relative;
}

.notification-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background-image: linear-gradient(to right, #a855f7, #ec4899);
}

.notification-content {
    display: none;
}

.notification-content.active {
    display: block;
}

.notification-message {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Estilos para Novidades, Comentários, Respostas */
.news-card {
    --bg-color: rgba(28, 25, 23, 0.5);
    /* stone-900 com opacidade */
    --highlight: rgba(255, 255, 255, 0.08);
}

.news-card:hover {
    transform: none;
}

/* Desativa zoom no card principal de novidades */

.comment-card {
    --bg-color: rgba(30, 30, 30, 0.3);
    --highlight: rgba(255, 255, 255, 0.05);
}

.comment-card:hover {
    transform: none;
}

.reply-card {
    --bg-color: rgba(40, 40, 40, 0.2);
    --highlight: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    /* Menor */
}

.reply-card:hover {
    transform: none;
}

.comment-input,
.reply-input {
    resize: none;
}

/* Estilo para botão de like ativo */
.like-btn.text-pink-500 {
    color: #ec4899;
}


@media (max-width: 640px) {
    #player-settings-panel {
        width: 160px;
        right: 0.5rem;
        bottom: calc(100% + 0.5rem);
    }

    .settings-option-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Estilo para botão de like ativo */
.like-btn.text-pink-500 {
    color: #ec4899;
}


@media (max-width: 640px) {
    #player-settings-panel {
        width: 160px;
        right: 0.5rem;
        bottom: calc(100% + 0.5rem);
    }

    .settings-option-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Transição de entrada/saída do Header */
header {
    /* Garante que a transição se aplique */
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    transform: translateY(0);
    opacity: 1;
}

header.header-hidden {
    /* Move o header para cima e o torna transparente */
    transform: translateY(-100%);
    /* <--- Erro removido daqui */
    opacity: 0;
    pointer-events: none;
    /* Impede cliques no header oculto */
}

/* Glass Spinner Container */
.glass-spinner {
    --bg-color: rgba(255, 255, 255, 0.25);
    --highlight: rgba(255, 255, 255, 0.75);
    --spinner-size: 80px;
    --ring-size: 64px;
    --core-size: 24px;

    position: relative;
    width: var(--spinner-size);
    height: var(--spinner-size);
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
}

.glass-filter,
.glass-overlay,
.glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* * -----------------------------------------------------------------
 * !!!! CORREÇÃO IMPORTANTE !!!!
 * -----------------------------------------------------------------
 * O seletor foi corrigido para '.glass-spinner .glass-filter'
 * para não afetar os outros filtros de vidro.
*/
.glass-spinner .glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}

/* Corrigido para '.glass-spinner .glass-overlay' */
.glass-spinner .glass-overlay {
    z-index: 2;
    background: var(--bg-color);
}

/* Corrigido para '.glass-spinner .glass-specular' */
.glass-spinner .glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px var(--highlight);
}

/* * -----------------------------------------------------------------
 * !!!! CORREÇÃO IMPORTANTE !!!!
 * -----------------------------------------------------------------
 * O seletor foi corrigido para '.glass-spinner .glass-content'
 * para não quebrar os layouts das outras páginas.
*/
.glass-spinner .glass-content {
    position: relative;
    z-index: 4;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-ring {
    position: absolute;
    width: var(--ring-size);
    height: var(--ring-size);
    border: 2px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.8);
    border-right-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-core {
    width: var(--core-size);
    height: var(--core-size);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    from {
        transform: scale(0.8);
        opacity: 0.5;
    }

    to {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
    .glass-spinner {
        --bg-color: rgba(0, 0, 0, 0.25);
        --highlight: rgba(255, 255, 255, 0.15);
    }
}

/* --- CORREÇÕES DE LAYOUT (Início) --- */

/* 1. EXCEÇÃO PARA POSTERS: 
  Força 'height: 100%' de volta para cards de poster 
  (que são os únicos que usam 'aspect-')
*/
.liquid-glass-card[class*="aspect-"]>.glass-content {
    height: 100%;
}

/* 2. CORREÇÃO DE ROLAGEM (Pedidos):
  Força a página de Pedidos a ocupar a tela e rolar internamente.
  (100px de padding-top + 32px de padding-bottom da view)
*/
#requests-view.content-view>.liquid-glass-card {
    height: calc(100vh - 132px);
    max-height: calc(100vh - 132px);
    overflow: hidden;
    /* Mantém o efeito de vidro contido */
}

/* Faz o CONTEÚDO da página Pedidos rolar */
#requests-view.content-view>.liquid-glass-card>.glass-content {
    height: 100%;
    overflow-y: auto;
}

/* 3. CORREÇÃO DE ROLAGEM (Novidades - Mobile):
  Em telas pequenas, a página de Novidades também deve rolar por dentro.
*/
@media (max-width: 767px) {
    #news-view.content-view {
        /* Garante que o padding não bugue o cálculo de altura */
        padding-bottom: 0;
    }

    #news-view.content-view>.liquid-glass-card {
        height: calc(100vh - 132px);
        max-height: calc(100vh - 132px);
        overflow: hidden;
    }

    #news-view.content-view>.liquid-glass-card>.glass-content {
        height: 100%;
        overflow-y: auto;
    }
}

@keyframes slowPan {
    0% {
        /* Começa mais à esquerda */
        background-position: 30% 50%;
    }

    100% {
        /* Termina mais à direita */
        background-position: 70% 50%;
    }
}

/* Estilos para os Custom Selects do Modal */
.req-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    color: #d6d3d1;
    /* stone-300 */
}

.req-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.req-option.selected {
    background-color: rgba(147, 51, 234, 0.2);
    /* Roxo suave */
    color: #e9d5ff;
    /* Roxo claro */
    font-weight: 600;
}

/* Scrollbar bonita para o dropdown */
#req-season-dropdown::-webkit-scrollbar,
#req-episode-dropdown::-webkit-scrollbar {
    width: 4px;
}

#req-season-dropdown::-webkit-scrollbar-thumb,
#req-episode-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* --- CORREÇÃO DAS ABAS E DROPDOWNS DO MODAL --- */

/* Estilo do Botão de Tipo (Abas) */
.req-type-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

/* Quando o botão está ATIVO */
.req-type-btn.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
    /* Brilho roxo suave */
}

/* Fundo gradiente sutil quando ativo */
.req-type-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    z-index: -1;
}

/* Correção para o Dropdown ficar SÓLIDO e legível */
.custom-dropdown-solid {
    background-color: #0f0f0f;
    /* Fundo quase preto sólido */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    z-index: 100 !important;
    /* Garante que fique em cima de tudo */
}

.req-option {
    padding: 12px 16px;
    color: #a8a29e;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.req-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 20px;
    /* Efeito de movimentozinho ao passar o mouse */
}

/* --- Barra de Progresso (Continuar Assistindo) - Atualizada para Starlight --- */
.cw-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 20;
}

.cw-progress-fill {
    height: 100%;
    /* ATUALIZADO: Gradiente Roxo -> Rosa */
    background: linear-gradient(90deg, #a855f7, #ec4899) !important;
    width: 0%;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    /* Sombra Rosa */
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

/* Ajuste para o card não cortar a sombra */
.carousel-item .liquid-glass-card {
    overflow: hidden;
}

/* --- STARLIGHT THEME OVERRIDES (Design System Global) --- */

/* 1. Barra de Rolagem (Scrollbar) */
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #a855f7, #ec4899);
    /* Roxo para Rosa */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #9333ea, #db2777);
    /* Tons mais escuros no hover */
}

/* 2. Seleção de Texto */
::selection {
    background: rgba(168, 85, 247, 0.3);
    /* Roxo translúcido */
    color: white;
}

/* 3. Inputs e Formulários */
.glass-input:focus {
    border-color: #d946ef;
    /* Fuchsia/Rosa */
    box-shadow: 0 0 0 2px rgba(217, 70, 239, 0.2);
}

/* 4. Barra de Progresso do Player de Vídeo */
.seek-progress {
    background: linear-gradient(90deg, #a855f7, #ec4899) !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

input[type="range"].player-seek-bar::-webkit-slider-thumb {
    background-color: #ec4899 !important;
    /* Rosa */
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}