/* =============================================
   Kuaförim App - Elite Auth Styles
   Premium Login & Register Design
   ============================================= */

/* Auth page base */
.auth-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a0a 0%, #111111 50%, #0d0d0d 100%);
}

/* ===== Animated Background Decoration ===== */
.auth-bg-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

.bg-circle.c1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #d4af37, #f4d03f);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.bg-circle.c2 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  bottom: 10%;
  left: -80px;
  animation-delay: -7s;
}

.bg-circle.c3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #fff8e7, #d4af37);
  top: 50%;
  right: -50px;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-20px, 30px) scale(1.1); }
  50% { transform: translate(20px, -20px) scale(0.95); }
  75% { transform: translate(-30px, -10px) scale(1.05); }
}

/* ===== Logo Section ===== */
.auth-logo-wrap {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.auth-logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
  animation: pulse-glow 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.auth-logo {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
  border-radius: 24px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.logo-letter {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* ===== Brand Typography ===== */
.auth-brand {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.brand-text {
  color: #ffffff;
}

.brand-accent {
  background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.brand-accent::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #f4d03f);
  border-radius: 2px;
  animation: underline-pulse 2s ease-in-out infinite;
}

@keyframes underline-pulse {
  0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* ===== Tagline ===== */
.auth-tagline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 40px;
  letter-spacing: 0.5px;
}

.tagline-icon {
  font-size: 16px;
  animation: icon-bounce 2s ease-in-out infinite;
}

@keyframes icon-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-5deg); }
  75% { transform: translateY(-3px) rotate(5deg); }
}

/* ===== Auth Form ===== */
.auth-form {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
}

/* Input Group */
.auth-form .input-group {
  position: relative;
  margin-bottom: 20px;
}

.auth-form .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
  z-index: 2;
  transition: all 0.3s ease;
}

.auth-form .input-group input {
  width: 100%;
  padding: 18px 50px 18px 52px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  -webkit-appearance: none;
}

.auth-form .input-group input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.auth-form .input-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 
    0 0 0 4px rgba(212, 175, 55, 0.1),
    0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-form .input-group input:focus + .toggle-pass + .input-focus-line,
.auth-form .input-group input:focus ~ .input-focus-line {
  transform: scaleX(1);
}

.auth-form .input-group:focus-within .input-icon {
  color: #d4af37;
}

/* Focus Line */
.input-focus-line {
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

/* Password Toggle */
.auth-form .toggle-pass {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
  z-index: 2;
}

.auth-form .toggle-pass:hover {
  color: #d4af37;
}

/* ===== Primary Button ===== */
.btn-auth {
  position: relative;
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #000000;
  border: none;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 8px;
  box-shadow: 
    0 8px 24px rgba(212, 175, 55, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 32px rgba(212, 175, 55, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-auth:active {
  transform: translateY(0) scale(0.98);
}

.btn-auth:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-auth:hover .btn-shine {
  left: 100%;
}

/* ===== Divider ===== */
.auth-divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 28px 0;
  width: 100%;
  max-width: 380px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.divider-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===== Guest Button ===== */
.btn-guest {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-guest i {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.btn-guest:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-guest:hover i {
  color: #d4af37;
}

/* ===== Footer ===== */
.auth-footer {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
  color: #d4af37;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.auth-footer a:hover {
  color: #f4d03f;
  text-decoration: underline;
}

/* ===== Terms ===== */
.auth-terms {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  max-width: 320px;
}

.auth-terms a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  transition: color 0.2s;
}

.auth-terms a:hover {
  color: #d4af37;
}

/* ===== Error Message ===== */
.auth-error {
  padding: 14px 18px;
  background: rgba(229, 57, 53, 0.1);
  border: 1px solid rgba(229, 57, 53, 0.3);
  border-radius: 12px;
  color: #ef5350;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
  text-align: left;
}

.auth-error.visible {
  display: block;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ===== Desktop Enhancements ===== */
@media (min-width: 768px) {
  .auth-page {
    padding: 60px 40px;
  }

  .auth-logo {
    width: 100px;
    height: 100px;
    border-radius: 28px;
  }

  .logo-letter {
    font-size: 56px;
  }

  .auth-brand {
    font-size: 42px;
  }

  .auth-form {
    max-width: 420px;
  }

  .auth-form .input-group input {
    padding: 20px 54px 20px 56px;
    font-size: 17px;
    border-radius: 18px;
  }

  .btn-auth {
    padding: 20px 28px;
    font-size: 18px;
    border-radius: 18px;
  }

  .btn-guest {
    max-width: 420px;
    padding: 18px 28px;
    border-radius: 18px;
  }

  .bg-circle.c1 {
    width: 400px;
    height: 400px;
  }

  .bg-circle.c2 {
    width: 350px;
    height: 350px;
  }

  .bg-circle.c3 {
    width: 300px;
    height: 300px;
  }
}

/* ===== Safe Area ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .auth-page {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}