/* ===== CSS RESET & GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-gold: #ffb300;
  --color-orange: #ff7b00;
  --color-dark: #0d0d0d;
  --color-charcoal: #121212;
  --color-white: #ffffff;
  --color-silver: #bdbdbd;
  --shadow-gold: rgba(255, 179, 0, 0.4);
  --transition-default: all 0.4s ease-in-out;
}

body {
  font-family: "Poppins", "Inter", sans-serif;
  background-color: var(--color-charcoal);
  color: var(--color-white);
  overflow-x: hidden;
}

/* ===== PRELOADER STYLES ===== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  animation: fadeInScale 1.2s ease-out;
}

.logo-container {
  margin-bottom: 40px;
}

.logo-wrapper {
  position: relative;
  display: inline-block;
}

.logo-text {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px var(--shadow-gold);
  animation: shimmer 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, var(--shadow-gold), transparent 70%);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  opacity: 0.5;
}

.partner-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-silver);
  margin-top: 8px;
  letter-spacing: 2px;
}

.taglines {
  margin-top: 50px;
}

.tagline-powered {
  font-size: 14px;
  color: var(--color-gold);
  font-weight: 500;
  margin-bottom: 12px;
}

.tagline-govt {
  font-size: 12px;
  color: var(--color-silver);
  opacity: 0.8;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.9;
    filter: brightness(1.2);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.3;
  }
}

/* ===== MAIN CONTENT STYLES ===== */
.main-content {
  display: none;
  min-height: 100vh;
  padding-bottom: 40px;
}

.main-content.show {
  display: block;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Strip */
.header-strip {
  width: 100%;
  height: 8px;
  position: relative;
  overflow: hidden;
}

.strip-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-orange));
  animation: shimmerStrip 2s ease-in-out infinite;
}

@keyframes shimmerStrip {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  padding: 40px 20px 30px;
  animation: slideDown 0.8s ease-out 0.3s both;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-small {
  margin: 0 auto;
  max-width: 200px;
}

.logo-small h2 {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-small p {
  font-size: 14px;
  color: var(--color-silver);
  letter-spacing: 3px;
  margin-top: 4px;
}

/* Login Container */
.login-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 24px;
  animation: slideUp 0.8s ease-out 0.5s both;
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-white);
}

.login-subtitle {
  font-size: 14px;
  color: var(--color-silver);
  margin-bottom: 32px;
}

/* Login Form */
.login-form {
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-silver);
  margin-bottom: 8px;
}

.mobile-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 2px solid var(--color-gold);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  font-size: 16px;
  font-family: "Inter", sans-serif;
  outline: none;
  transition: var(--transition-default);
}

.mobile-input:focus {
  border-color: var(--color-orange);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px var(--shadow-gold);
}

.mobile-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.otp-button {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
  border: none;
  border-radius: 12px;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: var(--transition-default);
  box-shadow: 0 4px 15px var(--shadow-gold);
  margin-bottom: 16px;
}

.otp-button:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px var(--shadow-gold);
}

.otp-button:active {
  transform: scale(0.98);
}

.otp-button.pulse {
  animation: pulseButton 0.6s ease-in-out;
}

@keyframes pulseButton {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.terms-text {
  font-size: 12px;
  color: var(--color-silver);
  text-align: center;
  line-height: 1.6;
}

.terms-link {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s;
}

.terms-link:hover {
  color: var(--color-orange);
}

/* Help Section */
.help-section {
  text-align: center;
  padding-top: 20px;
}

.help-link {
  color: var(--color-silver);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

.help-link:hover {
  color: var(--color-gold);
}

/* ===== LANGUAGE POPUP STYLES ===== */
.language-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.language-popup-overlay.show {
  display: flex;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.language-popup {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 179, 0, 0.2);
  padding: 24px;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.popup-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-white);
}

.close-popup {
  background: none;
  border: none;
  color: var(--color-silver);
  font-size: 32px;
  cursor: pointer;
  transition: var(--transition-default);
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-popup:hover {
  color: var(--color-gold);
  background-color: rgba(255, 179, 0, 0.1);
}

.language-list {
  margin-bottom: 24px;
}

.language-item {
  display: flex;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-default);
}

.language-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 179, 0, 0.3);
}

.language-item.selected {
  background-color: rgba(255, 179, 0, 0.15);
  border-color: var(--color-gold);
}

.language-item .flag {
  font-size: 24px;
  margin-right: 12px;
}

.language-item .lang-name {
  flex: 1;
  font-size: 16px;
  color: var(--color-white);
  font-weight: 500;
}

.language-item .check-icon {
  color: var(--color-gold);
  font-size: 20px;
  font-weight: bold;
}

.language-item.selected .check-icon {
  display: inline-block !important;
}

.continue-button {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-orange));
  border: none;
  border-radius: 12px;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: var(--transition-default);
  box-shadow: 0 4px 15px var(--shadow-gold);
}

.continue-button:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px var(--shadow-gold);
}

.continue-button:active {
  transform: scale(0.98);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 360px) {
  .logo-text {
    font-size: 40px;
  }

  .login-title {
    font-size: 24px;
  }

  .mobile-input,
  .otp-button,
  .continue-button {
    height: 48px;
  }
}

@media (min-width: 768px) {
  .login-container {
    max-width: 500px;
  }

  .language-popup {
    max-width: 450px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus,
input:focus,
a:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}
