/* ==========================================================================
   HTG TOPUP - MODERN AUTH UI (DEEL, PINTEREST & RAKUTEN DESIGN SYSTEM)
   ========================================================================== */

:root {
  --htg-primary: #6355d8;
  --htg-primary-hover: #5244ca;
  --htg-primary-subtle: rgba(99, 85, 216, 0.12);
  --htg-primary-glow: rgba(99, 85, 216, 0.25);
  
  --htg-bg-start: #9d8ef9;
  --htg-bg-mid: #8574f5;
  --htg-bg-end: #7460f3;
  --htg-bg-accent: #b4a8fd;
  
  --htg-surface: #ffffff;
  --htg-surface-subtle: #f8fafc;
  --htg-surface-elevated: #ffffff;
  
  --htg-text-main: #111827;
  --htg-text-muted: #6b7280;
  --htg-text-light: #9ca3af;
  --htg-text-white: #ffffff;
  
  --htg-border: #e2e8f0;
  --htg-border-focus: #6355d8;
  --htg-radius-card: 24px;
  --htg-radius-input: 12px;
  --htg-radius-pill: 999px;
  
  --htg-shadow-card: 0 25px 60px -12px rgba(35, 20, 95, 0.22), 0 0 1px rgba(0, 0, 0, 0.08);
  --htg-shadow-input: 0 1px 2px rgba(0, 0, 0, 0.04);
  --htg-shadow-focus: 0 0 0 3px rgba(99, 85, 216, 0.16);
  --htg-shadow-btn: 0 10px 22px -6px rgba(99, 85, 216, 0.38);
}

/* --------------------------------------------------------------------------
   Global Layout & Background (Deel-inspired Lavender Canvas with Geometric Accents)
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--htg-text-main);
  background: linear-gradient(135deg, var(--htg-bg-start) 0%, var(--htg-bg-mid) 45%, var(--htg-bg-end) 100%);
  position: relative;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle modern geometric background facets (matching Deel's background) */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  right: -10%;
  width: 65vw;
  height: 130vh;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -150px;
  left: -150px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* App-mode overrides */
body.app-mode {
  align-items: flex-start;
  padding: 24px 16px;
  background: #f1f3f9;
}

body.app-mode::before,
body.app-mode::after {
  display: none;
}

/* --------------------------------------------------------------------------
   Auth Layout Container (Split View on Desktop, Mobile-Optimized on Phone)
   -------------------------------------------------------------------------- */
.auth-page-wrapper {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 30px 20px;
  position: relative;
  z-index: 1;
}

.auth-desktop-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Left Column: Hero Showcase (Inspired by Deel & Pinterest Hero Presentation)
   -------------------------------------------------------------------------- */
.auth-hero-col {
  flex: 1.15;
  color: var(--htg-text-white);
  padding: 10px 0;
}

.auth-partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: var(--htg-radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.auth-hero-headline {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 18px;
  text-shadow: 0 4px 20px rgba(20, 10, 60, 0.12);
}

/* Deel-signature highlighted pill badge for headline */
.auth-highlight-pill {
  display: inline-block;
  background: #ffffff;
  color: var(--htg-primary);
  padding: 2px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: rotate(-1deg);
  margin-top: 4px;
}

.auth-hero-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  max-width: 480px;
  margin-bottom: 28px;
}

/* Visual Feature Card (Deel Desk Illustration style card) */
.auth-hero-card {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  padding: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 26px;
  max-width: 500px;
}

/* Floating publisher tags inside showcase */
.auth-games-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.auth-game-tag {
  background: rgba(17, 24, 39, 0.7);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--htg-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.auth-perks-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.auth-mini-perk {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-mini-perk i {
  font-size: 1.25rem;
}

.auth-mini-perk strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
  line-height: 1.2;
}

.auth-mini-perk span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
}

/* Hero Trust Bar */
.auth-trust-strip {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 10px;
}

.auth-trust-item {
  display: flex;
  flex-direction: column;
}

