/* auth.css — Landing page with diagonal split hero */

/* ─── Full-bleed blurred backdrop (visible on desktop) ─── */
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0f18;
}

.auth-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(20px) brightness(0.3);
  transform: scale(1.1);
  /* prevent blur white edges */
}

/* ─── PWA container — constrained like other pages ─── */
.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #0a0f18;
  max-width: 600px;
  margin: 0 auto;
  z-index: 1;
}

.auth-bg {
  display: none;
}

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* ─── Horizontal split background (padel court style) ─── */
.landing-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Court center line */
.landing-bg::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
  z-index: 2;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.landing-panel {
  position: absolute;
  overflow: hidden;
}

.landing-panel--top {
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
}

.landing-panel--bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
}

.landing-panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.landing-panel--bottom .landing-panel-img {
  object-position: center bottom;
}

.landing-panel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.landing-panel--top .landing-panel-overlay {
  background: linear-gradient(180deg,
      rgba(10, 15, 24, 0.3) 0%,
      rgba(10, 15, 24, 0.55) 100%);
}

.landing-panel--bottom .landing-panel-overlay {
  background: linear-gradient(0deg,
      rgba(10, 15, 24, 0.35) 0%,
      rgba(10, 15, 24, 0.6) 100%);
}

/* ─── Logo ─── */
.landing-logo {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 0;
}

.landing-logo-img {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
}

/* ─── CTA Cards ─── */
.landing-ctas {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.landing-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.landing-card:active {
  transform: scale(0.97);
}

@media (hover: hover) {
  .landing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.25);
  }
}

.landing-card-icon {
  font-size: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}

.landing-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.landing-card-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.landing-card-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
}

.landing-card-arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s;
}

.landing-card:hover .landing-card-arrow {
  transform: translateX(3px);
  color: var(--lime-primary, #EBEA19);
}

/* ─── Login link ─── */
.landing-login {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px 40px;
}

.landing-login-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s;
}

.landing-login-btn span {
  color: var(--lime-bright, #F1F155);
  font-weight: 600;
}

.landing-login-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ─── Login overlay (bottom sheet) ─── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.login-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.login-sheet {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #141c2b 0%, #0d1420 100%);
  border-radius: 24px 24px 0 0;
  padding: 32px 24px 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}

.login-overlay.visible .login-sheet {
  transform: translateY(0);
}

.login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
}

.login-close:hover {
  color: #fff;
}

.login-sheet-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.login-sheet-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-code-input {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.2s;
}

.login-code-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 4px;
  font-weight: 400;
}

.login-code-input:focus {
  outline: none;
  border-color: var(--lime-bright, #F1F155);
  background: rgba(255, 255, 255, 0.1);
}

.login-submit {
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: var(--lime-bright, #F1F155);
  color: #0a0f18;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s;
}

.login-submit:hover {
  background: var(--lime-hover, #FFFF8D);
  transform: translateY(-1px);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─── Reuse existing auth-error / auth-success ─── */
.auth-error,
.auth-success {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  display: none;
  margin-bottom: 8px;
}

.auth-error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #ff6b6b;
}

.auth-success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #81c784;
}

.auth-error.visible,
.auth-success.visible {
  display: block;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Welcome Modal (kept from original) ─── */
.welcome-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.welcome-content {
  position: relative;
  background: linear-gradient(180deg, #141c2b 0%, #0d1420 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.welcome-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
}

.welcome-close:hover {
  color: #fff;
}

.welcome-header {
  text-align: center;
  margin-bottom: 24px;
}

.welcome-emoji {
  font-size: 56px;
  display: block;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.welcome-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.welcome-body {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  white-space: pre-line;
  margin-bottom: 28px;
}

.welcome-body .trip-detail {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-body .trip-detail-icon {
  font-size: 24px;
}

.welcome-body .trip-detail-text {
  flex: 1;
}

.welcome-body .trip-detail-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-body .trip-detail-value {
  font-size: 15px;
  color: #fff;
  font-weight: 500;
}

.welcome-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--lime-bright, #F1F155);
  color: #0a0f18;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.welcome-btn:hover {
  background: var(--lime-hover, #FFFF8D);
  transform: translateY(-2px);
}

/* ─── Desktop tweaks ─── */
@media (min-width: 768px) {
  .auth-shell {
    border-radius: 24px;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.5);
    min-height: 100dvh;
    margin: 0 auto;
  }

  .landing-logo {
    padding-top: 56px;
  }

  .landing-logo-img {
    height: 52px;
  }

  .landing-card {
    padding: 22px 24px;
  }

  .landing-card-title {
    font-size: 17px;
  }

  .landing-card-sub {
    font-size: 14px;
  }

  .login-sheet {
    border-radius: 24px;
    margin-bottom: 10vh;
  }
}