/* ==========================================================================
   Design System & Custom Properties
   ========================================================================== */
:root {
  /* Colors */
  --bg-main: #020611;
  --modal-bg: rgba(5, 12, 28, 0.92);
  --color-cyan: #00e5ff;
  --color-blue: #1aa8ff;
  --color-purple: #bb20ff;
  --color-pink: #d000ff;
  --color-white: #ffffff;
  --color-muted: #9ca8bd;
  --input-bg: rgba(2, 8, 20, 0.55);
  --border-color: rgba(255, 255, 255, 0.12);
  
  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-main);
  color: var(--color-white);
  font-family: var(--font-body);
  overflow: hidden;
  height: 80vh;
}

/* ==========================================================================
   Portal Launcher Styles (Clean Backdrop)
   ========================================================================== */
.portal-launcher {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.03) 0%, transparent 60%),
    radial-gradient(circle at 10% 10%, rgba(187, 32, 255, 0.03) 0%, transparent 40%);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.portal-launcher.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Modal Overlay
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(1, 4, 12, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Modal Container
   ========================================================================== */
.modal-container {
  width: 90%;
  max-width: 1200px; /* Width in range 1180px - 1240px */
  height: 730px; /* Height in range 680px - 760px */
  background: var(--modal-bg);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  
  /* Double-Gradient Glow border implementation */
  border: 1.5px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: 
    linear-gradient(var(--modal-bg), var(--modal-bg)), 
    linear-gradient(135deg, var(--color-cyan) 0%, rgba(26,168,255,0.4) 35%, rgba(187,32,255,0.4) 65%, var(--color-purple) 100%);
  
  /* Premium Shadows and Glows */
  box-shadow: 
    0 25px 60px -10px rgba(0, 0, 0, 0.8),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    0 0 35px -5px rgba(0, 229, 255, 0.12),
    0 0 35px -5px rgba(187, 32, 255, 0.12);
  
  /* Slide in/up scale animation */
  transform: translateY(30px) scale(0.97);
  opacity: 0;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.close-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(90deg);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Content Grid Layout
   ========================================================================== */
.modal-content-grid {
  display: flex;
  flex: 1;
  height: calc(100% - 56px); /* Reserves space for footer disclaimer */
}

/* Left Brand Panel (48%) */
.modal-left {
  width: 48%;
  padding: 48px 48px 36px 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: 
    radial-gradient(circle at 10% 10%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(187, 32, 255, 0.12) 0%, transparent 50%);
}

.particle-canvas {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
}

/* Right Form Panel (52%) */
.modal-right {
  width: 52%;
  padding: 72px 52px 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  scrollbar-width: none;  /* Firefox */
  -ms-overflow-style: none;  /* IE/Edge */
}

.modal-right::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

/* Vertical Separation Line */
.modal-vertical-divider {
  width: 1px;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.02) 0%, 
    rgba(255, 255, 255, 0.12) 40%, 
    rgba(255, 255, 255, 0.12) 60%, 
    rgba(255, 255, 255, 0.02) 100%);
  align-self: stretch;
}

/* ==========================================================================
   Left Panel Details
   ========================================================================== */
.brand-logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  z-index: 2;
}

.brand-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.25));
  transition: transform var(--transition-slow);
}

.brand-logo-area:hover .brand-icon-wrapper {
  transform: rotate(360deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: #ffffff;
  line-height: 1;
}

.brand-sub {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--color-blue);
  margin-top: 4px;
}

.left-heading {
  font-family: var(--font-headings);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: 0.5px;
  z-index: 2;
}

