/* ==========================================================================
   SILVERIOM — Deep Navy & Neon Green Galaxy Auth Portal
   Includes High-Density Twinkling Starfield & Animated Shooting Stars / Comets
   ========================================================================== */

@font-face {
  font-family: 'YekanBakh';
  src: url('fonts/YekanBakh-Regular.woff2') format('woff2'),
       url('fonts/YekanBakh-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'YekanBakh';
  src: url('fonts/YekanBakh-Bold.woff2') format('woff2'),
       url('fonts/YekanBakh-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-midnight: #010610;
  --color-navy: #061628;
  --color-navy-card: rgba(2, 9, 20, 0.18); /* Ultra-Pure Crystal Glass */
  --color-navy-input: rgba(1, 7, 16, 0.65);
  
  --color-neon: #B6FF00; /* Vibrant Neon Green */
  --color-neon-hover: #CCFF33;
  --color-cyan-glow: #B6FF00;
  
  --color-silver: #E2E8F0;
  --color-silver-dim: #94A3B8;
  
  --border-neon: rgba(182, 255, 0, 0.25);
  --border-glass: rgba(255, 255, 255, 0.12);
  
  --shadow-neon: 0 0 30px rgba(182, 255, 0, 0.15);
  --shadow-card: 0 25px 60px rgba(0, 0, 0, 0.7);
  
  --font-persian: 'YekanBakh', 'Yekan Bakh', 'Yekan', Tahoma, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-persian) !important;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  background: #010610;
  color: var(--color-silver);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  position: relative;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

/* ==========================================================================
   MILKY WAY GALAXY & TWINKLING STARS / SHOOTING COMETS BACKGROUND
   ========================================================================== */
.galaxy-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0a2d52 0%, #030e1f 60%, #000308 100%);
  transform-origin: center center;
}

/* High-Density Multi-Layer Starfield Layer 1 */
.starfield {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1.5px 1.5px at 25px 35px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 50px 85px, rgba(182,255,0,0.9), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 110px 45px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 180px 140px, rgba(182,255,0,0.8), rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 250px 210px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 330px 270px, rgba(255,255,255,0.9), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 410px 190px, rgba(182,255,0,0.85), rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 490px 340px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 550px 550px;
  opacity: 0.8;
  animation: starsTwinkle 3s infinite alternate ease-in-out;
}

/* High-Density Multi-Layer Starfield Layer 2 */
.starfield-bright {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 70px 160px, rgba(255,255,255,1), rgba(0,0,0,0)),
    radial-gradient(3px 3px at 140px 290px, rgba(182,255,0,0.95), rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 290px 80px, rgba(255,255,255,0.85), rgba(0,0,0,0)),
    radial-gradient(2px 2px at 380px 420px, rgba(182,255,0,0.9), rgba(0,0,0,0)),
    radial-gradient(2.5px 2.5px at 470px 150px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.65;
  animation: starsSlowPulse 5s infinite alternate ease-in-out;
}

@keyframes starsTwinkle {
  0% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; }
  100% { opacity: 0.6; transform: scale(1.02); }
}

@keyframes starsSlowPulse {
  0% { opacity: 0.3; }
  100% { opacity: 0.85; }
}

/* Glowing Twinkling Cross Stars */
.star-sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(182,255,0,0.6) 40%, transparent 100%);
  box-shadow: 0 0 10px rgba(182, 255, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.9);
  animation: sparkleFlash 4s infinite alternate ease-in-out;
}

.star-sparkle-1 { top: 18%; left: 15%; animation-delay: 0s; }
.star-sparkle-2 { top: 72%; left: 82%; animation-delay: 1.5s; }
.star-sparkle-3 { top: 25%; right: 18%; animation-delay: 2.8s; }
.star-sparkle-4 { bottom: 18%; right: 75%; animation-delay: 0.9s; }

@keyframes sparkleFlash {
  0% { transform: scale(0.6) rotate(0deg); opacity: 0.4; }
  50% { transform: scale(1.4) rotate(45deg); opacity: 1; box-shadow: 0 0 16px rgba(182, 255, 0, 1), 0 0 30px #ffffff; }
  100% { transform: scale(0.7) rotate(90deg); opacity: 0.5; }
}

/* Animated Shooting Comets Across Sky */
.shooting-star {
  position: absolute;
  top: 15%;
  left: 85%;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, rgba(182, 255, 0, 1) 0%, rgba(255, 255, 255, 0.9) 30%, transparent 100%);
  transform: rotate(-35deg);
  animation: cometPass 7s infinite ease-in-out;
  opacity: 0;
  box-shadow: 0 0 10px rgba(182, 255, 0, 0.8);
}

