* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: #08080a; color: #ffffff; overflow-x: hidden; }

header { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: rgba(8, 8, 10, 0.95); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #222; }
.logo { font-size: 1.5em; font-weight: 700; color: #fff; }
.logo span { color: #e50914; }
nav ul { list-style: none; display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
nav ul li a { color: #ccc; text-decoration: none; font-weight: 600; font-size: 0.9em; transition: color 0.3s; }
nav ul li a:hover { color: #e50914; }

.search-container { position: relative; max-width: 600px; margin: 0 auto; width: 90%; }
.search-container input { width: 100%; padding: 12px 20px; border-radius: 30px; border: 1px solid #e50914; background: #111; color: #fff; font-size: 1em; outline: none; }
.search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 1.2em; pointer-events: none; }

.grid-catalog { display: flex; overflow-x: auto; gap: 15px; padding: 10px 0 20px 0; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.grid-catalog::-webkit-scrollbar { display: none; }

.card { flex: 0 0 auto; width: 140px; background: #111; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease, border-color 0.3s ease; border: 1px solid transparent; display: flex; flex-direction: column; }
.card:hover { transform: scale(1.05); border-color: #e50914; }
.card img { width: 100%; height: 210px; object-fit: cover; }
.card h3 { font-size: 0.85em; padding: 10px 10px 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.card-meta { display: flex; justify-content: space-between; padding: 0 10px 10px 10px; font-size: 0.8em; color: #aaa; }
.card-meta .star-count { color: #ffc107; font-weight: bold; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.92); z-index: 9999; display: none; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content.netflix-style { background: #141414; width: 100%; height: 100%; max-width: none; max-height: 100vh; border-radius: 0; border: none; overflow-y: auto; position: relative; padding-top: env(safe-area-inset-top); }
.close-btn { position: absolute; top: 20px; right: 15px; color: #fff; font-size: 0.8em; font-weight: bold; cursor: pointer; z-index: 100; background: rgba(0,0,0,0.7); padding: 8px 15px; border-radius: 20px; border: 1px solid #444; }

.modal-backdrop { width: 100%; height: 40vh; min-height: 250px; background-size: cover; background-position: center top; position: relative; display: flex; align-items: flex-end; padding: 20px; }
.backdrop-gradient { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, #141414 5%, transparent 70%); z-index: 1; }

.logo-img { max-width: 60%; max-height: 120px; object-fit: contain; z-index: 2; margin-bottom: -10px; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.8)); }
#modalTitle { font-size: 2.2em; font-weight: 700; color: #fff; z-index: 2; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); margin-bottom: -10px; }

.modal-info { padding: 25px 20px; }
.meta-row { display: flex; gap: 15px; align-items: center; font-size: 0.9em; color: #aaa; margin-bottom: 5px; }
.meta-item.age-rating { background: #e50914; color: white; padding: 2px 6px; font-weight: bold; border-radius: 3px; font-size: 0.8em; border: 1px solid transparent;}

.action-buttons { display: flex; gap: 12px; margin-bottom: 20px; }
.btn-netflix-play { background: #ffffff; color: #000000; border: none; padding: 12px 25px; font-size: 1.1em; font-weight: bold; border-radius: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; transition: background 0.2s; }
.btn-netflix-play:hover { background: #cccccc; }
.btn-netflix-secondary { background: rgba(255,255,255,0.15); color: #ffffff; border: 1px solid rgba(255,255,255,0.3); padding: 12px 20px; font-size: 1.1em; font-weight: bold; border-radius: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; }

.modal-overview { font-size: 0.95em; line-height: 1.6; color: #ccc; margin-bottom: 20px; text-align: justify; }

.cast-crew-container { font-size: 0.85em; color: #aaa; line-height: 1.5; }
.cast-label { color: #666; font-weight: bold; display: block; margin-bottom: 10px; }
.cast-grid { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.cast-grid::-webkit-scrollbar { display: none; }
.cast-member { display: flex; flex-direction: column; align-items: center; width: 70px; flex: 0 0 auto; text-align: center; }
.cast-member img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin-bottom: 5px; border: 2px solid #333; background: #222; }
.cast-member span { font-size: 0.8em; line-height: 1.2; color: #ccc; }

.similar-carousel { display: flex; overflow-x: auto; gap: 12px; padding: 10px 0; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.similar-carousel::-webkit-scrollbar { display: none; }
.similar-card { flex: 0 0 auto; width: 120px; border-radius: 6px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease; }
.similar-card:hover { transform: scale(1.05); }
.similar-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; }

.back-to-details { background: #222; color: white; border: none; padding: 15px; width: 100%; text-align: left; font-weight: bold; cursor: pointer; border-bottom: 1px solid #333; font-size: 1em; }

.rating-inside { border-top: 1px solid #222; padding-top: 20px; margin-bottom: 20px; }
.stars-wrapper { display: flex; flex-direction: row-reverse; justify-content: center; gap: 8px; font-size: 2em; margin-top: 10px; }
.stars-wrapper input { display: none; }
.stars-wrapper label { color: #333; cursor: pointer; }
.stars-wrapper input:checked ~ label, .stars-wrapper label:hover, .stars-wrapper label:hover ~ label { color: #ffc107; }
.stars-numbers { display: flex; justify-content: center; gap: 22px; font-size: 0.8em; color: #666; margin-top: 5px; }

.brave-alert-badge { background: rgba(230, 120, 34, 0.1); border: 1px solid rgba(230, 120, 34, 0.3); padding: 12px; border-radius: 6px; font-size: 0.85em; color: #e67822; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.brave-alert-badge i { margin-top: 3px; font-size: 1.1em; }

.brave-player-banner { background: #1f1f25; color: #ffc107; text-align: center; padding: 8px 15px; font-size: 0.8em; font-weight: 600; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: center; gap: 8px; }

.apoio-premium-box { background: rgba(229, 9, 20, 0.03); border: 1px solid #1c1c24; padding: 30px 20px; border-radius: 12px; text-align: center; max-width: 600px; margin: 0 auto 40px auto; }
.apoio-text { font-size: 0.9em; color: #aaa; line-height: 1.6; margin-bottom: 20px; text-align: justify; }
.btn-apoio-pix { background: #e50914; color: white; border: none; padding: 12px 35px; font-weight: 700; border-radius: 30px; cursor: pointer; font-size: 1em; display: inline-flex; align-items: center; gap: 10px; transition: 0.3s ease; box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3); }
.btn-apoio-pix:hover { background: #b80710; transform: scale(1.04); }
#pixStatusMsg { color: #2ecc71; font-weight: bold; font-size: 0.85em; margin-top: 15px; height: 20px; display: none; }

.avatar-selection { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.avatar-option { width: 60px; height: 60px; border-radius: 10px; cursor: pointer; opacity: 0.4; border: 2px solid transparent; transition: all 0.3s ease; object-fit: cover; filter: grayscale(80%); }
.avatar-option:hover { opacity: 0.8; transform: scale(1.1); filter: grayscale(20%); }
.avatar-option.selected { opacity: 1; border: 2px solid #e50914; transform: scale(1.15); filter: grayscale(0%); box-shadow: 0 0 15px rgba(229, 9, 20, 0.6); }

footer { text-align: center; padding: 40px 20px; border-top: 1px solid #141419; margin-top: 60px; color: #444; font-size: 0.85em; font-weight: 600; background: #040405; width: 100%; }

/* =========================================
   MENU DROPDOWN PRIVADO DO AVATAR VIP
========================================= */
.profile-menu-container { position: relative; display: flex; align-items: center; }
.profile-dropdown { 
    display: none; position: absolute; right: 0; top: 55px; 
    background: #111; border: 1px solid #333; border-radius: 8px; 
    width: 175px; z-index: 1000; box-shadow: 0 8px 25px rgba(0,0,0,0.85);
    padding: 8px 0; overflow: hidden;
}
.profile-dropdown a { 
    display: block; padding: 12px 20px; color: #fff; text-decoration: none; 
    font-size: 0.9em; cursor: pointer; transition: 0.2s; font-weight: 600; text-align: left;
}
.profile-dropdown a i { margin-right: 10px; color: #e50914; font-size: 1.1em; width: 15px; text-align: center; }
.profile-dropdown a:hover { background: #222; color: #e50914; padding-left: 25px; }

/* =========================================
   RESPONSIVIDADE MÓVEL
========================================= */
@media (max-width: 768px) {
    header { flex-wrap: wrap; justify-content: space-between; padding: 15px 5%; }
    .logo { order: 1; font-size: 1.3em; }
    #userHeaderProfile, #guestHeaderProfile { order: 2; gap: 8px; }
    nav { order: 3; width: 100%; margin-top: 15px; overflow-x: auto; padding-bottom: 5px; }
    nav ul { justify-content: flex-start; flex-wrap: nowrap; gap: 15px; }
    nav ul li a { white-space: nowrap; font-size: 0.85em; }
}
