*{box-sizing:border-box;margin:0;padding:0;}
html,body{min-height:100%;}
html{overflow-x:hidden;}
body.auth-page{
  overflow-x:hidden;
  max-width:100%;
  overscroll-behavior-x:none;
  touch-action:pan-y pinch-zoom;
}
body{background:#000;font-family:-apple-system,system-ui,sans-serif;color:#fff;}

.page{
  width:100%;
  min-height:100vh;
  height:100vh;
  min-height:600px;
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:1fr 440px;
}

.left{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:0 56px;
}
@media (min-width:901px){
  .left{min-height:100vh;}
}

.poster-grid{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:repeat(6,1fr);
  grid-template-rows:repeat(4,1fr);
  gap:4px;
  padding:4px;
  transform:rotate(-2deg) scale(1.06);
}
.pslot{position:relative;border-radius:6px;overflow:hidden;background:#111;}
.pslot img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:opacity 1.2s ease;border-radius:6px;}
.pslot img.hidden{opacity:0;}
.pslot img.visible{opacity:1;}

.film-vignette{
  position:absolute;
  inset:0;
  z-index:1;
  background:radial-gradient(ellipse at 35% 50%, rgba(0,0,0,.1) 0%, rgba(0,0,0,.75) 100%);
}
.film-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(to right, rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,.4) 52%, rgba(0,0,0,.99) 100%);
}

.left-content{position:relative;z-index:3;}
.left-logo{font-size:11px;font-weight:500;letter-spacing:.5em;color:rgba(255,255,255,.38);margin-bottom:28px;}
.left-headline{font-size:46px;font-weight:700;line-height:1.1;letter-spacing:-.7px;margin-bottom:14px;}
.left-headline em{color:rgba(255,255,255,.26);font-style:normal;display:block;}
.left-sub{font-size:15px;color:rgba(255,255,255,.36);line-height:1.65;max-width:340px;margin-bottom:30px;}

.left-sub--short,
.f-sub--login-mobile,
.f-sub--reg-mobile{display:none;}
.auth-ticker{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:10px 20px;
  border-radius:100px;
  background:rgba(255,255,255,.07);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:0.5px solid rgba(255,255,255,.13);
}
.auth-tick-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#ff453a;
  animation:auth-tick-pulse 1.8s infinite;
  flex-shrink:0;
}
@keyframes auth-tick-pulse{
  0%,100%{opacity:1;}
  50%{opacity:.25;}
}
.auth-tick-lbl{font-size:12px;color:rgba(255,255,255,.36);}
.auth-tick-title{font-size:12px;font-weight:500;color:rgba(255,255,255,.82);}

