/* =========================================
   ProduceMyVideo.ai Login - Cinematic Style
   Extracted from inline styles for CSP compliance
   ========================================= */

:root {
  --accent-teal: #14b8a6;
  --accent-amber: #f59e0b;
  --accent-glow-teal: rgba(20, 184, 166, 0.4);
  --accent-glow-amber: rgba(245, 158, 11, 0.3);
  --bg-obsidian: #030304;
  --bg-surface: #0a0a0c;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-obsidian);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Film Grain Overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

/* Cinematic Layout */
.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

@media (max-width: 968px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .cinema-hero {
    display: none;
  }
}

/* Left Hero - Cinematic Showcase */
.cinema-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, transparent 0%, rgba(3,3,4,0.6) 60%, rgba(3,3,4,0.95) 100%),
    linear-gradient(90deg, rgba(3,3,4,0.3) 0%, transparent 50%),
    url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?w=1200&q=80');
  background-size: cover;
  background-position: center;
  filter: saturate(0.8);
}

/* Anamorphic Lens Flare Effect */
.lens-flare {
  position: absolute;
  width: 300%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--accent-glow-teal), 
    var(--accent-teal), 
    var(--accent-glow-teal),
    transparent
  );
  top: 40%;
  left: -100%;
  opacity: 0.6;
  filter: blur(2px);
  animation: flareMove 8s ease-in-out infinite;
}

@keyframes flareMove {
  0%, 100% { transform: translateX(-20%); opacity: 0.4; }
  50% { transform: translateX(20%); opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-headline .highlight {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  max-width: 400px;
  line-height: 1.6;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-teal);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

/* Right Side - Login Form */
.login-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-surface);
  position: relative;
}

/* Ambient Light Glow */
.login-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow-teal), transparent 70%);
  top: -100px;
  left: -100px;
  opacity: 0.3;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.logo-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 0 40px var(--accent-glow-teal);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-text .ai {
  color: var(--accent-teal);
}

/* Form Card - Glassmorphism */
.login-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(20px);
}

.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-bottom: 2rem;
}

/* Form Steps - Progressive Disclosure */
.form-step {
  display: none;
  animation: fadeSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.form-step.active {
  display: block;
}

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

/* Input Styling - Bottom Border Only */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-field {
  width: 100%;
  padding: 1rem 0;
  font-size: 1.0625rem;
  color: #fff;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field::placeholder {
  color: rgba(255,255,255,0.3);
}

.input-field:focus {
  border-bottom-color: var(--accent-teal);
  box-shadow: 0 4px 20px -10px var(--accent-glow-teal);
}

/* Passcode Grid */
.passcode-grid {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.passcode-digit {
  width: 52px;
  height: 64px;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.passcode-digit:focus {
  border-color: var(--accent-teal);
  background: rgba(20, 184, 166, 0.08);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
  transform: scale(1.05);
}

.passcode-digit.filled {
  background: rgba(20, 184, 166, 0.1);
  border-color: var(--accent-teal);
}

/* Passcode Input Field (Single field variant) */
.passcode-input-single {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  font-weight: 600;
}

/* Cinematic Button - Rotating Gradient Border */
.btn-cinematic {
  position: relative;
  width: 100%;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--bg-obsidian);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
}

.btn-cinematic::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from 0deg,
    var(--accent-teal),
    var(--accent-amber),
    var(--accent-teal)
  );
  border-radius: 14px;
  z-index: -2;
  animation: rotateBorder 3s linear infinite;
}

.btn-cinematic::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg-obsidian);
  border-radius: 10px;
  z-index: -1;
}

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

.btn-cinematic:hover::before {
  animation-duration: 1.5s;
}

.btn-cinematic:active {
  transform: scale(0.98);
}

/* Social Login */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: rgba(255,255,255,0.3);
  font-size: 0.8125rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

.social-buttons {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
}

.social-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  filter: grayscale(1) brightness(1.5);
}

.social-btn:hover svg {
  filter: none;
}

/* Footer */
.footer-link {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.footer-link a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link a:hover {
  color: var(--accent-amber);
}

.footer-link-dimmed {
  opacity: 0.4;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--accent-teal);
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::before {
  animation: rotateBorder 1s linear infinite !important;
}

.spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* =========================================
   Additional classes for inline styles
   (Converted from style="" attributes for CSP)
   ========================================= */

/* Text styling classes */
.text-center {
  text-align: center;
}

.text-muted-light {
  color: rgba(255,255,255,0.6);
}

.text-accent {
  color: var(--accent-teal);
}

.text-success {
  color: #22c55e;
}

/* Passcode instruction text */
.passcode-instruction {
  text-align: center;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Email display text */
.email-display {
  text-align: center;
  color: var(--accent-teal);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Resend code section */
.resend-section {
  text-align: center;
  margin-top: 1rem;
}

.resend-link {
  color: var(--accent-teal);
  font-size: 0.875rem;
  text-decoration: none;
}

.resend-link:hover {
  color: var(--accent-amber);
}

.resend-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.resend-link.success {
  color: #22c55e;
}

/* Email sent notice */
.email-sent-notice {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 8px;
  display: none;
}

.email-sent-notice.visible {
  display: block;
}

.email-sent-notice p {
  margin: 0;
  font-size: 0.8125rem;
  color: #22c55e;
  text-align: center;
}

/* Error Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.modal-content h3 {
  margin-bottom: 1rem;
  color: #ef4444;
}

.modal-content p {
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,0.7);
}

.modal-close-btn {
  padding: 0.75rem 2rem;
  background: var(--accent-teal);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: var(--accent-amber);
}

/* Error icon container */
.error-icon-container {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: rgba(255,80,80,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Error title */
.error-title {
  color: #ff5050;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

/* Error message */
.error-message {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
