:root {
  --page-black: #000;
  --surface: #1d1d1f;
  --surface-deep: #1c1c1e;
  --surface-input: #27272a;
  --line: #3f3f44;
  --text: #f5f5f7;
  --muted: #9b9ba1;
  --subtle: #5d5d63;
  --blue: #0a84ff;
  --blue-deep: #174d82;
  --green: #16d347;
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-black);
}

body {
  margin: 0;
  overflow-x: hidden;
}

body,
input,
button {
  font-family: var(--font-system);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  position: relative;
  background: var(--page-black);
}

.screen {
  min-height: 100vh;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  transform: translateY(10px) scale(0.992);
  transition:
    opacity 260ms ease,
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  transform: translateY(0) scale(1);
}

.screen-join {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 48px 20px 104px;
}

.join-card {
  align-items: center;
  animation: riseIn 520ms ease both;
  display: flex;
  flex-direction: column;
  margin-bottom: 4vh;
  max-width: 300px;
  width: 100%;
}

.facetime-icon {
  align-items: center;
  background: linear-gradient(180deg, #51f36f 0%, #02c43b 100%);
  border-radius: 17px;
  box-shadow: 0 18px 45px rgb(0 0 0 / 32%);
  display: flex;
  height: 80px;
  justify-content: center;
  margin-bottom: 28px;
  width: 80px;
}

.facetime-icon > span {
  background: #f8f8f8;
  display: block;
  position: absolute;
}

.facetime-icon {
  position: relative;
}

.camera-body {
  border-radius: 9px;
  height: 35px;
  transform: translateX(-8px);
  width: 39px;
}

.camera-lens {
  border-radius: 5px;
  clip-path: polygon(0 34%, 76% 0, 100% 12%, 100% 88%, 76% 100%, 0 66%);
  height: 29px;
  transform: translate(20px, 0);
  width: 20px;
}

.join-title {
  color: var(--text);
  font-size: 32px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 17px;
  text-align: center;
}

.join-copy {
  color: #e8e8ec;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 29px;
  text-align: center;
}

.primary-button,
.secondary-button {
  align-items: center;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 650;
  height: 56px;
  justify-content: center;
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
  width: 100%;
}

.primary-button {
  background: var(--green);
  box-shadow: 0 12px 28px rgb(22 211 71 / 22%);
  color: white;
}

.primary-button:hover {
  background: #20df51;
}

.primary-button:active,
.secondary-button:active,
.icloud-logo a:active,
.help-menu-button:active {
  transform: translateY(1px);
}

.legal-footer {
  bottom: 25px;
  color: #515157;
  font-size: 12px;
  left: 0;
  line-height: 1.65;
  padding: 0 20px;
  position: absolute;
  text-align: center;
  width: 100%;
}

.legal-footer nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0 9px;
  justify-content: center;
  margin: 0 auto;
  max-width: 760px;
}

.legal-footer a {
  transition: color 150ms ease;
}

.legal-footer a:hover {
  color: #73737a;
}

.legal-footer span {
  color: #36363b;
}

.legal-footer p {
  margin: 0;
}

.screen-login {
  background: #1f1f20;
  color: var(--text);
  overflow: auto;
  padding: 88px 24px 64px;
}

.cloudos-toolbar {
  align-items: center;
  display: flex;
  height: 52px;
  justify-content: space-between;
  left: 0;
  padding: 0 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
}

.cloudos-toolbar.overlay {
  background: rgb(31 31 32 / 72%);
  backdrop-filter: saturate(180%) blur(18px);
}

.icloud-logo a {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}

.icloud-logo a:hover {
  opacity: 0.78;
}

.apple-icloud-logo {
  display: block;
  fill: #f5f5f7;
  height: 31px;
  width: 82px;
}

.action-buttons {
  align-items: center;
  display: flex;
}

.help-menu-button {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  color: #f5f5f7;
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: background-color 150ms ease, transform 150ms ease;
  width: 40px;
}

.help-menu-button:hover {
  background: rgb(255 255 255 / 8%);
}

.help-menu-button:focus-visible,
.icloud-logo a:focus-visible {
  outline: 2px solid rgb(255 255 255 / 72%);
  outline-offset: 2px;
}

.ellipsis {
  display: block;
  fill: currentColor;
}

.login-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 152px);
  width: 100%;
}

.login-panel {
  animation: scaleIn 440ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  background: var(--surface);
  border-radius: 32px;
  box-shadow:
    0 34px 70px rgb(0 0 0 / 34%),
    0 1px 0 rgb(255 255 255 / 3%) inset;
  max-width: 640px;
  min-height: 720px;
  padding: 38px 90px 52px;
  width: min(640px, 100%);
}

.account-orb {
  height: 156px;
  margin: 0 auto 22px;
  position: relative;
  width: 156px;
}

