/**
 * Elite666 - Authentication Modal & Screens (PRD v1.2)
 */

.auth-header-gold {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border-bottom: 1.5px solid var(--line);
  padding: 24px 16px 28px;
  color: var(--ink);
  text-align: center;
  position: relative;
}

.auth-brand-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.auth-avatar-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.auth-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--line-gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  background: var(--bg-card);
}

.auth-bonus-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--gold-2);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-1);
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-header-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: var(--ink);
}

.auth-header-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}


/* Subpage Header Actions Row */
.subpage-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subpage-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  transition: all 0.2s ease;
}

.subpage-lang-btn:hover {
  background: var(--bg-gold-light);
  border-color: var(--gold-2);
}

.subpage-lang-btn img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.subpage-cs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
}

.subpage-cs-btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.subpage-cs-btn:hover img {
  transform: scale(1.1);
}

.auth-sheet {
  background: var(--bg-card);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  margin-top: -14px;
  padding: 24px 20px 30px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--line);
}

.auth-tab-row {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  color: var(--gold-1);
  border-bottom: 3px solid var(--gold-2);
}

/* Luxury Country Code Picker & Phone Input */
.custom-country-group {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg-subtle);
  transition: all 0.25s ease;
  z-index: 20;
}

.custom-country-group:focus-within {
  border-color: var(--gold-2);
  background: var(--bg-card);
  box-shadow: 0 0 0 3.5px rgba(212, 175, 55, 0.18);
}

.country-picker-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border-right: 1.5px solid var(--line);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  padding: 0 12px;
  height: 52px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.country-picker-trigger:hover {
  background: var(--bg-gold-light);
}

.country-flag-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  border: 1px solid var(--line-gold);
}

.country-code-pill {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.country-arrow {
  display: flex;
  align-items: center;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.country-arrow.open {
  transform: rotate(-90deg);
}

.phone-num-input {
  flex: 1;
  height: 52px;
  border: none;
  background: transparent;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
}

.phone-num-input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

/* Country Dropdown Menu */
.country-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-width: 320px;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1.5px solid var(--gold-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 6px;
  z-index: 1000;
  max-height: 230px;
  overflow-y: auto;
  animation: guestPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.country-option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.country-option-item:hover {
  background: var(--bg-gold-light);
}

.country-option-item.selected {
  background: var(--bg-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.country-option-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.country-option-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.country-option-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.country-option-code {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-1);
}

/* Password Input with Eye Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.eye-toggle-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
  display: flex;
  align-items: center;
}

/* Password Strength Meter */
.strength-meter-bar {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.strength-step {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #E5E0D8;
  transition: background 0.2s ease;
}

.strength-step.active-weak { background: var(--danger); }
.strength-step.active-medium { background: #F59E0B; }
.strength-step.active-strong { background: var(--ok); }

/* Checkbox Row & Terms */
.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-checkbox-row input {
  margin-top: 3px;
  accent-color: var(--gold-2);
  width: 17px;
  height: 17px;
}

.auth-checkbox-row a {
  color: var(--gold-3);
  font-weight: 800;
  text-decoration: underline;
}

/* Bottom Action Links */
.auth-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.auth-action-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-1);
  font-weight: 800;
  cursor: pointer;
}

/* ========================================================== */
/* Interactive Slide Puzzle Captcha (Google / GeeTest Style)  */
/* ========================================================== */
.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.captcha-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1.5px solid var(--gold-2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 320px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.captcha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.captcha-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.captcha-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-icon-btn {
  background: #FAF7F0;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}

.captcha-icon-btn:hover {
  background: var(--gold-1);
  color: #000;
}

.captcha-stage {
  position: relative;
  width: 288px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
  background: #2D271D;
  margin: 0 auto;
}

.captcha-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.captcha-slot-target {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9), 0 0 0 1.5px rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.captcha-piece-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 0 1.5px rgba(255, 215, 0, 0.85);
  z-index: 5;
  overflow: hidden;
  background-repeat: no-repeat;
  cursor: grab;
  transition: box-shadow 0.2s ease;
}

.captcha-piece-layer:active {
  cursor: grabbing;
}

.captcha-track {
  position: relative;
  height: 42px;
  background: #F4EFE6;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.captcha-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.5));
  border-radius: 22px 0 0 22px;
  transition: width 0.05s linear;
}

.captcha-track-text {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #787164;
  z-index: 1;
  pointer-events: none;
}

.captcha-slider-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5D77A 0%, #D4AF37 50%, #9A7B12 100%);
  border: 2px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 3;
  color: #14120E;
  font-size: 14px;
  font-weight: 900;
  transition: transform 0.05s linear, background 0.2s ease;
}

.captcha-slider-knob:active {
  cursor: grabbing;
  transform: scale(1.06);
}

.captcha-status-msg {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  margin-top: 8px;
  min-height: 16px;
  transition: all 0.2s ease;
}

.captcha-status-msg.success { color: var(--ok); }
.captcha-status-msg.error { color: var(--danger); animation: shake 0.3s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============ DESKTOP LAYOUT (PC, min-width 768px) - 2026-12-03 ============ */
@media (min-width: 768px) {
  /* Login / register form sits in a centered 480px card */
  .auth-header-gold,
  .auth-sheet {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .auth-header-gold {
    border-radius: 24px 24px 0 0;
  }
  .auth-sheet {
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }
}