.left-heading .gradient-text {
  background: linear-gradient(90deg, var(--color-cyan) 0%, var(--color-blue) 50%, var(--color-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.heading-underline {
  width: 70px;
  height: 3px;
  border-radius: 1.5px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  margin: 16px 0 24px 0;
  z-index: 2;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.left-description {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-muted);
  max-width: 380px;
  margin-bottom: 36px;
  z-index: 2;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 2;
}

.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform var(--transition-fast);
}

.feature-row:hover {
  transform: translateX(6px);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

/* Feature Icon Colors & Glowing States */
.neon-svg-cyan { color: var(--color-cyan); }
.neon-svg-blue { color: var(--color-blue); }
.neon-svg-purple { color: var(--color-purple); }

.feature-row:hover .feature-icon-box {
  background: rgba(255, 255, 255, 0.05);
}

.feature-row:nth-child(1):hover .feature-icon-box {
  border-color: var(--color-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
  color: var(--color-cyan);
}

.feature-row:nth-child(2):hover .feature-icon-box {
  border-color: var(--color-blue);
  box-shadow: 0 0 12px rgba(26, 168, 255, 0.3);
  color: var(--color-blue);
}

.feature-row:nth-child(3):hover .feature-icon-box {
  border-color: var(--color-purple);
  box-shadow: 0 0 12px rgba(187, 32, 255, 0.3);
  color: var(--color-purple);
}

.feature-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.feature-content p {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ==========================================================================
   Right Panel Details (Forms & Interaction)
   ========================================================================== */
.tab-container {
  width: 100%;
  height: 52px;
  background: rgba(3, 9, 24, 0.65);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  position: relative;
  display: flex;
  padding: 4px;
  margin-bottom: 28px;
  flex-shrink: 0;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 1px rgba(255, 255, 255, 0.05);
}

.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 6px);
  border-radius: 8px;
  
  /* Glowing Border Effect for Active Tab */
  border: 1px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: 
    linear-gradient(rgba(7, 17, 32, 0.85), rgba(7, 17, 32, 0.85)), 
    linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
  
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(0, 229, 255, 0.2);
  
  /* Snappy spring transition overshoot */
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.tab-btn {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color var(--transition-fast);
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.85);
}

.tab-btn svg {
  opacity: 0.65;
  transition: all var(--transition-fast);
}

.tab-btn:hover svg {
  opacity: 0.9;
  transform: scale(1.05);
}

.tab-btn.active {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.tab-btn.active svg {
  opacity: 1;
  transform: scale(1.08);
}

#tabLogin.active svg {
  color: var(--color-cyan);
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.7));
}

#tabSignUp.active svg {
  color: var(--color-purple);
  filter: drop-shadow(0 0 6px rgba(187, 32, 255, 0.7));
}

/* Slide classes for active indicator */
.tab-container.signup-active .tab-indicator {
  transform: translateX(100%);
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.form-fields-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.name-fields-row {
  display: flex;
  gap: 12px;
  animation: slideDown var(--transition-normal) forwards;
  flex-shrink: 0;
}

.name-fields-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex-shrink: 0;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--color-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.input-wrapper input {
  width: 100%;
  padding: 15px 16px 15px 44px;
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-normal);
}

/* Password input needs right padding for eye */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"]#password {
  padding-right: 48px;
}

.input-wrapper input::placeholder {
  color: rgba(156, 168, 189, 0.45);
}

.input-wrapper input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.input-wrapper input:focus {
  border-color: var(--color-cyan);
  background: rgba(2, 8, 20, 0.75);
  box-shadow: 
    0 0 15px rgba(0, 229, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.input-wrapper input:focus + .input-icon {
  color: var(--color-cyan);
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.5));
}

.password-toggle-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--color-cyan);
}

/* Validation styling */
.validation-message {
  font-size: 0.78rem;
  color: #ff4a5a;
  margin-top: 4px;
  display: none;
  text-align: left;
  animation: fadeIn var(--transition-fast) forwards;
}

.form-group.has-error input {
  border-color: #ff4a5a;
  box-shadow: 0 0 10px rgba(255, 74, 90, 0.15);
}

.form-group.has-error .validation-message {
  display: block;
}

/* Actions Row (Checkbox / Forgot Password) */
.form-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-shrink: 0;
}

/* Custom Checkbox Container */
.custom-checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-muted);
  user-select: none;
  transition: color var(--transition-fast);
}

.custom-checkbox-container:hover {
  color: #fff;
}

.custom-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-checkmark {
  position: relative;
  height: 16px;
  width: 16px;
  background-color: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  margin-right: 10px;
  transition: all var(--transition-fast);
  flex-shrink: 0; /* Never let the box squish */
}

