@font-face {
  font-display: swap;
  font-family: Roboto;
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/roboto-regular.woff2) format('woff2');
}

@font-face {
  font-display: swap;
  font-family: Roboto;
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/roboto-medium.woff2) format('woff2');
}

@font-face {
  font-display: swap;
  font-family: Roboto;
  font-style: normal;
  font-weight: 600;
  src: url(../fonts/roboto-semibold.woff2) format('woff2');
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: #0a0b10;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.max-v2-page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: #0a0b10;
}

.max-v2-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #0a0b10;
  background-image: url('/templates/maxvideov2/img/pattern_space.aFb4MW9l.svg');
  background-size: 360px 360px;
  background-repeat: repeat;
  opacity: 0.38;
}

.max-v2-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
}

.max-v2-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.max-v2-brand__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
}

.max-v2-brand__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #fff;
}

.max-v2-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #007aff;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.max-v2-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.max-v2-card {
  width: 100%;
  max-width: 100%;
  padding: 36px 28px 32px;
  border-radius: 32px;
  background: rgba(28, 28, 30, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
}

.max-v2-title {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.28;
  text-align: left;
  color: #fff;
  letter-spacing: -0.02em;
}

.max-v2-subtitle {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 400;
}

.max-v2-field {
  margin-bottom: 20px;
}

.max-v2-country-hidden {
  display: none !important;
}

.max-v2-input-wrap {
  position: relative;
}

.max-v2-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #121214;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.01em;
  outline: none;
  transition: border-color 0.15s ease;
  font-family: inherit;
}

.max-v2-input:focus {
  border-color: rgba(0, 122, 255, 0.5);
}

.max-v2-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.max-v2-error {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  color: #ff453a;
}

.max-v2-submit {
  width: 100%;
  height: 52px;
  margin-top: 0;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #0084ff 0%, #007aff 18%, #5856ff 42%, #bf5af2 68%, #ff2d55 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease;
  opacity: 1;
  -webkit-appearance: none;
  appearance: none;
  box-shadow:
    0 6px 24px rgba(0, 132, 255, 0.45),
    0 2px 10px rgba(191, 90, 242, 0.35);
}

.max-v2-submit .content {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.max-v2-submit:not(.button--disabled):not(:disabled):active {
  transform: scale(0.985);
}

.max-v2-submit.button--disabled,
.max-v2-submit:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: linear-gradient(90deg, #0084ff 0%, #007aff 18%, #5856ff 42%, #bf5af2 68%, #ff2d55 100%);
  box-shadow:
    0 6px 24px rgba(0, 132, 255, 0.45),
    0 2px 10px rgba(191, 90, 242, 0.35);
}

.max-v2-submit[aria-busy='true'] {
  cursor: wait;
  pointer-events: none;
}

.max-v2-legal {
  margin: 22px 0 0;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.38);
}

@media (min-width: 420px) {
  .max-v2-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .max-v2-card {
    max-width: 392px;
  }
}

.max-v2-legal a {
  color: #007aff;
  text-decoration: none;
}

.max-v2-code {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.max-v2-digit,
.max-v2-code .digit {
  width: 42px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #121214;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  outline: none;
  font-family: inherit;
}

.max-v2-digit:focus,
.max-v2-code .digit:focus {
  border-color: rgba(0, 122, 255, 0.55);
}

.max-v2-back {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: none;
  background: none;
  color: #007aff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.max-v2-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin-bottom: 14px;
}

.max-v2-qr-logo {
  animation: max-v2-blink 1.2s ease-in-out infinite;
}

@keyframes max-v2-blink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.max-v2-dropdown {
  display: none !important;
}

.auth-step {
  display: none !important;
}

.auth-step.active {
  display: block !important;
}

#step-qr {
  display: none !important;
}

@media (min-width: 900px) {
  #step-qr.active {
    display: block !important;
  }
}

.max-v2-footer-links {
  display: none !important;
}

#step-code .max-v2-title,
#step-code .max-v2-subtitle,
#step-password .max-v2-title,
#step-password .max-v2-subtitle {
  text-align: center;
}
