/* Reset rápido */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root{
  --bg:#141414;
  --netflix-red: #e50914;
  --white: #ffffff;
  --overlay-dark: rgba(0,0,0,0.66);
  --glass: rgba(255,255,255,0.04);
}

/* Tipografia base */
body{
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background-color: var(--bg);
  color: var(--white);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height: 1.3;
}

/* HERO */
.hero{
  position: relative;
  min-height: 100vh;
  background: url('../assets/imgs/fundonetflix.png') center/cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* camada escura com gradiente central */
.overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.7) 60%),
    linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.75));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

/* NAVBAR */
.navbar{
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  pointer-events: none; /* deixa conteúdos por trás clicáveis apenas onde necessário */
}

/* tornar logo e botões clicáveis */
.navbar > * { pointer-events: auto; }

.logo{
  height: 44px;
  filter: brightness(1.05);
}

/* language select + login */
.language-select select{
  background: rgba(0,0,0,0.6);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  outline: none;
}

/* Entrar - botão pequeno no canto direito */
.login-btn{
  margin-left: 12px;
  background: var(--netflix-red);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.45);
  transition: transform .12s ease, box-shadow .12s ease;
}

/* agrupa select + entrar no canto direito */
.navbar .right-controls{
  display:flex;
  gap:10px;
  align-items:center;
}

/* HERO CONTENT (central) */
.hero-content{
  max-width: 1100px;
  width: 100%;
  padding: 40px 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

/* Título principal estilo Netflix: grande, forte e espaçado em linhas */
.hero-content h1{
  font-family: "Oswald", "Helvetica Neue", Arial, sans-serif;
  color: var(--white);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 auto;
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-shadow: 0 6px 20px rgba(0,0,0,0.55);
  max-width: 820px;
  white-space: normal; /* garante que a quebra do <br> funciona */
}




/* Subtexto logo abaixo, mais leve */
.hero-content p {
  color: rgba(255,255,255,0.95);
  font-size: clamp(0.95rem, 1.6vw, 1.3rem);
  margin: 0;
}

/* Descrição menor com opacidade */
.hero-content .muted {
  color: rgba(255,255,255,0.75);
  font-size: 0.98rem;
}

/* FORMULÁRIO grande estilo Netflix */
.email-form{
  display: flex;
  gap: 10px;
  margin-top: 6px;
  width: 100%;
  max-width: 500git px;
  align-items: center;
  justify-content: center;
}

/* input: escuro semi-transparente */
.email-form input[type="email"]{
  flex: 1;
  min-width: 220px;
  padding: 18px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.5);
  color: var(--white);
  font-size: 1.05rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

/* placeholder mais sutil */
.email-form input::placeholder{
  color: rgba(255,255,255,0.55);
}

/* botão principal grande */
.email-form button{
  background: var(--netflix-red);
  color: white;
  border: none;
  padding: 16px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(229,9,20,0.18);
  transition: transform .12s ease, box-shadow .12s ease;
}

/* pequeno ícone seta (pseudo) */
.email-form button::after{
  content: "›";
  font-size: 1.4rem;
  line-height: 1;
}

/* hover states */
.email-form button:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px rgba(229,9,20,0.22); }
.login-btn:hover{ transform: translateY(-2px); }

/* SEÇÕES inferiores */
section{
  padding: 48px 20px;
  background: var(--bg);
}

/* Promoção destacada */
.promo-section{
  background: linear-gradient(90deg, rgba(233,9,20,0.95), rgba(200,5,14,0.95));
  color: white;
  padding: 22px;
  border-radius: 8px;
  margin: 24px auto;
  max-width: 1100px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Trending grid */
.trending-section{
  max-width: 1100px;
  margin: 0 auto;
  color: white;
}

.trending-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* cartão com overlay sutil e rank */
.trending-item{
  position: relative;
  width: 100%;
  padding-top: 150%; /* controle da proporção 2:3 */
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.18));
  transition: transform .18s ease;
}

