/* =====================================================================
   ZAPFLIX — ACCOUNT PAGES (sign in, sign up, email code, password reset)
   A slow tilted wall of real posters behind a glass card; the pitch sits
   beside the card on wide screens. Same palette and pills as the rest of
   the site. Markup: includes/auth_layout.php.
   ===================================================================== */
:root {
  --za-red: #e50914;
  --za-red-pill: linear-gradient(135deg, #ff2c36 0%, #e50914 55%, #b00610 100%);
  --za-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --za-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body.zf-auth {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: #050506 !important;
  color: #f5f5f7;
  font-family: 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------ background */
.zf-auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #050506;
}
.zf-auth-wall {
  position: absolute;
  inset: -30% -12%;
  display: flex;
  gap: 18px;
  transform: rotate(-9deg);
  opacity: 0.62;
}
.zf-auth-col { flex: 1 1 0; min-width: 0; }
.zf-auth-track {
  animation: zfWallDrift 90s linear infinite;
  animation-delay: calc(var(--i, 0) * -13s);
  will-change: transform;
}
.zf-auth-col:nth-child(even) .zf-auth-track { animation-direction: reverse; animation-duration: 110s; }
.zf-auth-track img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
  border-radius: 14px;
  object-fit: cover;
  background: #141418;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
@keyframes zfWallDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}
.zf-auth-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 12% 110%, rgba(229, 9, 20, 0.28), transparent 60%),
    linear-gradient(90deg, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.62) 42%, rgba(5, 5, 6, 0.78) 70%, rgba(5, 5, 6, 0.94) 100%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.75) 0%, rgba(5, 5, 6, 0.15) 30%, rgba(5, 5, 6, 0.2) 70%, rgba(5, 5, 6, 0.92) 100%);
}
html[dir="rtl"] .zf-auth-shade {
  background:
    radial-gradient(900px 600px at 88% 110%, rgba(229, 9, 20, 0.28), transparent 60%),
    linear-gradient(270deg, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.62) 42%, rgba(5, 5, 6, 0.78) 70%, rgba(5, 5, 6, 0.94) 100%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.75) 0%, rgba(5, 5, 6, 0.15) 30%, rgba(5, 5, 6, 0.2) 70%, rgba(5, 5, 6, 0.92) 100%);
}
html[dir="rtl"] .zf-auth-wall { transform: rotate(9deg); }
.zf-auth-bg.is-plain .zf-auth-shade {
  background:
    radial-gradient(700px 500px at 15% 0%, rgba(229, 9, 20, 0.22), transparent 65%),
    radial-gradient(800px 600px at 90% 100%, rgba(229, 9, 20, 0.16), transparent 65%),
    #050506;
}

/* ---------------------------------------------------------------- header */
.zf-auth-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 6%;
}
.zf-auth-logo {
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-decoration: none;
  background: linear-gradient(135deg, #ff6b72 0%, #e50914 52%, #9e0610 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--za-red);
  filter: drop-shadow(0 2px 14px rgba(229, 9, 20, 0.4));
}
.zf-auth-lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.zf-auth-lang a {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.zf-auth-lang a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.zf-auth-lang a.is-active { color: #0a0a0b; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }

/* ---------------------------------------------------------------- layout */
.zf-auth-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 460px);
  align-items: center;
  gap: 7vw;
  max-width: 1360px;
  min-height: calc(100vh - 96px);
  min-height: calc(100dvh - 96px);
  margin: 0 auto;
  padding: 0 6% 7vh;
  box-sizing: border-box;
}
.zf-auth-main.is-single { grid-template-columns: minmax(0, 480px); justify-content: center; }

/* pitch */
.zf-auth-pitch { max-width: 600px; animation: zfAuthIn 0.8s var(--za-ease-out) both; }
.zf-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff5a62;
}
.zf-auth-kicker::before { content: ''; width: 26px; height: 3px; border-radius: 3px; background: var(--za-red); }
html[dir="rtl"] .zf-auth-kicker { letter-spacing: 0; }
.zf-auth-pitch h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
html[dir="rtl"] .zf-auth-pitch h2 { letter-spacing: 0; line-height: 1.25; }
.zf-auth-sub { margin: 0 0 30px; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.72); }
.zf-auth-pitch ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.zf-auth-pitch li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 600; color: rgba(255, 255, 255, 0.88); }
.zf-auth-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--za-red-pill);
  box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

/* card */
.zf-auth-card {
  position: relative;
  padding: 40px 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(16, 16, 20, 0.74);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: zfAuthIn 0.7s var(--za-ease-out) 0.08s both;
}
@keyframes zfAuthIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.zf-auth-card h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; color: #fff; }
html[dir="rtl"] .zf-auth-card h1 { letter-spacing: 0; }
.zf-auth-lead { margin: 0 0 24px; font-size: 14.5px; color: rgba(255, 255, 255, 0.62); }
.zf-auth .alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 14px !important; font-size: 13.5px; line-height: 1.5; }

.zf-auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--za-ease), box-shadow 0.2s, background 0.2s;
}
.zf-auth-google:hover { background: #f2f2f2; transform: translateY(-1px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45); }
.zf-auth-google:active { transform: scale(0.98); }

.zf-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.zf-auth-divider::before,
.zf-auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.12); }