.auth-trust-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.auth-trust-lbl {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

/* --------------------------------------------------------------------------
   Right Column: Floating White Auth Card (Deel & Pinterest & Rakuten Style)
   -------------------------------------------------------------------------- */
.auth-form-col {
  flex: 0.85;
  display: flex;
  justify-content: center;
  width: 100%;
}

.card {
  width: 100%;
  max-width: 430px;
  background: var(--htg-surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--htg-radius-card);
  box-shadow: var(--htg-shadow-card);
  padding: 34px 30px;
  text-align: left;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

/* Top bar with back navigation */
.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.login-back-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--htg-radius-pill);
  border: 1px solid var(--htg-border);
  background: var(--htg-surface);
  color: var(--htg-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.login-back-btn:hover {
  background: var(--htg-surface-subtle);
  color: var(--htg-primary);
  border-color: var(--htg-primary-subtle);
  transform: translateX(-2px);
}

.login-brand-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--htg-primary);
  text-decoration: none;
}

/* Header typography */
.form-header {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--htg-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.form-description {
  font-size: 0.88rem;
  color: var(--htg-text-muted);
  margin-bottom: 22px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Input Fields & Forms (Rakuten & Deel Rounded Box Aesthetics)
   -------------------------------------------------------------------------- */
form {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  text-align: left;
}

.input-group {
  position: relative;
  display: flex;
  width: 100%;
  margin-bottom: 14px !important;
}

.input-group .input-group-text {
  background: #f9fafb;
  border: 1.5px solid var(--htg-border);
  border-right: none;
  border-radius: var(--htg-radius-input) 0 0 var(--htg-radius-input) !important;
  color: #6b7280;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.input-group .form-control,
.input-group .form-select {
  height: 48px;
  background: #f9fafb;
  border: 1.5px solid var(--htg-border);
  border-radius: 0 var(--htg-radius-input) var(--htg-radius-input) 0 !important;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--htg-text-main);
  box-shadow: none;
  transition: all 0.2s ease;
}

.input-group .form-control:focus,
.input-group .form-select:focus {
  background: #ffffff;
  border-color: var(--htg-primary);
  box-shadow: var(--htg-shadow-focus);
  outline: none;
}

.input-group:focus-within .input-group-text {
  border-color: var(--htg-primary);
  background: #ffffff;
  color: var(--htg-primary);
}

/* Password Eye Toggle (seamlessly embedded inside the input field) */
.input-group .form-control.has-toggle {
  border-right: none;
  border-radius: 0 !important;
}

.btn-password-toggle {
  background: #f9fafb;
  border: 1.5px solid var(--htg-border);
  border-left: none;
  border-radius: 0 var(--htg-radius-input) var(--htg-radius-input) 0 !important;
  color: #6b7280;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-password-toggle:hover {
  color: var(--htg-primary);
  background: #f3f4f6;
}

.input-group:focus-within .btn-password-toggle {
  border-color: var(--htg-primary);
  background: #ffffff;
}

/* Country code picker styling */
#countryCode {
  max-width: 110px !important;
  border-radius: var(--htg-radius-input) 0 0 var(--htg-radius-input) !important;
  font-size: 0.85rem;
  font-weight: 500;
  border-right: none;
}

#registerMobile {
  border-radius: 0 var(--htg-radius-input) var(--htg-radius-input) 0 !important;
}

/* Referral code valid accent */
#registerReferralCode.is-valid {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* --------------------------------------------------------------------------
   Buttons (High Contrast, Bold, Inspired by Deel & Rakuten)
   -------------------------------------------------------------------------- */
