:root {
  --color-bg: #030712;
  --color-primary: #f27435;
  --color-primary-hover: #e0632a;
  --color-secondary: rgba(255, 255, 255, 0.05);
  --color-secondary-hover: rgba(255, 255, 255, 0.1);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-text-main: #f9fafb;
  --color-text-muted: #9ca3af;
  
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-blur: blur(24px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Blobs for modern sleekness */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-ambient::before,
.bg-ambient::after {
  content: '';
  position: absolute;
  width: 50vw;
  height: 50vw;
  min-width: 400px;
  min-height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: float 20s infinite alternate ease-in-out;
}

.bg-ambient::before {
  top: -10%;
  left: -10%;
  background-color: #1e3a8a; /* Deep blue */
}

.bg-ambient::after {
  bottom: -10%;
  right: -10%;
  background-color: #064e3b; /* Subtle green/teal */
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10%, 15%) scale(1.1); }
  100% { transform: translate(-5%, 5%) scale(0.9); }
}

/* Main Container - Glassmorphism */
.main-wrapper {
  padding: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Top accent line on card */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
}

.logo-container {
  margin-bottom: 32px;
}

.logo-container img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.welcome-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.welcome-text p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 40px;
  font-weight: 300;
}

/* Buttons */
.buttons-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  outline: none;
  font-family: inherit;
}

.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Secondary Button (Instructions) */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-hover);
  transform: translateY(-2px);
}

/* Primary Button (Access Room) */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3b82f6 100%);
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

/* Pulse animation for primary button */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.btn-primary {
  animation: pulse 2.5s infinite;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 20px;
  width: 100%;
  max-width: 400px; /* Ajustado para vídeo vertical */
  max-height: 90vh; /* Não ultrapassar a altura da tela */
  overflow: hidden;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: var(--glass-border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: white;
}

.modal-body {
  padding: 0;
  position: relative;
  width: 100%;
  flex-grow: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16; /* Proporção Vertical */
}

.modal-body iframe, 
.modal-body video {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover; /* Faz o vídeo preencher o espaço vertical */
}

/* Monitor maior / Desktop */
@media (min-width: 1024px) {
  .modal-content {
    max-width: 56.25vh; /* Largura proporcional à altura 9:16 (100 / 16 * 9) */
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .modal-body {
    aspect-ratio: auto;
    height: calc(100vh - 56px); /* Ajuste para o header */
  }
}

@media (max-width: 480px) {
  .glass-card {
    padding: 32px 24px;
  }
  
  .welcome-text h1 {
    font-size: 24px;
  }
}