.custom-checkbox-container:hover .checkbox-checkmark {
  border-color: var(--color-cyan);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.25);
}

.custom-checkbox-container input:checked ~ .checkbox-checkmark {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 100%);
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Custom premium checked state for required terms checkboxes */
.signup-terms-container .custom-checkbox-container input:checked ~ .checkbox-checkmark {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
  border-color: var(--color-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.checkbox-checkmark:after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.custom-checkbox-container input:checked ~ .checkbox-checkmark:after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

/* Link Forgot Password */
.forgot-password-link {
  color: var(--color-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.forgot-password-link:hover {
  opacity: 0.85;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

/* Primary Submit Button */
.btn-submit-primary {
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--color-cyan) 0%, var(--color-blue) 50%, var(--color-purple) 100%);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 24px;
  flex-shrink: 0;
  box-shadow: 
    0 8px 20px -6px rgba(0, 229, 255, 0.3),
    0 8px 20px -6px rgba(187, 32, 255, 0.3);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.btn-submit-primary:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

.btn-submit-primary:hover:before {
  left: 100%;
}

.btn-submit-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 28px -4px rgba(0, 229, 255, 0.55),
    0 12px 28px -4px rgba(187, 32, 255, 0.55);
  background: linear-gradient(90deg, #00f0ff 0%, #33b5ff 50%, #c433ff 100%);
}

.btn-submit-primary:active {
  transform: translateY(0);
}

.btn-submit-primary:disabled {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.25) 0%, rgba(26, 168, 255, 0.25) 50%, rgba(187, 32, 255, 0.25) 100%) !important;
  color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform var(--transition-fast);
}

.btn-submit-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Dividers */
.divider-text-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  flex-shrink: 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.divider-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: 0 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Secondary outline button */
.btn-outline-secondary {
  width: 100%;
  height: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: #ffffff;
  letter-spacing: 1px;
  cursor: pointer;
  flex-shrink: 0;
  
  /* Gradient border implementation */
  border: 1.5px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: 
    linear-gradient(rgba(7, 17, 32, 0.2), rgba(7, 17, 32, 0.2)), 
    linear-gradient(90deg, var(--color-cyan), var(--color-purple));
  
  border-radius: 10px;
  transition: all var(--transition-normal);
}

.btn-outline-secondary:hover {
  transform: translateY(-1.5px);
  box-shadow: 
    0 6px 15px -4px rgba(0, 229, 255, 0.2),
    0 6px 15px -4px rgba(187, 32, 255, 0.2);
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.04), rgba(187, 32, 255, 0.04)), 
    linear-gradient(90deg, var(--color-cyan), var(--color-purple));
}

.btn-outline-secondary:active {
  transform: translateY(0);
}

/* Social Buttons Grid */
.social-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex-shrink: 0;
}

.btn-social {
  height: 50px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: rgba(2, 8, 20, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.btn-social svg {
  flex-shrink: 0;
}

.btn-social:hover {
  background: rgba(2, 8, 20, 0.7);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-social:active {
  transform: translateY(0);
}

/* ==========================================================================
   Footer Disclaimer
   ========================================================================== */
.modal-footer-disclaimer {
  width: 100%;
  height: 56px;
  background: rgba(2, 8, 20, 0.65);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-muted);
  letter-spacing: 0.5px;
}

.disclaimer-shield-icon {
  color: var(--color-cyan);
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.3));
}

.cyan-highlight {
  color: var(--color-cyan);
  font-weight: 600;
}

/* ==========================================================================
   Animations & Utility Classes
   ========================================================================== */