/* fields (floating labels from css/style.css, restyled) */
.zf-auth .form-group { position: relative; margin-bottom: 14px; }
.zf-auth .form-group input {
  width: 100%;
  height: 58px;
  padding: 22px 16px 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.zf-auth .form-group input:hover { border-color: rgba(255, 255, 255, 0.22) !important; }
.zf-auth .form-group input:focus {
  outline: none;
  border-color: rgba(229, 9, 20, 0.75) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.18) !important;
}
.zf-auth .form-group.has-toggle input { padding-inline-end: 54px !important; }
.zf-auth .form-group label {
  left: auto;
  inset-inline-start: 17px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
}
.zf-auth .form-group input:focus + label,
.zf-auth .form-group input:not(:placeholder-shown) + label {
  top: 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}
.zf-auth .form-group input:focus + label { color: #ff6b72; }
.zf-auth .form-group input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 40px #1b1b20 inset !important;
  caret-color: #fff;
}

.zf-pass-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s, color 0.2s;
}
.zf-pass-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.zf-pass-toggle .zf-eye-closed,
.zf-pass-toggle[aria-pressed="true"] .zf-eye-open { display: none; }
.zf-pass-toggle[aria-pressed="true"] .zf-eye-closed { display: block; }

/* password rule + meter (sign up) */
.zf-auth .password-rules {
  margin: -2px 2px 16px;
  padding: 0;
  border: 0;
  background: none;
}
.zf-pass-meter { height: 4px; margin-bottom: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.zf-pass-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: #ff5a5f; transition: width 0.3s var(--za-ease), background 0.3s; }
.zf-pass-meter span.is-weak { background: #ff5a5f; }
.zf-pass-meter span.is-ok { background: #f5b301; }
.zf-pass-meter span.is-strong { background: #3ddc84; }
.zf-pass-meter span.is-bad { background: #e50914; }
.zf-auth .password-rules p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6) !important;
}
.zf-auth .password-rules .rule-icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  transition: background 0.2s, box-shadow 0.2s;
}
.zf-auth .password-rules p.ok { color: #7ee2a8 !important; }
.zf-auth .password-rules p.ok .rule-icon {
  background: #1fa855 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: none;
}
.zf-auth .password-match-msg { min-height: 18px; margin: -6px 2px 12px; font-size: 12.5px; font-weight: 600; }
.zf-auth .password-match-msg.is-ok { color: #7ee2a8; }
.zf-auth .password-match-msg.is-bad { color: #ff8b93; }

.zf-auth-row { display: flex; justify-content: flex-end; margin: -2px 2px 18px; }
.zf-auth-link,
.zf-auth .switch-text a {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.zf-auth-link:hover { color: #fff; text-decoration: underline; }

/* buttons */
.zf-auth .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  border-radius: 999px !important;
  font-size: 15.5px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.zf-auth .btn-primary,
.zf-auth .zf-auth-submit {
  min-height: 54px;
  border: 0 !important;
  background: var(--za-red-pill) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(229, 9, 20, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.2s var(--za-ease), box-shadow 0.2s, filter 0.2s;
}
.zf-auth .btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 18px 40px rgba(229, 9, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important; }
.zf-auth .btn-primary:active { transform: scale(0.98); }
.zf-auth .btn-primary:disabled { filter: grayscale(0.4); transform: none; }
.zf-auth .btn-outline {
  border: 0 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}
.zf-auth .btn-outline:hover { background: rgba(255, 255, 255, 0.14) !important; }

.zf-auth-switch,
.zf-auth .switch-text {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
.zf-auth-switch a { color: #fff; font-weight: 800; text-decoration: none; }
.zf-auth-switch a:hover { color: #ff6b72; }

.zf-auth a:focus-visible,
.zf-auth button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .zf-auth-main { gap: 5vw; padding-inline: 5%; }
  .zf-auth-pitch h2 { font-size: clamp(34px, 4vw, 48px); }
}
@media (max-width: 900px) {
  .zf-auth-main { grid-template-columns: minmax(0, 480px); justify-content: center; min-height: 0; padding: 4px 16px 40px; }
  .zf-auth-pitch { display: none; }
  .zf-auth-top { padding: calc(16px + env(safe-area-inset-top, 0px)) 18px 18px; }
  .zf-auth-logo { font-size: 27px; }
  .zf-auth-wall { inset: -20% -40%; gap: 12px; opacity: 0.5; }
  .zf-auth-col:nth-child(n+5) { display: none; }
  .zf-auth-shade { background: linear-gradient(180deg, rgba(5, 5, 6, 0.55) 0%, rgba(5, 5, 6, 0.82) 40%, rgba(5, 5, 6, 0.96) 100%); }
  html[dir="rtl"] .zf-auth-shade { background: linear-gradient(180deg, rgba(5, 5, 6, 0.55) 0%, rgba(5, 5, 6, 0.82) 40%, rgba(5, 5, 6, 0.96) 100%); }
}
@media (max-width: 520px) {
  .zf-auth-card { padding: 28px 20px 24px; border-radius: 24px; }
  .zf-auth-card h1 { font-size: 27px; }
  .zf-auth-lead { margin-bottom: 20px; }
  .zf-auth-lang a { min-width: 36px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .zf-auth-track { animation: none; }
  .zf-auth-card, .zf-auth-pitch { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .zf-auth-card { background: #141418; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* "By continuing you agree to the Terms / Privacy Policy" (includes/legal.php). */
.zf-legal-consent { margin: 14px 0 0; color: #9a9aa6; font-size: 12.5px; line-height: 1.6; text-align: center; }
.zf-legal-consent a { color: #d8d8e0; text-decoration: underline; text-underline-offset: 2px; }
.zf-legal-consent a:hover { color: #fff; }