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

:root {
  --brand: #c90002;
  --brand-dark: #a10002;
  --brand-glow: rgba(201, 0, 2, 0.25);
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: #000;
}

/* ── LAYOUT ── */
.auth-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-family: "DM Sans", sans-serif;
}

/* ── LEFT CINEMATIC PANEL ── */
.cinema-panel {
  position: relative;
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #070707;
}

/* Animated film strip top/bottom borders */
.cinema-panel::before,
.cinema-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  background: repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 16px,
    transparent 16px,
    transparent 28px
  );
  z-index: 10;
}
.cinema-panel::before {
  top: 0;
}
.cinema-panel::after {
  bottom: 0;
}

.film-perfs {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  z-index: 12;
  padding: 36px 0;
}
.film-perfs.left {
  left: 0;
}
.film-perfs.right {
  right: 0;
}
.perf {
  width: 14px;
  height: 20px;
  background: #000;
  border-radius: 3px;
  margin: auto;
  opacity: 0.8;
}

/* Animated vertical scan line */
@keyframes scanline {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200vw);
  }
}
.scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(201, 0, 2, 0.4),
    transparent
  );
  animation: scanline 4s linear infinite;
  z-index: 5;
  pointer-events: none;
}

/* Red glow orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(201, 0, 2, 0.18);
  top: -80px;
  left: -80px;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(201, 0, 2, 0.1);
  bottom: 40px;
  right: -60px;
}

/* Noise grain */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Diagonal stripe */
.stripe {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 4px,
    rgba(255, 255, 255, 0.009) 4px,
    rgba(255, 255, 255, 0.009) 8px
  );
}

/* Ticker */
@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Main content inside cinema panel */
.cinema-content {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px 40px 80px;
}

/* Logo top-left */
.cinema-logo img {
  height: 80px;
  width: auto;
}

/* Hero text */
.cinema-hero {
  margin-top: auto;
  margin-bottom: 32px;
}
.cinema-tagline {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cinema-tagline::after {
  content: "";
  display: block;
  height: 1px;
  width: 60px;
  background: var(--brand);
  opacity: 0.6;
}

.cinema-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 0.9;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.cinema-title .accent {
  color: var(--brand);
}

/* Toggle pill */
.role-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  backdrop-filter: blur(8px);
  margin-bottom: 28px;
}
.role-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 6px 20px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.role-btn.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.role-btn:hover:not(.is-active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Feature panels */
.panels-wrap {
  position: relative;
  min-height: 120px;
}
.features-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(14px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  pointer-events: none;
}
.features-panel.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

/* Typing lines */
.typing-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.typing-line {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  min-height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  padding-right: 5px;
  width: fit-content;
  animation: blink-caret 0.8s step-end infinite;
  display: flex;
  align-items: center;
}
.typing-line::before {
  content: "→";
  color: var(--brand);
  margin-right: 8px;
  font-size: 10px;
  flex-shrink: 0;
}
@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
}

/* Bottom brand line */
.cinema-footer {
  position: absolute;
  bottom: 36px;
  left: 40px;
  right: 40px;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cinema-footer-brand {
  font-family: "DM Mono", monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ── RIGHT FORM PANEL ── */
.form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #f8f8f6;
  position: relative;
}

/* Subtle background texture on form side */
.form-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(201, 0, 2, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

.form-inner {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 420px;
  padding: 48px 32px;
}

/* Slide-in animation for form */
@keyframes slideInForm {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.form-inner {
  animation: slideInForm 0.6s cubic-bezier(0.33, 1, 0.68, 1) both 0.1s;
}

.form-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.form-logo img {
  height: 80px;
  width: auto;
}

.form-heading {
  text-align: center;
  margin-bottom: 28px;
}
.form-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  color: #0f0f0f;
  line-height: 1;
  margin-bottom: 8px;
}
.form-sub {
  font-size: 13px;
  color: #94a3b8;
  font-family: "DM Sans", sans-serif;
}
.form-sub a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.form-sub a:hover {
  text-decoration: underline;
}

/* Alert */
.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(201, 0, 2, 0.07);
  border: 1px solid rgba(201, 0, 2, 0.2);
  color: #c90002;
  font-size: 13px;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fields */
.field-group {
  margin-bottom: 18px;
}
.field-label {
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #94a3b8;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.field-group:focus-within .field-label {
  color: var(--brand);
}

.field-input-wrap {
  position: relative;
}
.field-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
}
.field-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(201, 0, 2, 0.07);
}
.field-input::placeholder {
  color: #cbd5e1;
}

/* Password toggle */
.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  transition: color 0.2s;
  display: flex;
}
.pw-toggle:hover {
  color: var(--brand);
}

/* Forgot link */
.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 20px;
}
.forgot-link {
  font-size: 12px;
  color: #94a3b8;
  font-family: "DM Sans", sans-serif;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover {
  color: var(--brand);
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  border: none;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.btn-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}
.btn-submit:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}
.btn-submit:active {
  transform: scale(0.98);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.auth-divider-text {
  font-family: "DM Mono", monospace;
  font-size: 9px;
  color: #cbd5e1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Google button */
.btn-google {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  border: 1.5px solid #e2e8f0;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-google:hover {
  border-color: #c90002;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.btn-google img {
  width: 18px;
  height: 18px;
}

/* Form footer */
.form-footer {
  text-align: center;
  margin-top: 32px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  color: #cbd5e1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cinema-panel {
    display: none;
  }
  .form-panel {
    background: #0a0a0a;
  }
  .form-panel::before {
    background-image: radial-gradient(
      rgba(201, 0, 2, 0.06) 1px,
      transparent 1px
    );
    background-size: 24px 24px;
  }
  .form-title {
    color: #fff;
  }
  .form-sub {
    color: rgba(255, 255, 255, 0.4);
  }
  .field-input {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
  }
  .field-input:focus {
    background: #1e1e22;
  }
  .btn-google {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
  }
  .auth-divider-line {
    background: rgba(255, 255, 255, 0.08);
  }
}

.ott-form-note {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(201, 0, 2, 0.06);
  border: 1px solid rgba(201, 0, 2, 0.16);
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: #71717a;
  line-height: 1.55;
  text-align: center;
}

.dark .ott-form-note {
  color: #a1a1aa;
}

.ott-form-note a {
  color: #c90002;
  font-weight: 600;
  text-decoration: none;
}

.ott-form-note a:hover {
  text-decoration: underline;
}

.ott-secondary-link {
  margin-top: 18px;
  text-align: center;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: #71717a;
}

.ott-secondary-link a {
  color: #c90002;
  font-weight: 600;
  text-decoration: none;
}

.ott-secondary-link a:hover {
  text-decoration: underline;
}

.btn-submit.is-loading,
.btn-submit:disabled {
  pointer-events: none !important;
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.btn-submit .btn-spinner {
  display: none;
}
.btn-submit.is-loading .btn-spinner {
  display: block;
  animation: btn-spin 0.8s linear infinite;
}
.btn-submit.is-loading .btn-icon-default,
.btn-submit.is-loading .btn-text {
  display: none;
}
@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}
