@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #06050b; --text: #f6f4fd; --muted: #a8a3c0; --brand: #8b5cf6; --brand-2: #ec4899;
  --line: rgba(255, 255, 255, .12); --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font-family: 'Tajawal', 'Segoe UI', system-ui, Arial, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- poster wall (visual only: no titles, no ratings) ---------- */
.wall { position: fixed; inset: -20%; z-index: 0; display: flex; gap: 18px; justify-content: center; transform: rotate(-9deg) scale(1.08); pointer-events: none; }
.wall-col { flex: 1 1 0; max-width: 230px; display: flex; flex-direction: column; gap: 18px; animation: wallUp 90s linear infinite; will-change: transform; }
.wall-col:nth-child(even) { animation-name: wallDown; animation-duration: 110s; }
.wall-col:nth-child(3n) { animation-duration: 130s; }
.tile { flex: none; aspect-ratio: 2 / 3; border-radius: 16px; background-size: cover; background-position: center; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); background-color: #17122c; background-image: linear-gradient(160deg, #2a1f55, #0e0a1d); }
@keyframes wallUp { to { transform: translateY(-50%); } }
@keyframes wallDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 50% 45%, rgba(6, 5, 11, .5), rgba(6, 5, 11, .86) 75%),
    linear-gradient(to bottom, rgba(6, 5, 11, .55), rgba(6, 5, 11, .3) 40%, rgba(6, 5, 11, .9)); }
.veil::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 80% 0, rgba(139, 92, 246, .22), transparent 70%), radial-gradient(500px 300px at 10% 100%, rgba(236, 72, 153, .16), transparent 70%); }

/* ---------- layout ---------- */
.auth-shell { position: relative; z-index: 2; min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 460px); gap: 56px; align-items: center; width: min(1180px, 100% - 48px); margin: 0 auto; padding: 36px 0; }
.brand { display: flex; width: fit-content; align-items: center; gap: 11px; font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.6px; direction: ltr; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 19px; box-shadow: 0 8px 30px rgba(139, 92, 246, .5); }
.brand-accent { background: linear-gradient(135deg, #b79bff, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-copy { animation: rise .9s var(--ease) both; }
.hero-copy .kicker { display: flex; width: fit-content; align-items: center; gap: 9px; margin: 34px 0 16px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); backdrop-filter: blur(8px); font-weight: 700; font-size: 13px; color: #d8d2f0; }
.hero-copy .kicker i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px #34d399; }
.hero-copy h2 { margin: 0 0 16px; font-size: clamp(34px, 5vw, 58px); line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }
.hero-copy h2 span { background: linear-gradient(135deg, #b79bff, #f472b6 60%, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { margin: 0 0 30px; max-width: 46ch; color: var(--muted); font-size: 17px; }
.feats { display: flex; flex-wrap: wrap; gap: 10px; }
.feats span { padding: 9px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-weight: 700; font-size: 14px; backdrop-filter: blur(8px); }

.auth-card {
  position: relative; padding: 36px 34px 30px; border-radius: 26px; background: rgba(15, 12, 28, .72); backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--line); box-shadow: 0 40px 90px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .08); animation: rise .8s .1s var(--ease) both;
}
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: 27px; padding: 1px; background: linear-gradient(140deg, rgba(139, 92, 246, .7), transparent 40%, transparent 60%, rgba(236, 72, 153, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; }
.auth-card h1 span { background: linear-gradient(135deg, #b79bff, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { margin: 0 0 24px; color: var(--muted); }

form { display: flex; flex-direction: column; }
label { font-size: 13.5px; font-weight: 700; margin: 0 0 7px; color: #e6e1f7; }
.field { position: relative; margin-bottom: 16px; }
.field input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text);
  font: 500 15px 'Tajawal', sans-serif; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: #7f7a97; }
.field input:focus { border-color: rgba(139, 92, 246, .9); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
.field input[type=email], .field input[type=password].ltr, .field input.ltr { direction: ltr; text-align: left; }
.eye { position: absolute; bottom: 0; inset-inline-end: 6px; height: 50px; width: 42px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 17px; }
.eye:hover { color: #fff; }
.field.has-eye input { padding-inline-end: 46px; }
.row { display: flex; justify-content: space-between; align-items: center; margin: -2px 0 20px; font-size: 13.5px; }
.row a { color: #c4b5fd; font-weight: 700; }
.remember { display: flex; align-items: center; gap: 9px; margin: 0; cursor: pointer; font-weight: 500; color: var(--muted); }
.remember input { accent-color: var(--brand); width: 17px; height: 17px; }
.primary-btn {
  height: 52px; border: 0; border-radius: 14px; cursor: pointer; color: #fff; font: 800 16px 'Tajawal', sans-serif; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 14px 34px rgba(139, 92, 246, .4); transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(139, 92, 246, .55); filter: brightness(1.07); }
.primary-btn:active { transform: translateY(0) scale(.99); }
.primary-btn:disabled { opacity: .6; cursor: wait; }
.ghost-btn { height: 48px; margin-top: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: 700 15px 'Tajawal', sans-serif; cursor: pointer; transition: background .2s, transform .2s var(--ease), border-color .2s; }
.ghost-btn:hover { background: rgba(255, 255, 255, .11); transform: translateY(-2px); border-color: rgba(255, 255, 255, .25); }
.form-message { min-height: 22px; margin: 14px 0 0; font-size: 13.5px; color: #fca5a5; text-align: center; opacity: 0; transition: opacity .2s; }
.guest-btn {
  width: 100%; margin-top: 12px; padding: 13px 16px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .03);
  color: #d8d2ea; font: 700 14px 'Tajawal', 'DM Sans', sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .2s, background .2s, color .2s;
}
.guest-btn:hover { border-color: rgba(139, 92, 246, .65); background: rgba(139, 92, 246, .1); color: #fff; }
.guest-btn:disabled { opacity: .6; cursor: wait; }.form-message.visible { opacity: 1; }
.form-message.ok { color: #6ee7b7; }
.separator { display: flex; align-items: center; gap: 14px; margin: 20px 0 16px; color: #7f7a97; font-size: 12.5px; }
.separator::before, .separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.switch-text { text-align: center; margin: 0; color: var(--muted); }
.switch-text a { color: #c4b5fd; font-weight: 800; }
.switch-text a:hover { color: #fff; }
.auth-foot { margin-top: 22px; text-align: center; color: #6f6a88; font-size: 12.5px; }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; gap: 26px; justify-items: center; padding: 28px 0; }
  .hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero-copy .kicker { margin-top: 22px; } .hero-copy p { font-size: 15px; margin-bottom: 18px; } .feats { justify-content: center; }
  .auth-card { width: min(460px, 100%); }
}
@media (max-width: 560px) {
  .auth-shell { width: calc(100% - 28px); padding: 22px 0; }
  .auth-card { padding: 26px 20px 22px; border-radius: 22px; }
  .hero-copy h2 { font-size: 32px; } .feats { display: none; }
  .wall { gap: 10px; } .wall-col { gap: 10px; } .tile { border-radius: 12px; }
  .wall-col:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wall-col { animation: none; } .hero-copy, .auth-card { animation: none; } }