.hide {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* Height-Based Responsive Scaling for Desktop Screens */
@media (max-height: 820px) and (min-width: 769px) {
  .modal-container {
    height: 90vh;
    min-height: 600px;
  }
  .modal-left {
    padding: 32px 32px 24px 32px;
  }
  .modal-right {
    padding: 56px 40px 32px 40px;
  }
  .brand-logo-area {
    margin-bottom: 20px;
  }
  .left-heading {
    font-size: 1.85rem;
  }
  .left-description {
    margin-bottom: 20px;
    font-size: 0.9rem;
  }
  .features-list {
    gap: 12px;
  }
  .feature-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }
  .feature-icon-box svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-height: 700px) and (min-width: 769px) {
  .modal-container {
    height: 94vh;
    min-height: 520px;
  }
  .modal-left {
    padding: 24px 24px 16px 24px;
  }
  .modal-right {
    padding: 48px 32px 24px 32px;
  }
  .brand-logo-area {
    margin-bottom: 12px;
    gap: 12px;
  }
  .brand-icon-wrapper svg {
    width: 36px;
    height: 36px;
  }
  .brand-name {
    font-size: 1.25rem;
  }
  .brand-sub {
    font-size: 0.65rem;
  }
  .left-heading {
    font-size: 1.5rem;
  }
  .heading-underline {
    margin: 8px 0 16px 0;
  }
  .left-description {
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
  }
  .features-list {
    gap: 8px;
  }
  .feature-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
  }
  .feature-icon-box svg {
    width: 16px;
    height: 16px;
  }
  .feature-content h3 {
    font-size: 0.85rem;
  }
  .feature-content p {
    font-size: 0.75rem;
  }
  .tab-container {
    margin-bottom: 16px;
    height: 46px;
  }
  .form-fields-wrapper {
    gap: 10px;
  }
  .input-wrapper input {
    padding: 12px 12px 12px 40px;
  }
  .input-icon {
    left: 14px;
  }
  .btn-submit-primary {
    height: 50px;
    margin-top: 14px;
  }
  .divider-text-container {
    margin: 12px 0;
  }
  .btn-outline-secondary {
    height: 44px;
  }
  .btn-social {
    height: 44px;
  }
}

/* Tablet & Smaller Desktop (Up to 1024px) */
@media (max-width: 1024px) {
  .modal-container {
    width: 92%;
    height: 720px;
    border-radius: 20px;
  }
  .modal-left {
    padding: 36px 32px;
  }
  .modal-right {
    padding: 36px 36px;
  }
  .left-heading {
    font-size: 1.85rem;
  }
  .brand-logo-area {
    margin-bottom: 24px;
  }
}

