@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Lilita+One&display=swap');

:root {
  --px-font: 'Fredoka', system-ui, sans-serif;
  --px-display: 'Lilita One', 'Fredoka', system-ui, sans-serif;
  --px-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --px-gold: #ffd24a;
  --px-orange: #ff9a12;
  --px-ink: #16325c;
  --px-white: #ffffff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body.pixel-auth {
  min-height: 100dvh;
  font-family: var(--px-font);
  color: var(--px-white);
  background-color: #4aa4e8;
  background-image:
    linear-gradient(180deg, rgba(70, 170, 240, 0.08) 0%, rgba(20, 70, 140, 0.18) 100%),
    var(--px-bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

body.pixel-auth--login { background-color: #4eb6ef; }
body.pixel-auth--register { background-color: #7a8ce8; }

.px-phone {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(18px + var(--safe-top))
    22px
    calc(22px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  position: relative;
}

.px-brand {
  text-align: center;
  margin: 4px auto 8px;
  width: min(260px, 78%);
}

.px-brand img {
  width: 100%;
  height: auto;
  max-height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
  image-rendering: auto;
}

.px-wordmark {
  margin: 2px 0 0;
  font-family: var(--px-display);
  font-size: clamp(52px, 16vw, 72px);
  line-height: 0.86;
  letter-spacing: 0.04em;
  color: #ffb31a;
  background: linear-gradient(180deg, #ffe566 0%, #ffc01a 42%, #ff8a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #fff4b0) drop-shadow(3px 5px 0 #c45a00) drop-shadow(0 10px 12px rgba(0,0,0,0.25));
  text-transform: uppercase;
}

.px-crown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: -6px;
}

.px-spark {
  color: #ffe566;
  font-size: 18px;
  text-shadow: 0 2px 0 #c98912, 0 0 10px rgba(255, 220, 80, 0.8);
}

.px-crown svg {
  width: 54px;
  height: 40px;
  filter: drop-shadow(0 3px 0 #c98912) drop-shadow(0 6px 8px rgba(0,0,0,0.25));
}

.px-hero {
  text-align: center;
  margin: 8px 0 16px;
}

.px-hero h1 {
  margin: 0;
  font-size: clamp(26px, 7vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 0 rgba(20, 60, 120, 0.35), 0 6px 14px rgba(0, 0, 0, 0.28);
}

.px-hero h1 .star {
  color: #ffe566;
  font-size: 0.72em;
  vertical-align: 2px;
  text-shadow: 0 0 10px rgba(255, 220, 80, 0.85);
}

.px-hero p {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(20, 50, 110, 0.45);
}

.px-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.px-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 122, 214, 0.62) 0%, rgba(24, 96, 196, 0.72) 100%);
  border: 1.5px solid rgba(186, 226, 255, 0.55);
  box-shadow:
    0 8px 18px rgba(12, 50, 120, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.px-field svg.px-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-right: 8px;
}

.px-dial {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.px-dial select {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 0 14px 0 0;
  outline: none;
  cursor: pointer;
}

.px-dial .chev {
  width: 12px;
  height: 12px;
  margin-left: -16px;
  pointer-events: none;
}

.px-field input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

/* One visibility control only — hide browser/password-manager reveal icons */
.px-field input[type="password"]::-ms-reveal,
.px-field input[type="password"]::-ms-clear {
  display: none !important;
  width: 0;
  height: 0;
}

.px-field input[type="password"]::-webkit-textfield-decoration-container,
.px-field input[type="password"]::-webkit-credentials-auto-fill-button,
.px-field input[type="password"]::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.px-field input::placeholder {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.px-field input[readonly] {
  opacity: 0.92;
}

.px-eye {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.px-eye svg { width: 22px; height: 22px; }
.px-eye .eye-slash[hidden] { display: none; }

.px-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  color: #4a2208;
  background: linear-gradient(180deg, #ffe14a 0%, #ffc01f 38%, #ff9808 78%, #f07a00 100%);
  box-shadow:
    0 5px 0 #d45e00,
    0 10px 18px rgba(180, 70, 0, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(0);
  transition: transform 0.12s var(--px-ease), box-shadow 0.12s var(--px-ease);
}

.px-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #d45e00,
    0 4px 10px rgba(180, 70, 0, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.px-btn svg {
  width: 22px;
  height: 22px;
}

.px-switch {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.px-switch a {
  color: #ffe566;
  font-weight: 700;
  text-decoration: none;
}

.px-msgs {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.px-msgs li {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  background: rgba(180, 30, 40, 0.72);
  border: 1px solid rgba(255, 180, 180, 0.4);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.px-msgs li.ok {
  background: rgba(20, 120, 60, 0.72);
  border-color: rgba(180, 255, 200, 0.4);
}

.px-spacer { flex: 1; min-height: 12px; }

@media (max-width: 360px) {
  .px-phone { padding-left: 16px; padding-right: 16px; }
  .px-hero h1 { font-size: 24px; }
  .px-btn { font-size: 20px; }
}
