/* ============================================
   MOBILE LOGIN & OTP VERIFICATION STYLES
   Modern, Responsive Authentication Design
   ============================================ */

/* ============================================
   ROOT VARIABLES & THEME
   ============================================ */
:root {
  /* Primary Colors */
  --primary-color: #696cff;
  --primary-hover: #5f61e6;
  --primary-light: rgba(105, 108, 255, 0.1);
  
  /* Accent Colors */
  --accent-pink: #FF0066;
  --accent-pink-dark: #D50B8B;
  --accent-pink-light: rgba(255, 207, 239, 0.3);
  
  /* Semantic Colors */
  --success-color: #28c76f;
  --error-color: #ea5455;
  --warning-color: #ff9f43;
  --info-color: #00cfe8;
  
  /* Neutral Colors */
  --text-primary: #5e5873;
  --text-secondary: #6e6b7b;
  --text-light: #b9b9c3;
  --border-color: #ebe9f1;
  --bg-white: #ffffff;
  --bg-light: #f8f8f8;
  
  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.2);
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-2xl: 3rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --text-primary: #d0d2d6;
  --text-secondary: #b4b7bd;
  --text-light: #7c7e84;
  --border-color: #3b4253;
  --bg-white: #283144;
  --bg-light: #232838;
}

/* ============================================
   LAYOUT & CONTAINER
   ============================================ */
.auth-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.6s ease;
}

.auth-card {
  display: flex;
  width: 100%;
  max-width: 1200px;
  min-height: 600px;
  background: var(--bg-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: slideUp 0.6s ease;
  position: relative;
}

/* ============================================
   LEFT SECTION - BRANDING
   ============================================ */
.auth-left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: linear-gradient(135deg, var(--accent-pink-light), rgba(213, 11, 139, 0.08));
  border-right: 2px solid rgba(213, 11, 139, 0.15);
  position: relative;
  overflow: hidden;
}

.auth-left-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

.auth-logo-section {
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-logo-img {
  width: 300px;
  height: 200px;

  /* margin-bottom: 2rem; */
  /* box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
  border: 4px solid rgba(255, 255, 255, 0.5); */
}

.auth-title {
  font-size: 2.5rem;
  color: var(--accent-pink);
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Public Sans', sans-serif;
  animation: fadeInDown 0.8s ease 0.2s both;
}

.auth-subtitle {
  font-size: 2rem;
  color: var(--accent-pink-dark);
  font-weight: 600;
  font-family: 'Public Sans', sans-serif;
  animation: fadeInDown 0.8s ease 0.4s both;
}

.auth-decoration {
  margin-top: 2rem;
  font-size: 4rem;
  color: var(--accent-pink);
  opacity: 0.3;
  animation: rotate 4s linear infinite;
}

.otp-decoration {
  animation: bounce 2s ease-in-out infinite;
}

/* ============================================
   RIGHT SECTION - FORM
   ============================================ */
.auth-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--bg-white);
}

.auth-form-container {
  width: 100%;
  max-width: 450px;
  animation: fadeInRight 0.8s ease 0.3s both;
}

/* ============================================
   FORM HEADER
   ============================================ */
.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-form-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  animation: fadeInDown 0.6s ease 0.4s both;
}

.auth-form-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  animation: fadeInDown 0.6s ease 0.5s both;
}

.auth-form-subtitle strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.form-label i {
  font-size: 1.2rem;
  color: var(--primary-color);
}

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

.input-prefix {
  position: absolute;
  left: 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  z-index: 1;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 4rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
  transform: translateY(-2px);
}

.auth-input::placeholder {
  color: var(--text-light);
}

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ============================================
   OTP INPUT FIELDS
   ============================================ */
.otp-input-container {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.otp-input {
  width: 60px;
  height: 70px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  caret-color: var(--primary-color);
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
  transform: scale(1.05);
}

.otp-input.success {
  border-color: var(--success-color);
  background: rgba(40, 199, 111, 0.05);
  animation: successPulse 0.4s ease;
}

/* ============================================
   TIMER & RESEND SECTION
   ============================================ */
.otp-timer-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.timer-display i {
  font-size: 1.25rem;
  color: var(--primary-color);
  animation: tick 1s ease-in-out infinite;
}

.resend-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: not-allowed;
  transition: all var(--transition-base);
}

.resend-btn:disabled {
  opacity: 0.5;
}

.resend-btn.active {
  color: var(--primary-color);
  border-color: var(--primary-color);
  cursor: pointer;
}

.resend-btn.active:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.resend-btn i {
  font-size: 1.1rem;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.alert-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideInDown 0.4s ease;
}

.alert-message i {
  font-size: 1.5rem;
}

.error-message {
  background: rgba(234, 84, 85, 0.1);
  color: var(--error-color);
  border: 2px solid rgba(234, 84, 85, 0.2);
}

.error-message i {
  color: var(--error-color);
}

.success-message {
  background: rgba(40, 199, 111, 0.1);
  color: var(--success-color);
  border: 2px solid rgba(40, 199, 111, 0.2);
}

.success-message i {
  color: var(--success-color);
  animation: checkmark 0.5s ease;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-auth::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-auth:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: 0 4px 15px rgba(105, 108, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(105, 108, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-icon {
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
  transition: transform var(--transition-base);
}

.btn-auth:hover .btn-icon {
  transform: translateX(5px);
}

/* ============================================
   FOOTER LINKS
   ============================================ */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
}

.back-link:hover {
  color: var(--primary-color);
  transform: translateX(-5px);
}

.back-link i {
  font-size: 1.1rem;
  transition: transform var(--transition-base);
}

.back-link:hover i {
  transform: translateX(-3px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes tick {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
  }
  50% {
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
  .auth-card {
    flex-direction: column;
    max-width: 600px;
  }
  
  .auth-left-section {
    border-right: none;
    border-bottom: 2px solid rgba(213, 11, 139, 0.15);
    padding: 2rem;
  }
  
  .auth-logo-img {
    width: 200px;
    height: 130px;
  }
  
  .auth-title {
    font-size: 2rem;
  }
  
  .auth-subtitle {
    font-size: 1.5rem;
  }
  
  .auth-decoration {
    font-size: 3rem;
    margin-top: 1rem;
  }
  
  .auth-right-section {
    padding: 2rem;
  }
  
  .auth-form-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 576px) {
  .auth-container {
    padding: 1rem;
  }
  
  .auth-card {
    border-radius: var(--radius-xl);
    min-height: auto;
  }
  
  .auth-left-section,
  .auth-right-section {
    padding: 1.5rem;
  }
  
  .auth-logo-img {
    width: 150px;
    height: 100px;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .auth-subtitle {
    font-size: 1.25rem;
  }
  
  .auth-form-title {
    font-size: 1.5rem;
  }
  
  .auth-form-subtitle {
    font-size: 0.9rem;
  }
  
  .otp-input-container {
    gap: 0.5rem;
  }
  
  .otp-input {
    width: 50px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .otp-timer-section {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .resend-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: 0.15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.125em;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.auth-input:focus-visible,
.otp-input:focus-visible,
.btn-auth:focus-visible,
.resend-btn:focus-visible,
.back-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
