/* =========================================================
   Cloud Node X - Premium Shiny Green & Shiny Black Auth Portal
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
  --primary-green: #00ff66;
  --primary-green-glow: rgba(0, 255, 102, 0.3);
  --dark-bg: #030305;
  --shiny-black-card: rgba(10, 10, 15, 0.85);
  --input-bg: rgba(255, 255, 255, 0.03);
  --input-border: rgba(255, 255, 255, 0.08);
  --text-muted: #718096;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  background: radial-gradient(circle at center, #061c0f 0%, #020204 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Language Button --- */
.lang-selector-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #00ff66 0%, #00993d 100%);
  border-radius: 50%;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 255, 102, 0.4);
  z-index: 100;
  transition: all 0.3s ease;
}

.lang-selector-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 255, 102, 0.6);
}

/* --- Ambient Cyber Glows --- */
.ambient-glow {
  position: fixed;
  width: 45vw;
  height: 45vw;
  min-width: 350px;
  min-height: 350px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
}

.bg-glow-1 {
  top: -10%;
  left: -10%;
}

.bg-glow-2 {
  bottom: -10%;
  right: -10%;
  opacity: 0.1;
}

/* --- Wrapper and Grid --- */
.auth-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  box-sizing: border-box;
}

.auth-form {
  width: 100%;
  max-width: 430px;
  animation: fadeInUp 0.6s ease-out;
}

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

/* --- Logo Section --- */
.auth-logo {
  margin-bottom: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(0, 255, 102, 0.25));
  transition: all 0.4s ease;
}

.auth-logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 25px rgba(0, 255, 102, 0.45));
}

.auth-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 0%, #a5d6a7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 14px;
}

.auth-subtitle {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-green);
  margin-top: 4px;
  text-shadow: 0 0 5px rgba(0, 255, 102, 0.2);
}

/* --- Card container (.auth-box) --- */
.auth-box {
  position: relative;
  background: var(--shiny-black-card);
  border: 1.5px solid rgba(0, 255, 102, 0.2);
  border-radius: 28px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 255, 102, 0.12);
  padding: 35px 28px;
  overflow: visible;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.auth-box:hover {
  border-color: rgba(0, 255, 102, 0.4);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 255, 102, 0.18);
}

/* Heading inside form */
.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

/* --- High-Tech Form Fields --- */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

/* Pill Input Group */
.input-pill-group {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 50px;
  padding: 8px 18px;
  transition: all 0.3s ease;
  min-height: 52px;
  box-sizing: border-box;
}

.input-pill-group:focus-within {
  border-color: var(--primary-green);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.input-icon-svg {
  width: 20px;
  height: 20px;
  color: var(--primary-green);
  flex-shrink: 0;
  margin-right: 12px;
  filter: drop-shadow(0 0 2px rgba(0, 255, 102, 0.3));
}

/* Prefix inside inputs */
.input-prefix-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  margin-right: 12px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.input-divider-line {
  height: 20px;
  width: 1px;
  background: rgba(0, 255, 102, 0.3);
  margin-right: 14px;
}

/* Form Controls */
.form-control-pill {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: #ffffff;
  padding: 4px 0;
  width: 100%;
  font-family: 'Outfit', sans-serif;
}

.form-control-pill::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

/* Right icon action button */
.input-action-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.input-action-btn:hover {
  color: var(--primary-green);
}

.input-action-svg {
  width: 20px;
  height: 20px;
}

/* --- SMS code Send Button --- */
.send-sms-btn {
  background: transparent;
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  font-weight: 700;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  margin-left: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.send-sms-btn:hover:not(:disabled) {
  background: var(--primary-green);
  color: #000000;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}

.send-sms-btn:disabled {
  border-color: var(--text-muted);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* --- Checkbox row --- */
.terms-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 4px 22px;
}

.terms-checkbox-custom {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(0, 255, 102, 0.4);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.terms-checkbox-custom:checked {
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.terms-checkbox-custom:checked::after {
  content: '✓';
  position: absolute;
  color: #000000;
  font-size: 12px;
  font-weight: 900;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.terms-text-custom {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  user-select: none;
}

.terms-text-custom a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 700;
}

.terms-text-custom a:hover {
  text-decoration: underline;
}

/* --- Action Submit Button --- */
.btn-pill-submit {
  width: 100%;
  background: linear-gradient(135deg, #00ff66 0%, #00993d 100%);
  color: #000000;
  border: none;
  outline: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 255, 102, 0.3);
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-pill-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 255, 102, 0.5);
  filter: brightness(1.05);
}

.btn-pill-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-pill-submit:disabled {
  background: #2d3748;
  color: #718096;
  box-shadow: none;
  cursor: not-allowed;
}

/* --- Forgot and Subtext Links --- */
.forgot-password-link {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.forgot-password-link a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  margin-left: 5px;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.auth-footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.auth-footer-text .action-link {
  color: var(--primary-green);
  font-weight: 700;
  text-decoration: none;
  margin-left: 6px;
  cursor: pointer;
}

.auth-footer-text .action-link:hover {
  text-decoration: underline;
}

/* --- Brand Google Play Button --- */
.google-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 0;
  padding: 10px 24px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: fit-content;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.google-play-btn:hover {
  background: rgba(0, 255, 102, 0.08);
  border-color: rgba(0, 255, 102, 0.3);
  transform: translateY(-1px);
}

.play-store-logo {
  flex-shrink: 0;
}

.google-play-text {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

/* --- Toast Notification Style --- */
.toast {
  position: fixed;
  top: auto !important;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(10, 10, 12, 0.95);
  border: 1.5px solid var(--primary-green);
  border-radius: 50px;
  padding: 12px 30px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 102, 0.25);
  z-index: 100000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { border-color: #00ff66; }
.toast.error { border-color: #ff3366; }
.toast.info { border-color: #00e5ff; }

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2.5px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* --- Block & PlayStore Popups --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 4, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-box {
  background: rgba(10, 10, 15, 0.95);
  border: 1.5px solid rgba(0, 255, 102, 0.3);
  border-radius: 24px;
  padding: 30px 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 255, 102, 0.2);
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.active .popup-box {
  transform: scale(1);
}

.popup-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 8px;
}

.btn-popup-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  margin-top: 15px;
  transition: all 0.2s ease;
}

.btn-popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-popup-appeal {
  background: linear-gradient(135deg, #ff3366, #b3002d);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  flex: 1;
  transition: all 0.2s ease;
}

.btn-popup-appeal:hover {
  filter: brightness(1.1);
}
