/* ==========================================================================
   Modern & Ultra-Professional Auth Stylesheet (v2.0)
   Designed for Amoozesh-e-Arabi Platform
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-glow: #3b82f6;
  --secondary-glow: #6366f1;
  --accent-glow: #06b6d4;
  --bg-gradient-1: #030712;
  --bg-gradient-2: #0f172a;
  --bg-gradient-3: #1e1b4b;
  --card-bg: rgba(15, 23, 42, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-glow: rgba(59, 130, 246, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --input-bg: rgba(30, 41, 59, 0.7);
  --input-border: rgba(255, 255, 255, 0.08);
  --input-border-focus: #3b82f6;
  --input-text: #ffffff;
  --btn-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --btn-hover-shadow: 0 12px 35px -5px rgba(59, 130, 246, 0.5);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  letter-spacing: -0.01em;
}

body {
  background-color: var(--bg-gradient-1);
  background-image: 
    radial-gradient(at 10% 20%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.1) 0px, transparent 60%),
    linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3));
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-main);
  overflow-x: hidden;
}

/* Page Layout Container */
.auth-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  position: relative;
}

/* Ambient Background Glow Effect */
.auth-page::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, var(--primary-glow), var(--accent-glow));
  filter: blur(100px);
  opacity: 0.18;
  z-index: 0;
  border-radius: 50%;
  animation: floatGlow 8s ease-in-out infinite alternate;
}

@keyframes floatGlow {
  0% { transform: translateY(-30px) scale(0.9); }
  100% { transform: translateY(30px) scale(1.1); }
}

/* Card Container */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 28px;
  padding: 42px 34px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  z-index: 1;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(35px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Headings & Subtitles */
.auth-card h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 400;
}

/* Form Groups & Inputs */
.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: var(--transition-smooth);
}

.auth-form input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--input-border);
  outline: none;
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 0.98px;
  font-size: 0.98rem;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) inset;
}

.auth-form input::placeholder {
  color: #64748b;
}

.auth-form input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(30, 41, 59, 0.9);
}

.auth-form input:focus {
  border-color: var(--input-border-focus);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 
    0 0 0 4px rgba(59, 130, 246, 0.22),
    0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Action Button */
.auth-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: var(--btn-gradient);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-top: 10px;
  box-shadow: 0 6px 20px -4px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

.auth-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.auth-btn:hover::after {
  left: 100%;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-hover-shadow);
  filter: brightness(1.08);
}

.auth-btn:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

/* Switch Links */
.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
  border-bottom: 1px dashed rgba(56, 189, 248, 0.4);
  padding-bottom: 1px;
}

.auth-switch a:hover {
  color: #7dd3fc;
  border-bottom-color: #7dd3fc;
}

/* ==========================================================================
   Responsive Breakpoints & Orientation Rules
   ========================================================================== */

/* Mobile Devices (Portrait & Small Screens) */
@media (max-width: 576px) {
  .auth-page {
    padding: 16px;
    align-items: center;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
    max-width: 100%;
  }

  .auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
  }

  .auth-subtitle {
    font-size: 0.88rem;
    margin-bottom: 22px;
  }

  .auth-form .form-group {
    margin-bottom: 16px;
  }

  .auth-form input {
    padding: 12px 14px;
    font-size: 0.94rem;
    border-radius: 12px;
  }

  .auth-btn {
    padding: 13px;
    font-size: 0.98rem;
    border-radius: 12px;
  }
}

/* Tablets (Portrait & General Medium Screens) */
@media (min-width: 577px) and (max-width: 991px) {
  .auth-card {
    max-width: 480px;
    padding: 36px 28px;
  }
}

/* Mobile & Tablet Landscape Mode (Low Height Optimization) */
@media (max-height: 600px) and (orientation: landscape) {
  .auth-page {
    padding: 20px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .auth-card {
    margin: auto;
    max-width: 460px;
    padding: 24px 28px;
  }

  .auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .auth-subtitle {
    margin-bottom: 16px;
    font-size: 0.85rem;
  }

  .auth-form .form-group {
    margin-bottom: 12px;
  }

  .auth-form input {
    padding: 10px 14px;
  }

  .auth-btn {
    padding: 11px;
    margin-top: 6px;
  }

  .auth-switch {
    margin-top: 14px;
  }
}