/* Mobile Devices (Under 768px) */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
  }
  
  /* Modal responsive adjustments */
  .modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden; /* Avoid page scroll */
  }

  .modal-container {
    width: 92vw;
    height: auto;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    margin: 0 auto;
    overflow: hidden;
    transform: none;
  }

  .modal-content-grid {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  /* Left Panel adjustments - acts as a header on mobile */
  .modal-left {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    padding: 16px 16px 8px 16px;
    background: rgba(5, 12, 28, 0.95);
    border-bottom: 1.5px solid var(--border-color);
  }

  .left-description,
  .features-list {
    display: none !important;
  }

  .brand-logo-area {
    margin-bottom: 8px;
    gap: 8px;
  }

  .brand-icon-wrapper svg {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.05rem;
    letter-spacing: 2px;
  }

  .brand-sub {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }

  .left-heading {
    font-size: 1.15rem;
  }

  .heading-underline {
    margin: 6px 0 0 0;
    width: 40px;
    height: 2px;
  }

  .modal-vertical-divider {
    display: none;
  }

  /* Right Panel adjustments - handles internal scroll if needed */
  .modal-right {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 20px 16px;
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .tab-container {
    height: 38px;
    margin-bottom: 12px;
    border-radius: 8px;
    padding: 2px;
  }

  .tab-indicator {
    top: 2px;
    left: 2px;
    height: calc(100% - 4px);
    width: calc(50% - 3px);
    border-radius: 6px;
  }

  .tab-btn {
    font-size: 0.8rem;
    gap: 4px;
  }

  .tab-btn svg {
    width: 12px;
    height: 12px;
  }

  .form-fields-wrapper {
    gap: 8px;
  }

  .form-group label {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }

  .input-wrapper input {
    padding: 9px 12px 9px 34px;
    font-size: 0.82rem;
    height: 38px;
    border-radius: 6px;
  }

  .input-wrapper input[type="password"],
  .input-wrapper input[type="text"]#password {
    padding-right: 34px;
  }

  .input-icon {
    left: 12px;
    width: 12px;
    height: 12px;
  }

  .password-toggle-btn {
    right: 12px;
  }

  .form-actions-row {
    margin-top: 8px;
  }

  .custom-checkbox-container {
    font-size: 0.75rem;
  }

  .checkbox-checkmark {
    height: 12px;
    width: 12px;
    border-radius: 2px;
    margin-right: 6px;
  }

  .checkbox-checkmark:after {
    left: 3.5px;
    top: 0px;
    width: 2.5px;
    height: 5px;
  }

  .forgot-password-link {
    font-size: 0.75rem;
  }

  .btn-submit-primary {
    height: 42px;
    margin-top: 14px;
    border-radius: 6px;
    font-size: 0.82rem;
  }

  .divider-text-container {
    margin: 10px 0;
  }

  .divider-text {
    font-size: 0.6rem;
    padding: 0 8px;
  }

  .btn-outline-secondary {
    height: 38px;
    border-radius: 6px;
    font-size: 0.78rem;
  }

  .social-buttons-grid {
    gap: 8px;
  }

  .btn-social {
    height: 38px;
    border-radius: 6px;
    font-size: 0.76rem;
    gap: 6px;
  }

  .btn-social svg {
    width: 12px;
    height: 12px;
  }

  .close-btn {
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
  }

  .close-btn svg {
    width: 10px;
    height: 10px;
  }

  .modal-footer-disclaimer {
    padding: 10px 14px;
    font-size: 0.68rem;
  }

  /* Terms alignments inside right panel */

  .signup-terms-container {
    gap: 8px !important;
    margin-top: 4px !important;
  }

  .signup-terms-container .custom-checkbox-container {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
  }

  /* Mobile success panel custom padding adjustments */
  .reset-success-panel {
    padding: 12px 0 !important;
  }

  .reset-success-panel .success-icon-wrapper {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 12px !important;
  }

  .reset-success-panel .success-icon-wrapper svg {
    width: 24px !important;
    height: 24px !important;
  }

  .reset-success-panel h3 {
    font-size: 1.15rem !important;
    margin-bottom: 6px !important;
  }

  .reset-success-panel p {
    font-size: 0.8rem !important;
    margin-bottom: 20px !important;
  }

  .reset-success-panel button {
    max-width: 160px !important;
    height: 38px !important;
    font-size: 0.78rem !important;
  }

  /* Social buttons stack under very narrow viewports if necessary, but keep 2 cols for standard mobile */
  @media (max-width: 480px) {
    .social-buttons-grid {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    .name-fields-row {
      flex-direction: column;
      gap: 8px;
    }
  }

  .modal-footer-disclaimer {
    padding: 12px;
    height: auto;
    text-align: center;
    flex-direction: column;
    gap: 4px;
  }
}

/* ==========================================================================
   Aurora Gateway Integration Overrides
   ========================================================================== */
#aurora-gateway-root .modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

#aurora-gateway-root[data-gateway-step="age"] [data-gateway-panel="auth"] {
  display: none !important;
}

.portal-launcher,
.close-btn,
#dividerSocial,
#socialButtonsGrid {
  display: none !important;
}

.auth-form-message {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  display: none;
}

.auth-form-message.is-visible {
  display: block;
}

.auth-form-message.is-error {
  background: rgba(255, 82, 82, 0.12);
  border: 1px solid rgba(255, 82, 82, 0.35);
  color: #ffb4b4;
}

.auth-form-message.is-success {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.28);
  color: #b8f7ff;
}

.tab-btn:focus-visible,
.input-wrapper input:focus-visible,
.password-toggle-btn:focus-visible,
.forgot-password-link:focus-visible,
.btn-submit-primary:focus-visible,
.btn-outline-secondary:focus-visible,
.btn-social:focus-visible,
.custom-checkbox-container:focus-within {
  outline: 2px solid rgba(0, 229, 255, 0.7);
  outline-offset: 2px;
}