.account-icon {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.account-symbol {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
}

.login-title {
  color: #f4f4f6;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 30px;
  text-align: center;
}

.signin-content {
  width: 100%;
}

.account-name {
  margin-bottom: 12px;
}

.login-panel.is-password-step .account-name {
  margin-bottom: 0;
}

.password {
  display: none;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(-1px);
}

.login-panel.is-password-step .password {
  animation: passwordReveal 220ms ease both;
  display: block;
}

.form-cell-wrapper {
  position: relative;
}

.form-textbox-input {
  background: #252527;
  border: 1px solid #47474d;
  border-radius: 10px;
  color: #f8f8fa;
  font-size: 15px;
  height: 56px;
  outline: none;
  padding: 20px 15px 8px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
  width: 100%;
}

.login-panel.is-password-step .account-name .form-textbox-input {
  border-bottom-color: #47474d;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.login-panel.is-password-step .password .form-textbox-input {
  border-top-color: #47474d;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: -1px;
}

.form-textbox-input:focus {
  border-color: #6a6a70;
  box-shadow: none;
}

.login-panel.is-password-step .account-name .form-textbox-input:focus {
  box-shadow: none;
}

.login-panel.is-password-step .password .form-textbox-input:focus {
  box-shadow: none;
}

.form-textbox-label {
  color: #8f8f96;
  font-size: 14px;
  left: 15px;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  top: 12px;
  transition:
    color 150ms ease,
    font-size 150ms ease,
    transform 150ms ease;
}

.form-textbox-label-code{
    color: #8f8f96;
  font-size: 14px;
  left: 15px;
  line-height: 1;
  pointer-events: none;
  display: block;
  top: 12px;
  transition:
    color 150ms ease,
    font-size 150ms ease,
    transform 150ms ease;
}

.form-textbox-input:focus + .form-textbox-label,
.form-textbox-input:not(:placeholder-shown) + .form-textbox-label {
  color: #9a9aa0;
  font-size: 12px;
  transform: translateY(-2px);
}

.signin-content__footer {
  margin: 12px 0 30px;
}

.signin-content__footer__items {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 22px;
}

.si-remember-password,
.si-forgot-password-link {
  display: none;
}

.button-link {
  background: transparent;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  line-height: 1.25;
  margin: 0;
  padding: 0;
}

.login-panel.is-password-step .si-remember-password,
.login-panel.is-password-step .si-forgot-password-link {
  display: inline-flex;
}

.login-panel.is-password-step .button-link {
  display: none;
}

.form-checkbox {
  align-items: center;
  display: flex;
}

.form-checkbox-input {
  appearance: none;
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.form-label {
  align-items: center;
  color: #f2f2f5;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  gap: 7px;
  line-height: 1.25;
}

.form-checkbox-indicator {
  align-items: center;
  background: #2d2d30;
  border: 1px solid #6a6a70;
  border-radius: 4px;
  display: inline-flex;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.form-checkbox-input:checked + .form-label .form-checkbox-indicator {
  background: var(--blue);
  border-color: var(--blue);
}

.form-checkbox-input:checked + .form-label .form-checkbox-indicator::after {
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  content: "";
  height: 7px;
  margin-top: -1px;
  transform: rotate(45deg);
  width: 4px;
}

.si-forgot-password-link {
  color: var(--blue);
  font-size: 13px;
  line-height: 1.25;
}

.no-wrap {
  white-space: nowrap;
}

.button-link:hover,
.ue-privacy a:hover,
.signin-v2__buttons-wrapper a:hover {
  text-decoration: underline;
}

.ue-privacy {
  color: #f2f2f5;
  margin-bottom: 30px;
}

.login-panel.is-password-step .ue-privacy {
  display: none;
}

.login-panel.is-password-step .signin-v2__buttons-wrapper {
  grid-template-columns: 1fr;
}

.privacy-wrapper {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
}

.privacy-icon {
  flex: 0 0 auto;
  height: 29px;
  margin-bottom: 9px;
  width: 37px;
}

.privacy-icon img {
  display: block;
  height: 29px;
  object-fit: contain;
  object-position: left center;
  width: 37px;
}

.tk-caption {
  color: #f2f2f5;
}

.label-small {
  font-size: 13px;
  line-height: 1.33;
}

.ue-privacy p {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.33;
  margin: 0;
  max-width: 460px;
}

.ue-privacy a {
  color: var(--blue);
}

.signin-v2__buttons-wrapper {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  margin-top: 4px;
  max-width: 460px;
  width: 100%;
}

.signin-v2__buttons-wrapper__button-wrapper__button {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 650;
  height: 38px;
  justify-content: center;
  padding: 0 18px;
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease,
    transform 150ms ease;
  width: 100%;
}

#sign-in {
  background: var(--blue-deep);
  color: #a7b4c6;
}

#sign-in.is-ready {
  background: var(--blue);
  box-shadow: 0 12px 28px rgb(10 132 255 / 22%);
  color: white;
}

#sign-in:disabled {
  cursor: default;
}

.signin-v2__buttons-wrapper__button-wrapper__button:active {
  transform: translateY(1px);
}

.signin-v2__buttons-wrapper__button-wrapper__button__text {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  white-space: nowrap;
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 760px) {
  .screen-login {
    padding: 72px 14px 28px;
  }

  .cloudos-toolbar {
    height: 52px;
    padding: 0 14px;
  }

  .apple-icloud-logo {
    height: 29px;
    width: 77px;
  }

  .login-stage {
    align-items: flex-start;
    min-height: calc(100vh - 100px);
  }

  .login-panel {
    border-radius: 24px;
    min-height: auto;
    padding: 28px 22px 32px;
  }

  .account-orb {
    height: 124px;
    margin-bottom: 16px;
    width: 124px;
  }

  .login-title {
    font-size: 27px;
    margin-bottom: 24px;
  }

  .signin-v2__buttons-wrapper {
    grid-template-columns: 1fr;
  }

  .signin-content__footer__items {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .screen-join {
    justify-content: flex-start;
    padding-top: 24vh;
  }

  .join-card {
    max-width: 100%;
  }

  .join-title {
    font-size: 30px;
  }

  .join-copy {
    font-size: 16px;
  }

  .legal-footer {
    bottom: 17px;
    font-size: 11px;
  }

  .login-panel {
    padding: 24px 16px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
