* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-page: #0a2a5e;
  --bg-card: #ffffff;
  --bg-card-bottom: #f5f5f5;
  --color-primary: #ff6b1a;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-link: #2760f0;
  --color-border: #cccccc;
  --color-error: #c8102e;
  --color-success: #22c55e;
  --radius-card: 16px;
  --radius-input: 8px;
  --radius-btn: 8px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-page);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page {
  width: 100%;
  max-width: 420px;
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  animation: fadeInUp 0.5s ease-out;
}

.card.hidden {
  display: none;
}

.card.fade-in {
  animation: fadeInUp 0.5s ease-out;
}

.card--wait {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card--success {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card__top--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.card__top {
  padding: 32px 32px 24px;
}

.card__bottom {
  background-color: var(--bg-card-bottom);
  padding: 24px 32px 32px;
}

.logo {
  margin-bottom: 24px;
}

.logo__text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

.logo__dot {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
}

.title {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 40px;
  color: var(--color-text);
}

.title--success {
  margin-top: 16px;
  margin-bottom: 12px;
}

.trust-text {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}

.trust-text::before {
  content: "🔒";
  font-size: 12px;
}

.info-why {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid var(--color-link);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__field {
  position: relative;
}

.form__field--password {
  display: flex;
  align-items: center;
}

.form__input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  outline: none;
  background: transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form__input:focus {
  border: 2px solid var(--color-link);
  box-shadow: none;
}

.form__label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: all 0.2s ease;
  background-color: var(--bg-card);
  padding: 0 6px;
}

.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
  top: 0;
  font-size: 12px;
  color: var(--color-link);
}

.form__input:not(:focus):not(:placeholder-shown) + .form__label {
  color: var(--color-text-muted);
}

.form__field--error .form__input:focus + .form__label,
.form__field--error .form__input:not(:placeholder-shown) + .form__label {
  color: var(--color-error);
}

.form__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.form__toggle:hover {
  transform: translateY(-50%) scale(1.1);
}

.form__error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-error);
  line-height: 1.5;
  animation: shake 0.4s ease-in-out;
  padding: 8px 0;
}

.form__field--error .form__input {
  border-color: var(--color-error);
}

.form__field--error .form__label {
  color: var(--color-error);
}

.form__remember {
  margin-top: 4px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox__input {
  display: none;
}

.checkbox__box {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: border-color 0.2s, background-color 0.2s;
}

.checkbox__input:checked + .checkbox__box {
  border-color: var(--color-link);
  background-color: var(--color-link);
}

.checkbox__input:checked + .checkbox__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox__label {
  font-size: 15px;
  color: var(--color-text);
}

.btn {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
  margin-top: 8px;
}

.btn--primary:hover {
  background-color: #e55a0f;
}

.links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.link {
  font-size: 15px;
  color: var(--color-link);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.link--bold {
  font-weight: 600;
}

.subtitle {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--color-text);
}

/* Wait page */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

.spinner--small {
  width: 36px;
  height: 36px;
  border-width: 3px;
  margin: 0 auto 16px;
}

.wait-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wait-text {
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 280px;
  line-height: 1.5;
}

/* Success page */
.success-circle {
  width: 72px;
  height: 72px;
  background-color: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  animation: scaleIn 0.5s ease-out;
}

.title--success {
  color: #22c55e;
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 8px;
}
p.text{
  margin-bottom: 20px;
}
.redirect-box {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 24px 32px;
  margin-top: 24px;
  text-align: center;
  width: 100%;
  max-width: 280px;
}

.redirect-text {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.redirect-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  animation: pulse 1s ease-in-out infinite;
}

.redirect-fallback {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 20px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-4px);
  }
  40%, 80% {
    transform: translateX(4px);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}