.right{
  position:relative;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 36px;
}
.form-wrap{
  width:100%;
  max-width:none;
  background:rgba(7,7,7,.99);
  backdrop-filter:blur(48px) saturate(160%);
  -webkit-backdrop-filter:blur(48px) saturate(160%);
  border-radius:26px;
  border:0.5px solid rgba(255,255,255,.21);
  padding:32px 30px 36px;
  box-shadow:0 20px 60px rgba(54,54,54,.55), inset 0 1px 0 rgba(255,255,255,.08);
}
.f-logo{font-size:10px;font-weight:500;letter-spacing:.45em;color:rgba(255,255,255,.2);text-align:center;margin-bottom:26px;}
.form-tabs{
  display:flex;
  background:rgba(255,255,255,.06);
  border-radius:25px;
  padding:3px;
  margin-bottom:24px;
  border:0.5px solid rgba(255,255,255,.08);
}
.ftab{flex:1;padding:9px;border-radius:25px;font-size:14px;font-weight:500;text-align:center;cursor:pointer;color:rgba(255,255,255,.28);transition:all .22s;border:none;background:transparent;font-family:inherit;}
.ftab.on{background:rgba(255,255,255,.1);color:#fff;box-shadow:0 1px 10px rgba(0,0,0,.5);}
.f-title{font-size:20px;font-weight:700;letter-spacing:-.3px;margin-bottom:4px;}
.f-sub{font-size:12px;color:rgba(255,255,255,.28);margin-bottom:20px;line-height:1.5;}
.field{margin-bottom:11px;}
.flabel{font-size:10px;font-weight:500;color:rgba(255,255,255,.26);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px;}
.finput{
  width:100%;
  background:rgba(255,255,255,.07);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:0.5px solid rgba(255,255,255,.11);
  border-radius:25px;
  padding:12px 14px;
  font-size:14px;
  color:#fff;
  font-family:inherit;
  outline:none;
  transition:all .2s;
}
.finput:focus{
  border-color:rgba(255,255,255,.32);
  background:rgba(255,255,255,.1);
  box-shadow:0 0 0 3px rgba(255,255,255,.05);
}
.finput::placeholder{color:rgba(255,255,255,.17);}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.forgot{font-size:12px;color:rgba(255,255,255,.3);text-align:right;cursor:pointer;margin-top:-7px;margin-bottom:16px;border:none;background:none;font-family:inherit;padding:0;width:100%;font-weight:500;transition:color .15s;}
.forgot:hover{color:rgba(255,255,255,.6);}
.main-btn{
  width:100%;
  padding:13px;
  border-radius:25px;
  background:rgba(255,255,255,.11);
  backdrop-filter:blur(20px);
  border:0.5px solid rgba(255,255,255,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.11);
  color:#fff;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  font-family:inherit;
  transition:all .2s;
}
.main-btn:hover{background:rgba(255,255,255,.17);border-color:rgba(255,255,255,.28);}
.main-btn:disabled{opacity:.45;cursor:not-allowed;}
#fReg .main-btn{margin-top:14px;}
.str-bars{display:flex;gap:4px;margin-top:8px;}
.sb{flex:1;height:3px;border-radius:2px;background:rgba(255,255,255,.07);transition:background .3s;}
.sb.w{background:#E24B4A;}.sb.m{background:#EF9F27;}.sb.s{background:#1D9E75;}
.str-lbl{font-size:10px;margin-top:4px;font-weight:500;}
.terms{display:flex;align-items:flex-start;gap:9px;margin:12px 0 5px;}
.auth-legal-overlay{
  position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;
  padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));box-sizing:border-box;
}
.auth-legal-overlay.open{display:flex;}
.auth-legal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(8px);}
.auth-legal-dialog{
  position:relative;z-index:1;width:100%;max-width:420px;max-height:min(78vh,560px);
  display:flex;flex-direction:column;background:#121214;border:0.5px solid rgba(255,255,255,.12);
  border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.55);overflow:hidden;
}
.auth-legal-close{
  position:absolute;top:10px;right:10px;width:34px;height:34px;border:none;border-radius:10px;
  background:rgba(255,255,255,.08);color:rgba(255,255,255,.55);font-size:22px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;padding:0;font-family:inherit;
}
.auth-legal-close:hover{color:#fff;background:rgba(255,255,255,.12);}
.auth-legal-title{
  font-size:16px;font-weight:600;color:#fff;padding:20px 48px 10px 20px;margin:0;letter-spacing:-.02em;line-height:1.25;
}
.auth-legal-body{
  font-size:13px;line-height:1.55;color:rgba(255,255,255,.58);padding:4px 20px 22px;overflow-y:auto;-webkit-overflow-scrolling:touch;
  flex:1;min-height:0;
}
.chk{width:17px;height:17px;border-radius:5px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.05);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px;transition:all .2s;}
.chk.on{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.38);}
.chk svg{width:9px;height:9px;stroke:#fff;fill:none;stroke-width:2.5;}
.terms-txt{font-size:11px;color:rgba(255,255,255,.26);line-height:1.5;}
.terms-txt button{color:rgba(255,255,255,.45);cursor:pointer;background:none;border:none;padding:0;font:inherit;text-decoration:underline;text-underline-offset:2px;}
.switch-hint{font-size:12px;color:rgba(255,255,255,.22);text-align:center;margin-top:16px;}
.switch-hint--login{margin-top:24px;}
.switch-hint button{color:rgba(255,255,255,.5);cursor:pointer;background:none;border:none;padding:0;font:inherit;font-weight:500;}
.switch-hint button:hover{color:#fff;}
.sheet-handle{display:none;}

#toastEl{
  position:fixed;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%) translateY(16px);
  background:#18181b;border:0.5px solid rgba(255,255,255,.1);border-radius:12px;padding:10px 18px;font-size:12px;color:#fff;
  opacity:0;transition:all .25s;pointer-events:none;white-space:nowrap;z-index:999;max-width:min(90vw,420px);text-align:center;
}