.shooting-star-2 {
  top: 45%;
  left: 92%;
  width: 100px;
  height: 1.5px;
  animation-delay: 3.5s;
}

@keyframes cometPass {
  0% { transform: translate(0, 0) rotate(-35deg); opacity: 0; }
  10% { opacity: 1; }
  25% { transform: translate(-500px, 380px) rotate(-35deg); opacity: 0; }
  100% { opacity: 0; }
}

/* Central SILVERIOM Neon Sun Core */
.galaxy-sun {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, #B6FF00 0%, #76B800 45%, rgba(6, 22, 40, 0.7) 80%, transparent 100%);
  box-shadow: 0 0 90px rgba(182, 255, 0, 0.6), 0 0 180px rgba(118, 184, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  animation: sunPulse 3.5s infinite alternate ease-in-out;
}

.sun-label {
  font-size: 1.25rem;
  font-weight: 900;
  color: #010610;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

@keyframes sunPulse {
  0% { transform: translate(-50%, -50%) scale(0.95); box-shadow: 0 0 70px rgba(182, 255, 0, 0.5); }
  100% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 110px rgba(182, 255, 0, 0.8); }
}

/* Elliptical Orbit Rings */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(182, 255, 0, 0.22);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit-1 { width: 340px; height: 340px; animation: spinOrbit 20s linear infinite; }
.orbit-2 { width: 520px; height: 520px; animation: spinOrbitReverse 30s linear infinite; }
.orbit-3 { width: 700px; height: 700px; animation: spinOrbit 42s linear infinite; }
.orbit-4 { width: 880px; height: 880px; animation: spinOrbitReverse 55s linear infinite; }

@keyframes spinOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinOrbitReverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

/* 3D Navy Blue Spherical Planets */
.planet-sphere {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #0d2a4a 0%, #061629 60%, #020a14 100%);
  border: 1.5px solid rgba(182, 255, 0, 0.85);
  box-shadow: 0 0 25px rgba(182, 255, 0, 0.6), inset -5px -5px 12px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  backdrop-filter: blur(10px);
}

.planet-sphere img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
  flex-shrink: 0;
}

.orbit-1 .planet-sphere { top: -25px; left: 50%; transform: translateX(-50%); animation: counterSpin 20s linear infinite; }
.orbit-2 .planet-sphere { bottom: -25px; left: 50%; transform: translateX(-50%); animation: counterSpinRev 30s linear infinite; }
.orbit-3 .planet-sphere { top: 50%; right: -25px; transform: translateY(-50%); animation: counterSpin 42s linear infinite; }
.orbit-4 .planet-sphere { top: 50%; left: -25px; transform: translateY(-50%); animation: counterSpinRev 55s linear infinite; }

@keyframes counterSpin {
  from { transform: translateX(-50%) rotate(360deg); }
  to { transform: translateX(-50%) rotate(0deg); }
}

@keyframes counterSpinRev {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

/* ==========================================================================
   ULTRA-PURE CRYSTAL GLASS CARD STYLING
   ========================================================================== */
.auth-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 10;
  margin: 0 auto;
}

.auth-glass-card {
  background: var(--color-navy-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15); /* Soft Subtle Glass Border */
  border-radius: 24px;
  padding: 2rem 1.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(182, 255, 0, 0.12);
  position: relative;
  overflow: hidden;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(182, 255, 0, 0.6) 50%, transparent 100%);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-logo {
  height: 44px;
  width: auto;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 0 12px rgba(182, 255, 0, 0.4));
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--color-neon);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Auth Navigation Tabs */
.auth-tabs {
  display: flex;
  background: rgba(1, 7, 16, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.25rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.6rem 0.4rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--color-silver-dim);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  white-space: nowrap;
}