.trending-item img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform-origin:center;
  transition: transform .35s ease;
}

.trending-item:hover{ transform: translateY(-6px); }
.trending-item:hover img{ transform: scale(1.06); }

.trending-item .rank{
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-family: "Oswald", sans-serif;
  font-size: 0.95rem;
}

/* forms secundários (ex: payment) */
.payment-form{
  max-width: 720px;
  margin: 0 auto 60px;
  color: rgba(255,255,255,0.92);
}

.payment-form form{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:12px;
}

.payment-form input{
  padding:12px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color:var(--white);
  font-size:1rem;
}

/* botão final de assinatura */
.payment-form button{
  background:var(--netflix-red);
  border:none;
  color:white;
  padding:12px 18px;
  border-radius:6px;
  font-weight:700;
  cursor:pointer;
}

/* Responsividade: reduz margens em telas pequenas */
@media (max-width: 720px){
  .navbar { padding: 0 16px; }
  .hero-content { padding: 18px; gap:12px; }
  .email-form { flex-direction: column; padding: 0 8px; }
  .email-form button { width: 100%; }
  .email-form input { width: 100%; }
  .logo { height: 36px; }
}

/* ===== CHATBOT POPUP STYLES ===== */

/* Botão Flutuante do Chatbot (FAB) */
.chatbot-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

/* Janela do Chatbot */
.chatbot-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: none; /* Começa escondido */
    flex-direction: column;
    z-index: 1000;
}

.chatbot-header {
    background-color: #f5f5f5;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.chatbot-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.chatbot-body {
    padding: 15px;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message {
    background-color: #e9e9eb;
    align-self: flex-start;
    color: #333;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
}

.chatbot-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.chat-option-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.chat-option-btn:hover {
    background-color: #f0f0f0;
}

/* Estilos para a resposta formatada do Chatbot */
.chat-message p {
    margin: 0; /* Remove margem padrão do parágrafo */
}

/* ===== SCAN OVERLAY STYLES ===== */

/* Efeito de Scan */
.scan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.1);
    z-index: 1001;
    display: none; /* Começa escondido */
    overflow: hidden;
}

.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #007bff;
    box-shadow: 0 0 10px #007bff;
    animation: scan-animation 2s ease-in-out;
}

@keyframes scan-animation {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

/* ===== PHISHING ALERT POPUP STYLES ===== */

/* Container do popup de alerta */
#phishing-alert-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: auto;
    height: auto;
    background-color: transparent;
    pointer-events: auto;
    transition: opacity 0.3s ease-in-out;
}

/* Classe para esconder o popup */
.phishing-alert-hidden {
    display: none !important;
}

/* O popup em si */
#phishing-alert-popup {
    background-color: #fff;
    color: #333;
    padding: 15px 40px 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: block;
    border-left: 5px solid #dc3545;
    transition: opacity 0.3s ease-in-out;
    pointer-events: auto;
    position: relative;
    width: 300px;
    min-height: 60px;
    margin: 0;
}

#phishing-alert-popup p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

/* Botão de fechar (X) */
#phishing-alert-close-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

#phishing-alert-close-btn:hover {
    color: #333;
}

/* Força o posicionamento correto do popup */
body #phishing-alert-overlay {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    margin: 0 !important;
}

body #phishing-alert-popup {
    margin: 0 !important;
    position: relative !important;
}

/* ===== RESPONSIVE STYLES FOR POPUPS ===== */
@media (max-width: 480px) {
    .chatbot-popup {
        width: 300px;
        right: 15px;
        bottom: 80px;
    }
    
    .chatbot-fab {
        width: 50px;
        height: 50px;
        font-size: 20px;
        right: 15px;
        bottom: 15px;
    }
    
    #phishing-alert-overlay {
        top: 10px;
        right: 10px;
    }
    
    #phishing-alert-popup {
        width: 250px;
        padding: 12px 35px 12px 15px;
    }
    
    #phishing-alert-popup p {
        font-size: 14px;
    }
}