@media (max-width:900px){
  .auth-page .page{
    position:relative;
    display:flex;
    flex-direction:column;
    height:100vh;
    overflow:hidden;
    min-height:100vh;
    min-height:100dvh;
    min-height:-webkit-fill-available;
  }
  .auth-page .left{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    z-index:1;
  }
  .auth-page .poster-grid{
    grid-template-columns:repeat(3,1fr);
    grid-template-rows:repeat(5,1fr);
    gap:3px;
    padding:3px;
    transform:rotate(-5deg) scale(1.15);
    filter:none;
  }
  .auth-page .pslot{border-radius:4px;}
  .auth-page .pslot img{border-radius:4px;}
  .auth-page .film-overlay{
    background:
      linear-gradient(to bottom, rgba(0,0,0,.58) 0%, rgba(0,0,0,0.39) 28%, rgba(0,0,0,0.4) 46%, rgba(0,0,0,.72) 68%, rgba(0,0,0,.97) 100%),
      radial-gradient(ellipse at 35% 14%, rgba(0,0,0,.38) 0%, rgba(0,0,0,0.59) 58%);
  }
  .auth-page .film-vignette{opacity:0;pointer-events:none;}
  .auth-page .left-content{
    position:fixed;
    left:28px;
    right:28px;
    top:max(64px,env(safe-area-inset-top));
    z-index:4;
    text-shadow:0 2px 12px rgba(0,0,0,.48);
  }

  .left-sub--full{display:none!important;}
  .auth-ticker{display:flex!important;}

  .left-logo{font-size:11px;letter-spacing:.5em;margin-bottom:16px;}
  .left-headline{font-size:32px;line-height:1.12;letter-spacing:-.5px;margin-bottom:10px;}
  .left-sub--short{
    display:block!important;
    font-size:13px;
    line-height:1.65;
    margin-bottom:16px;
    max-width:320px;
  }

  .auth-ticker{
    align-items:center;
    gap:8px;
    padding:9px 18px;
    border-radius:100px;
    background:rgba(255,255,255,.08);
    border:0.5px solid rgba(255,255,255,.15);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    width:fit-content;
    max-width:100%;
    margin-bottom:24px;
  }
  .auth-tick-dot{
    width:6px;height:6px;border-radius:50%;
    background:#ff453a;
    flex-shrink:0;
    animation:auth-tick-pulse 1.8s infinite;
  }
  .auth-tick-lbl{font-size:11px;color:rgba(255,255,255,.4);flex-shrink:0;}
  .auth-tick-title{
    font-size:11px;font-weight:500;color:rgba(255,255,255,.85);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;
  }

  .auth-page .right{
    flex:0 0 auto;
    margin-top:auto;
    width:100%;
    border-top:0.5px solid rgba(255,255,255,.4);
    border-left:0.5px solid rgba(255,255,255,.3);
    border-right:0.5px solid rgba(255,255,255,.3);
    border-radius:36px 36px 0 0;
    background:rgba(0,0,0,.1);
    backdrop-filter:blur(5px) saturate(160%);
    -webkit-backdrop-filter:blur(40px) saturate(160%);
    padding:28px 24px max(48px,env(safe-area-inset-bottom));
    align-items:stretch;
    justify-content:flex-start;
    position:relative;
    z-index:3;
    transform:translateY(0);
    transition:transform .4s cubic-bezier(.32,.72,0,1);
    will-change:transform;
  }
  .auth-page .right.is-dragging{transition:none;}
  .auth-page .f-logo{display:none;}
  .auth-page .form-wrap{
    max-width:none;
    background:transparent;
    border:none;
    box-shadow:none;
    padding:0;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  /* Видимая полоска 36×4 как раньше; увеличенная зона касания — за счёт padding */
  .auth-page .sheet-handle{
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 auto 24px;
    padding:14px 56px;
    width:max-content;
    max-width:100%;
    box-sizing:border-box;
    background:transparent;
    border-radius:999px;
    touch-action:none;
    cursor:grab;
    -webkit-tap-highlight-color:transparent;
  }
  .auth-page .sheet-handle::after{
    content:'';
    display:block;
    width:36px;
    height:4px;
    border-radius:2px;
    background:rgba(255,255,255,.18);
  }
  .auth-page .sheet-handle:active{
    cursor:grabbing;
  }
  .auth-page .form-tabs{
    background:rgba(255,255,255,.06);
    backdrop-filter:blur(20px);
    border-radius:25px;
    padding:3px;
    margin-bottom:26px;
    border:0.5px solid rgba(255,255,255,.09);
  }
  .auth-page .ftab{
    border-radius:25px;
    padding:10px;
  }
  .auth-page .ftab.on{
    background:rgba(255,255,255,.1);
    box-shadow:0 1px 8px rgba(0,0,0,.4);
  }

  .f-sub--login-desktop,
  .f-sub--reg-desktop{display:none!important;}
  .f-sub--login-mobile,
  .f-sub--reg-mobile{display:block!important;}

  .auth-page .f-title{font-size:22px;font-weight:700;letter-spacing:-.4px;margin-bottom:5px;}
  .auth-page .f-sub{font-size:13px;color:rgba(255,255,255,.3);margin-bottom:24px;}
  .auth-page .flabel{font-size:11px;margin-bottom:7px;}
  .auth-page .finput{
    background:rgba(255,255,255,.07);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border:0.5px solid rgba(255,255,255,.12);
    border-radius:25px;
    padding:15px 16px;
    font-size:15px;
  }
  .auth-page .finput:focus{
    border-color:rgba(255,255,255,.35);
    background:rgba(255,255,255,.1);
    box-shadow:0 0 0 3px rgba(255,255,255,.06);
  }
  .auth-page .finput::placeholder{color:rgba(255,255,255,.18);}
  .auth-page .field{margin-bottom:13px;}
  .auth-page .forgot{
    color:rgba(255,255,255,.35);
    margin-top:-8px;
    margin-bottom:18px;
    font-weight:500;
  }
  .auth-page .main-btn{
    padding:16px;
    border-radius:25px;
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border:0.5px solid rgba(255,255,255,.2);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
    font-size:16px;
  }
  .auth-page .terms{margin:14px 0 6px;}
  .auth-page .chk{
    width:20px;height:20px;border-radius:7px;
    border:1.5px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.05);
  }
  .auth-page .chk.on{
    background:rgba(255,255,255,.18);
    border-color:rgba(255,255,255,.4);
    box-shadow:0 0 0 2px rgba(255,255,255,.07);
  }
  .auth-page #fReg .main-btn{margin-top:12px!important;}
  .auth-page .switch-hint,
  .auth-page .switch-hint--login{
    margin-top:20px;
    font-size:13px;
    color:rgba(255,255,255,.22);
  }
  .auth-page .main-btn:active{transform:scale(.98);}

  .field-row{grid-template-columns:1fr;}
}
