/* Login-Modal Styles mit verbesserten visuellen Effekten */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(10, 15, 30, 0.92) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(8px);
  perspective: 1000px;
}

.auth-modal.open {
  opacity: 1;
  visibility: visible;
}

.auth-panel {
  background: linear-gradient(145deg, var(--bg-medium, #0f1724) 0%, var(--bg-dark, #0a0e1a) 100%);
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transform-style: preserve-3d;
  animation: modalAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalAppear {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(-20px) rotateX(5deg);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.auth-header {
  padding: 25px 20px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent);
}

.auth-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary, #0ea5e9), var(--accent-secondary, #8b5cf6));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 3s infinite linear;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 15px rgba(6, 182, 212, 0.3);
}

.auth-subtitle {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--text-secondary, #64748b);
  opacity: 0.8;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.auth-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 5;
}

.auth-close:hover {
  background: #ef4444;
  color: #fff;
  transform: rotate(180deg);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.2);
}

.auth-close:active {
  transform: rotate(180deg) scale(0.9);
}

.auth-toggle {
  display: flex;
  margin: 25px auto;
  width: fit-content;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 30px;
  padding: 5px;
  position: relative;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-toggle:before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-toggle-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
  cursor: pointer;
  border-radius: 30px;
  position: relative;
  z-index: 1;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-toggle-slider {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  width: calc(50% - 5px);
  background: linear-gradient(135deg, var(--accent-primary, #0ea5e9), var(--accent-secondary, #8b5cf6));
  border-radius: 30px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.auth-toggle-slider:before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  opacity: 0.5;
}

.auth-toggle.register .auth-toggle-slider {
  transform: translateX(100%);
}

.auth-toggle-btn.active {
  color: #fff;
}

.auth-toggle-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.9);
}

.auth-forms {
  position: relative;
  overflow: hidden;
  height: 380px;
  perspective: 1000px;
}

.auth-form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 25px 30px;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center center;
  backface-visibility: hidden;
}

.auth-form.login {
  transform: translateX(0) rotateY(0);
  z-index: 2;
}

.auth-form.register {
  transform: translateX(100%) rotateY(-10deg);
  opacity: 0.7;
  z-index: 1;
}

.auth-toggle.register ~ .auth-forms .auth-form.login {
  transform: translateX(-100%) rotateY(10deg);
  opacity: 0.7;
  z-index: 1;
}

.auth-toggle.register ~ .auth-forms .auth-form.register {
  transform: translateX(0) rotateY(0);
  opacity: 1;
  z-index: 2;
}

/* Staggered animation for form elements */
.auth-form.login .form-group,
.auth-form.register .form-group {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal.open .auth-form.login .form-group,
.auth-toggle.register ~ .auth-forms .auth-form.register .form-group {
  opacity: 1;
  transform: translateY(0);
}

.auth-modal.open .auth-form.login .form-group:nth-child(1),
.auth-toggle.register ~ .auth-forms .auth-form.register .form-group:nth-child(1) {
  transition-delay: 0.2s;
}

.auth-modal.open .auth-form.login .form-group:nth-child(2),
.auth-toggle.register ~ .auth-forms .auth-form.register .form-group:nth-child(2) {
  transition-delay: 0.3s;
}

.auth-modal.open .auth-form.login .form-group:nth-child(3),
.auth-toggle.register ~ .auth-forms .auth-form.register .form-group:nth-child(3) {
  transition-delay: 0.4s;
}

.auth-modal.open .auth-form.login .form-group:nth-child(4),
.auth-toggle.register ~ .auth-forms .auth-form.register .form-group:nth-child(4) {
  transition-delay: 0.5s;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  transform-origin: left;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  color: var(--text-primary, #f8fafc);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
  border-color: var(--accent-primary, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15), 0 2px 10px rgba(14, 165, 233, 0.1);
  outline: none;
  background: rgba(14, 165, 233, 0.05);
}

.form-group:focus-within .form-label {
  color: var(--accent-primary, #0ea5e9);
  transform: scale(1.05);
}

/* Input icon styles */
.form-group::before {
  content: '';
  position: absolute;
  top: 38px;
  left: 14px;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  z-index: 1;
  transition: all 0.3s ease;
}

.form-group.has-icon .form-input {
  padding-left: 40px;
}

.form-group:focus-within::before {
  opacity: 1;
  filter: drop-shadow(0 0 3px var(--accent-primary, #0ea5e9));
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.remember-me {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  position: relative;
  cursor: pointer;
}

.remember-me input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.remember-me span {
  margin-left: 28px;
  user-select: none;
}

.remember-me span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.remember-me:hover span::before {
  border-color: var(--accent-primary, #0ea5e9);
  background: rgba(14, 165, 233, 0.05);
}

.remember-me input:checked ~ span::before {
  background: linear-gradient(135deg, var(--accent-primary, #0ea5e9), var(--accent-secondary, #8b5cf6));
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

.remember-me input:checked ~ span::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  animation: checkmark 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes checkmark {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.2);
  }
  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

.forgot-password {
  font-size: 14px;
  color: var(--accent-primary, #0ea5e9);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.forgot-password:hover {
  color: var(--accent-secondary, #8b5cf6);
}

.forgot-password::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--accent-primary, #0ea5e9), var(--accent-secondary, #8b5cf6));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.forgot-password:hover::after {
  transform: scaleX(1);
}

.form-submit {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary, #0ea5e9), var(--accent-secondary, #8b5cf6));
  background-size: 200% auto;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  margin-top: 25px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  font-size: 16px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

.form-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.form-submit:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.form-submit:hover::before {
  left: 100%;
}

.form-submit:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

.form-error {
  color: #ef4444;
  font-size: 14px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
  border-left: 3px solid #ef4444;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform: translate3d(0, 0, 0);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

.form-error::before {
  content: '⚠️';
  margin-right: 8px;
  font-size: 12px;
}

.auth-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #64748b);
  font-size: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
}

.auth-footer a {
  color: var(--accent-primary, #0ea5e9);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
  padding: 2px 4px;
  margin: 0 2px;
}

.auth-footer a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary, #0ea5e9), var(--accent-secondary, #8b5cf6));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right;
}

.auth-footer a:hover {
  color: var(--accent-secondary, #8b5cf6);
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.auth-footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.social-auth {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-auth-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  font-weight: 500;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.social-auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: all 0.6s ease;
}

.social-auth-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary, #0ea5e9);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-auth-btn:hover::before {
  left: 100%;
}

.social-auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.social-auth-btn[data-provider="google"] {
  background: linear-gradient(135deg, #4285F4, #34A853);
  border-color: #4285F4;
}

.social-auth-btn[data-provider="facebook"] {
  background: linear-gradient(135deg, #3b5998, #4267B2);
  border-color: #3b5998;
}

.divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
}

.divider:before,
.divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.divider span {
  padding: 0 10px;
}