.btn-gradient {
  background: linear-gradient(135deg, var(--htg-primary) 0%, #4f46e5 100%);
  color: #ffffff !important;
  border: none;
  border-radius: var(--htg-radius-input);
  height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
  cursor: pointer;
  box-shadow: var(--htg-shadow-btn);
  transition: all 0.25s ease;
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -6px rgba(99, 85, 216, 0.45);
  background: linear-gradient(135deg, #5748ce 0%, #4338ca 100%);
}

.btn-gradient:active {
  transform: translateY(0);
}

.btn-gradient.disabled,
.btn-gradient:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Links & toggles */
.link-text {
  color: var(--htg-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.link-text:hover {
  color: var(--htg-primary-hover);
  text-decoration: underline;
}

#forgotPasswordLink {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 4px;
}

#showForgotPassword {
  font-size: 0.85rem;
  font-weight: 500;
}

#toggleText {
  font-size: 0.88rem;
  color: var(--htg-text-muted);
  text-align: center;
  margin-top: 14px;
  margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   Divider & Social Logins (Deel & Pinterest Authentic Presentation)
   -------------------------------------------------------------------------- */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px;
  color: var(--htg-text-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--htg-border);
}

.auth-divider span {
  padding: 0 12px;
}

.social-auth-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.social-auth-item {
  position: relative;
  width: 100%;
}

.btn-google {
  background: #ffffff;
  color: #1f2937;
  border: 1.5px solid var(--htg-border);
  border-radius: var(--htg-radius-input);
  height: 46px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-apple {
  background: #0f172a;
  color: #ffffff !important;
  border: 1.5px solid #0f172a;
  border-radius: var(--htg-radius-input);
  height: 46px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.btn-apple:hover {
  background: #000000;
  border-color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.social-recommend-badge {
  display: none;
  position: absolute;
  top: -8px;
  right: 14px;
  z-index: 2;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--htg-radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.social-recommend-badge.show {
  display: inline-flex;
}

.social-recommend-badge.apple {
  background: #111827;
  color: #ffffff;
}

.social-recommend-badge.google {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid rgba(66, 133, 244, 0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* --------------------------------------------------------------------------
   Banned / Inactive Alert Banner (Clear, Authoritative & Actionable)
   -------------------------------------------------------------------------- */
.banned-status-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.08);
  margin-bottom: 16px;
  animation: htgShake 0.4s ease-out;
}

.banned-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banned-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 3px;
}

.banned-desc {
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.45;
  margin-bottom: 10px;
}

.banned-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.banned-actions .btn-wa {
  background: #25D366;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: 8px;
  padding: 6px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.banned-actions .btn-wa:hover {
  background: #20bd5a;
}

.banned-actions .btn-mail {
  background: #f3f4f6;
  color: #374151 !important;
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: 8px;
  padding: 6px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d1d5db;
  transition: background 0.2s;
}

.banned-actions .btn-mail:hover {
  background: #e5e7eb;
}

/* --------------------------------------------------------------------------
   Notification System
   -------------------------------------------------------------------------- */
.notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1050;
  max-width: 360px;
  width: calc(100% - 48px);
}

.notification-item {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--htg-border);
  animation: slideInNotification 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-title {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  border-bottom: 1px solid #f1f5f9;
}

.notification-message {
  padding: 12px 14px;
  font-size: 0.84rem;
  color: #4b5563;
  line-height: 1.45;
}

.notification-time {
  padding: 4px 14px;
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  background: #f8fafc;
}

.notification-close {
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: #9ca3af;
}

.notification-close:hover {
  color: #111827;
}

.notification-item.success .notification-title {
  background: #ecfdf5;
  color: #065f46;
}

.notification-item.error .notification-title {
  background: #fef2f2;
  color: #991b1b;
}

.notification-item.info .notification-title {
  background: #eff6ff;
  color: #1e40af;
}

@keyframes slideInNotification {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes htgShake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints (Desktop vs Mobile Separation)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  body {
    padding: 20px 12px;
    align-items: flex-start;
  }

  .auth-page-wrapper {
    padding: 10px 0;
  }

  .auth-hero-col {
    display: none !important;
  }

  .auth-desktop-grid {
    justify-content: center;
    gap: 0;
  }

  .auth-form-col {
    max-width: 100%;
  }

  .card {
    max-width: 440px;
    padding: 26px 20px 22px;
    border-radius: 22px;
    box-shadow: 0 15px 35px rgba(35, 20, 95, 0.15);
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px 8px;
  }

  .card {
    padding: 22px 16px 18px;
    border-radius: 20px;
  }

  .form-header {
    font-size: 1.45rem;
  }

  .form-description {
    font-size: 0.82rem;
    margin-bottom: 16px;
  }
}
