/* ==========================================================================
   Open Higgsfield AI - Design System (Mobile-First, Dark Futuristic)
   Strictly Zero Horizontal Scroll, Mobile-Friendly, High-Converting UI
   ========================================================================== */

:root {
  --bg-main: #090a10;
  --bg-card: #121520;
  --bg-card-hover: #181c2b;
  --bg-input: #171b29;
  --border-color: #262b3d;
  --border-focus: #7c3aed;
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.35);
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --whatsapp: #25d366;
  --instagram: #e1306c;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Estrito de Bloqueio de Scroll Horizontal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container Responsivo sem estouro */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Barra de Navegação */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 10, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 0 15px var(--accent-purple-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-purple-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #0b2210;
  font-weight: 700;
}
.btn-whatsapp:hover {
  background-color: #22bf5b;
  transform: translateY(-2px);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  font-weight: 700;
}
.btn-instagram:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.btn-danger {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
}
.btn-danger:hover {
  background-color: var(--accent-rose);
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 48px 0 32px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero h1 span {
  background: linear-gradient(135deg, #a78bfa, #38bdf8, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  max-width: 680px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Painel do Estúdio de Criação */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0;
}

@media (min-width: 900px) {
  .studio-grid {
    grid-template-columns: 420px 1fr;
  }
}

.studio-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Seletor de Movimento de Câmera (Estilo Higgsfield) */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .camera-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.camera-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  user-select: none;
}

.camera-card:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.camera-card.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: #c4b5fd;
  box-shadow: 0 0 10px var(--accent-purple-glow);
}

.camera-card .icon {
  font-size: 1.1rem;
  margin-bottom: 4px;
  display: block;
}

/* Status em Realtime & Feed de Vídeos */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Grid de Vídeos Gerados */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: #3b425b;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.video-thumb.aspect-9-16 {
  aspect-ratio: 9/16;
}

.video-thumb.aspect-1-1 {
  aspect-ratio: 1/1;
}

.video-thumb video, .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: var(--transition);
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.video-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-prompt {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.75rem;
}

.badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: capitalize;
}

.badge-status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.badge-status-processing {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.badge-camera {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

/* Barra de Progresso Realtime */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  width: 0%;
  transition: width 0.4s ease;
}

/* Botões Flutuantes de Contato Estratégico (WhatsApp e Instagram) */
.floating-contacts {
  position: fixed;
  bottom: 20px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.contact-pill.whatsapp {
  background-color: var(--whatsapp);
  color: #063514;
}

.contact-pill.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.contact-pill:hover {
  transform: translateY(-3px) scale(1.02);
}

/* Banner de Privacidade LGPD */
.lgpd-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 21, 32, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 16px;
  z-index: 1000;
  backdrop-filter: blur(12px);
  display: none;
}

.lgpd-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .lgpd-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.lgpd-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lgpd-actions {
  display: flex;
  gap: 10px;
}

/* Modal de Reprodução de Vídeo */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover {
  color: #fff;
}

/* Rodapé */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 36px 0;
  margin-top: 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
