/* ===== PLAYER MODAL ===== */
#player-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

#player-modal > div {
    pointer-events: auto;
}

#player-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

/* Player header */
.player-header-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    pointer-events: none;
    gap: 12px;
}

.player-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    flex: 1;
    min-width: 0;
}

.player-header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.player-header-btn:hover {
    background: rgba(255,255,255,0.25);
}

.player-header-btn:active {
    transform: scale(0.95);
}

.player-header-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-header-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
    margin-top: 2px;
}

.player-header-source {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Player body */
#player-overlay > div:nth-child(2) {
    flex: 1;
    position: relative;
    background: #000;
}

#player-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    inset: 0;
}

/* Player loading */
.player-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #000;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.player-loading-overlay p {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.player-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Player sources footer */
.player-sources-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 60%, transparent 100%);
    backdrop-filter: blur(20px);
    padding: 14px 12px 28px;
    border-top: 1px solid rgba(255,255,255,0.05);
    pointer-events: auto;
}

.sources-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sources-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

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

.source-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: rgba(255,255,255,0.6);
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 64px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.source-btn i {
    font-size: 1.1rem;
    transition: color 0.2s ease;
    color: rgba(255,255,255,0.5);
}

.source-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
}

.source-btn:hover i {
    color: rgba(255,255,255,0.8);
}

.source-btn.active {
    box-shadow: 0 4px 16px var(--source-color, var(--accent));
}

.source-btn.active i {
    color: white;
}

.source-pulse {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: var(--accent, #00d084);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease infinite;
    border: 2px solid #000;
}

/* ===== EPISODE SELECTOR ===== */
.season-tab {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.season-tab:hover {
    background: var(--bg-hover);
    border-color: rgba(255,255,255,0.15);
}

.season-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

/* ===== SEASONS LIST (menor na pagina de detalhes) ===== */
.seasons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.season-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.03);
}

.season-card:hover {
    background: var(--bg-hover);
    border-color: rgba(255,255,255,0.08);
}

.season-card img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.season-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.season-info h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.season-info p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== REELS PAGE ===== */
.reels-page { padding-top: var(--header-height); }
.reels-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.reel-item {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.reel-media {
    position: relative;
    flex: 1;
    min-height: 50vh;
    background: var(--bg-secondary);
    overflow: hidden;
}
.reel-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.reel-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: var(--transition);
}
.reel-play-btn i {
    font-size: 3rem;
    color: white;
    opacity: 0.9;
    transition: var(--transition);
}
.reel-play-btn:hover i {
    transform: scale(1.1);
    opacity: 1;
}
.reel-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.reel-info {
    padding: 16px;
    background: var(--bg-primary);
}
.reel-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.reel-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.reel-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
}
.reel-actions {
    display: flex;
    gap: 8px;
}
.reel-actions button {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}
.reel-actions button:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ===== ACTOR PAGE ===== */
.actor-page { padding-bottom: 20px; }

/* ===== PROVIDER SECTIONS ===== */
.provider-section {
    margin-bottom: 28px;
}
.provider-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}
.provider-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
}
.provider-section-title img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}
.provider-section-title i {
    color: var(--accent);
    font-size: 0.9rem;
}

/* ===== CAST LINKS ===== */
.cast-item {
    cursor: pointer;
    transition: var(--transition);
}
.cast-item:hover {
    transform: translateY(-4px);
}
.cast-item:hover img {
    border-color: var(--accent);
}
.cast-item img {
    transition: var(--transition);
}

/* ===== FIX: Botoes ativos mudam de cor ===== */
.card-actions button.active {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    border-color: var(--accent) !important;
}
.card-actions button.active i {
    color: var(--bg-primary) !important;
}

/* ===== FIX: Olhinho verde quando assistido ===== */
.card-actions button.active.watched {
    background: #00d084 !important;
    color: var(--bg-primary) !important;
    border-color: #00d084 !important;
}
.card-actions button.active.watched i {
    color: var(--bg-primary) !important;
}

/* ===== FIX: Icones de streaming mais nitidos ===== */
.provider-icon img {
    filter: none !important;
    opacity: 1 !important;
}
.provider-item:hover .provider-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ===== DETAIL DIRECTOR ===== */
.detail-director {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.detail-director span {
    background: var(--bg-tertiary);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
}

/* ===== HERO ROTATIVO ===== */
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== FOOTER NAV FIX ===== */
.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex: 1;
    max-width: 80px;
    text-decoration: none;
    min-height: 56px;
    justify-content: flex-end;
}

.footer-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    margin-bottom: 2px;
}

.footer-nav-icon i {
    font-size: 1.3rem;
    line-height: 1;
}

.footer-nav-label {
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.footer-nav-item.active {
    color: var(--accent);
}

.footer-nav-item:active {
    transform: scale(0.95);
}

/* ===== EXPLORE PAGE TOP PROVIDER ===== */
.explore-page .provider-section {
    animation: fadeIn 0.4s ease;
}

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

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}
