:root {
  --auth-gold: #c9993a;
  --auth-card-padding-x: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: #000;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body.datemeet-app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.al-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-image: url("/assets/images/auth-bg.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.al-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(10, 15, 35, 0.55) 0%,
    rgba(10, 15, 35, 0.18) 30%,
    rgba(10, 15, 35, 0.08) 55%,
    rgba(10, 15, 35, 0.4) 80%,
    rgba(10, 15, 35, 0.8) 100%
  );
}

.al-lang-btn {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(50, 50, 60, 0.65);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.al-spacer {
  flex: 1;
}

.page-login .al-spacer {
  min-height: 200px;
}

.page-register .al-spacer {
  min-height: 160px;
}

.al-card-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 20px 20px;
}

.al-card {
  padding: 24px 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.page-login .al-card {
  padding: 28px 24px 24px;
}

.al-field-group {
  margin-bottom: 14px;
}

.page-login .al-field-group {
  margin-bottom: 18px;
}

.al-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.page-login .al-label {
  margin-bottom: 8px;
}

.al-input-wrap {
  position: relative;
}

.al-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid rgba(201, 153, 58, 0.7);
  border-radius: 12px;
  outline: none;
  background: rgba(20, 20, 30, 0.35);
  color: rgba(255, 255, 255, 0.85);
  caret-color: var(--auth-gold);
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}

.page-login .al-input {
  height: 52px;
}

.al-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  opacity: 1;
}

.al-input:focus {
  border-color: var(--auth-gold);
  background: rgba(20, 20, 30, 0.5);
}

.al-input[aria-invalid="true"] {
  border-color: #ff8d8d;
}

.al-input-wrap-pw .al-input {
  padding-right: 48px;
}

.al-eye-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(201, 153, 58, 0.75);
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.al-eye-btn:hover {
  color: var(--auth-gold);
}

.al-submit-btn {
  width: 100%;
  height: 52px;
  margin: 4px 0 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4a843 0%, #c9993a 50%, #b8862e 100%);
  box-shadow: 0 4px 20px rgba(201, 153, 58, 0.4);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2.5px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.page-login .al-submit-btn {
  height: 54px;
  margin-bottom: 18px;
}

.al-submit-btn:hover {
  opacity: 0.92;
}

.al-submit-btn:active {
  transform: scale(0.98);
  opacity: 0.88;
}

.al-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.al-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.al-signup {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.al-signup:hover {
  color: #fff;
}

.al-bottom-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 47.5px;
  padding: 14px 24px max(14px, env(safe-area-inset-bottom));
  background: rgba(0, 20, 60, 0.85);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.al-booking-logo {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.al-booking-check {
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.al-lang-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.al-lang-modal.visible {
  display: block;
}

.al-lang-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.al-lang-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 24px 20px max(40px, calc(env(safe-area-inset-bottom) + 20px));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px 24px 0 0;
  background: #18182a;
  animation: al-slide-up 0.26s ease;
  overscroll-behavior: contain;
}

@keyframes al-slide-up {
  from { transform: translateY(48px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.al-lang-modal-title {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-align: center;
  text-transform: uppercase;
}

.al-lang-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.al-lang-opt {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.al-lang-opt img {
  display: inline;
  width: 1em;
  height: 1em;
  margin: 0 0.07em;
  vertical-align: -0.1em;
}

.al-lang-opt:hover,
.al-lang-opt.active {
  border-color: rgba(201, 153, 58, 0.45);
  background: rgba(201, 153, 58, 0.15);
  color: #fff;
}

.dm-toast {
  position: fixed;
  bottom: max(80px, calc(env(safe-area-inset-bottom) + 64px));
  left: 50%;
  z-index: 99999;
  max-width: 80vw;
  padding: 10px 20px;
  overflow: hidden;
  transform: translateX(-50%);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dm-toast.visible {
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid #f5cd68;
  outline-offset: 2px;
}

html[dir="rtl"] .al-lang-opt {
  text-align: right;
}

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