.auth-tab-btn.active {
  background: rgba(6, 22, 40, 0.85);
  color: var(--color-neon);
  border: 1px solid var(--border-neon);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Sub-toggle for Login Method (Mobile vs Email) */
.login-method-toggle {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
  background: rgba(1, 7, 16, 0.45);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}

.method-btn {
  flex: 1;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-silver-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
}

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

.method-btn.active {
  background: rgba(182, 255, 0, 0.18);
  color: var(--color-neon);
  border-color: rgba(182, 255, 0, 0.35);
}

/* Forms */
.auth-form {
  display: none;
  animation: formFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-form.active {
  display: block;
}

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

.form-group {
  margin-bottom: 1.1rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-silver);
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 0.72rem 2.4rem 0.72rem 1rem;
  border-radius: 12px;
  background: var(--color-navy-input);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-size: 0.88rem;
  transition: all 0.25s ease;
  unicode-bidi: plaintext;
}

.auth-input:focus {
  outline: none;
  border-color: var(--color-neon);
  box-shadow: 0 0 20px rgba(182, 255, 0, 0.25);
  background: rgba(6, 22, 40, 0.85);
}

.input-icon {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-silver-dim);
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.auth-input:focus ~ .input-icon {
  color: var(--color-neon);
}

.toggle-password {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-silver-dim);
  cursor: pointer;
  width: 18px;
  height: 18px;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

@media (hover: hover) {
  .toggle-password:hover {
    color: var(--color-neon);
  }
  .btn-neon-submit:hover {
    background: linear-gradient(135deg, #CCFF33 0%, #B6FF00 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(182, 255, 0, 0.5);
  }
  .forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline;
  }
}

/* Options Row */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  font-size: 0.8rem;
  gap: 0.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--color-silver);
  white-space: nowrap;
}

.remember-me input[type="checkbox"] {
  accent-color: var(--color-neon);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.forgot-link {
  color: var(--color-neon);
  text-decoration: none;
  white-space: nowrap;
}

/* Neon Green Submit Button */
.btn-neon-submit {
  width: 100%;
  padding: 0.8rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #B6FF00 0%, #76B800 100%);
  color: #010610;
  border: none;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(182, 255, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-neon-submit svg {
  flex-shrink: 0;
}

.auth-footer-text {
  text-align: center;
  margin-top: 1.15rem;
  font-size: 0.8rem;
  color: var(--color-silver-dim);
  line-height: 1.5;
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: max(1.5rem, env(safe-area-inset-left));
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: calc(100vw - 3rem);
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  background: rgba(6, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-neon);
  color: #ffffff;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slideLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  word-break: break-word;
}

@keyframes slideLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 600px) {
  .galaxy-sun {
    width: 120px;
    height: 120px;
  }
  .sun-label {
    font-size: 0.95rem;
    letter-spacing: 1.5px;
  }
  .orbit-1 { width: 260px; height: 260px; }
  .orbit-2 { width: 380px; height: 380px; }
  .orbit-3 { width: 500px; height: 500px; }
  .orbit-4 { width: 620px; height: 620px; }
  .planet-sphere {
    width: 42px;
    height: 42px;
  }
  .planet-sphere img {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .auth-glass-card {
    padding: 1.35rem 1.15rem;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-subtitle {
    font-size: 0.75rem;
  }

  .galaxy-sun {
    width: 90px;
    height: 90px;
  }
}

/* ==========================================================================
   CLIENT BRAND LOGOS MARQUEE & MEDIA KIT STYLES
   ========================================================================== */
.brand-marquee-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.brand-marquee-title {
  font-size: 0.76rem;
  color: var(--color-silver-dim);
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.brand-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.brand-marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marqueeScroll 20s linear infinite;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.brand-item {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  background: rgba(2, 14, 30, 0.55);
  border: 1px solid rgba(182, 255, 0, 0.25);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-item:hover {
  border-color: var(--color-neon);
  box-shadow: 0 0 15px rgba(182, 255, 0, 0.4);
  color: var(--color-neon);
}

/* ==========================================================================
   FLOATING GRAPHICAL HOME BUTTON (RETURNING TO MAIN WEBSITE)
   ========================================================================== */
.floating-home-btn {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.15rem;
  border-radius: 99px;
  background: rgba(7, 26, 46, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(182, 255, 0, 0.4);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.floating-home-btn svg, .floating-home-btn i {
  width: 18px;
  height: 18px;
  color: var(--color-neon);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.floating-home-btn:hover {
  background: rgba(182, 255, 0, 0.22);
  border-color: var(--color-neon);
  color: var(--color-neon);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(182, 255, 0, 0.35);
}

.floating-home-btn:hover svg {
  transform: scale(1.15);
}

@media (max-width: 480px) {
  .floating-home-btn {
    top: 0.85rem;
    left: 0.85rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
  }
  .toast-container {
    left: 1rem;
    right: 1rem;
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 340px) {
  .method-btn {
    font-size: 0.72rem;
    padding: 0.4rem 0.2rem;
  }
  .auth-tab-btn {
    font-size: 0.8rem;
  }
}
