/* Auth Pages - Modern Professional Design */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-color: #4CAF50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --bg-dark: #1a1a2e;
  --bg-light: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #a8a8a8;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

html, body {
  background: #211e32 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh !important;
  height: 100vh !important;
  box-sizing: border-box !important;
}
.auth-page, .bg-shapes {
  background: #211e32 !important;
}

/* Background Animation */
.auth-page {
  min-height: 100vh;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* Animated Background Shapes */
.bg-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.shape {
  position: absolute;
  background: var(--primary-gradient);
  filter: blur(40px);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -100px;
  right: -100px;
  animation-delay: 5s;
  background: var(--secondary-gradient);
}

.shape:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Auth Container */
.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* Toggle Switch */
.auth-toggle {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 5px;
  margin-bottom: 30px;
  position: relative;
}

.auth-toggle-btn {
  flex: 1;
  padding: 12px 24px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

.auth-toggle-btn.active {
  color: var(--text-primary);
}

.toggle-slider {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  background: var(--primary-gradient);
  border-radius: 45px;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1;
}

.toggle-slider.register {
  transform: translateX(100%);
}

/* Form Container */
.auth-form-container {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.auth-form-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.auth-logo img {
  height: 50px;
  /* Logo beyaz olduğu için filter kaldırıldı */
  opacity: 0.9;
}

/* Form Title */
.auth-title {
  text-align: center;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

/* Form Groups */
.form-group {
  position: relative;
  margin-bottom: 25px;
  z-index: 2;
}

.form-input {
  width: 100%;
  padding: 15px 20px 15px 48px; /* Sol padding: ikon (20px) + boşluk (13px) + biraz daha */
  font-size: 16px;
  height: 48px; /* Yüksekliği sabit tut */
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

/* Floating Labels */
.form-label {
  position: absolute;
  left: 48px; /* input'un sol padding'i ile aynı */
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  transition: all 0.3s;
  color: var(--text-secondary);
  background: var(--bg-light);
  padding: 0 5px;
  z-index: 3;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: -10px;
  left: 15px;
  font-size: 12px;
  color: #667eea;
}

/* Icons */
.form-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-secondary);
  z-index: 3;
}

.form-input:focus ~ .form-icon {
  color: #667eea;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  transition: color 0.3s ease;
  z-index: 3;
}

.password-toggle:hover {
  color: #667eea;
}

/* Remember Me & Forgot Password */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

.remember-me {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #667eea;
}

.forgot-password {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #764ba2;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.5s ease;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Loading State */
.submit-btn.loading {
  color: transparent;
  pointer-events: none;
}

.submit-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Social Login */
.social-divider {
  text-align: center;
  margin: 30px 0 20px;
  position: relative;
  z-index: 2;
}

.social-divider span {
  background: var(--bg-light);
  color: var(--text-secondary);
  padding: 0 15px;
  font-size: 14px;
  position: relative;
}

.social-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.social-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

.social-btn {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: #667eea;
}

/* Switch Form Link */
.switch-form {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 25px;
  position: relative;
  z-index: 2;
}

.switch-form a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.switch-form a:hover {
  color: #764ba2;
}

/* Error & Success Messages */
.alert {
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  position: relative;
  z-index: 2;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #ff6b6b;
}

.alert-success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4CAF50;
}

.alert-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.alert-close:hover {
  opacity: 1;
}

/* Form Validation */
.form-group.error .form-input {
  border-color: var(--error-color);
}

.form-group.success .form-input {
  border-color: var(--success-color);
}

.form-error {
  color: var(--error-color);
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.form-group.error .form-error {
  display: block;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Strength Meter */
.password-strength {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
  position: relative;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength-bar.weak {
  width: 33%;
  background: var(--error-color);
}

.password-strength-bar.medium {
  width: 66%;
  background: var(--warning-color);
}

.password-strength-bar.strong {
  width: 100%;
  background: var(--success-color);
}

/* Mobile Responsive */
@media (max-width: 540px) {
  .auth-form-container {
    padding: 30px 20px;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .form-input {
    font-size: 14px;
    padding: 12px 15px 12px 45px;
  }
  
  .form-icon {
    font-size: 18px;
  }
  
  .submit-btn {
    font-size: 16px;
    padding: 12px;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Terms Checkbox Styling */
.terms-group {
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.terms-label {
  display: flex;
  align-items: flex-start;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.terms-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #667eea;
  flex-shrink: 0;
}

.terms-label a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.terms-label a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Animations on Page Load */
.auth-form-container {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group {
  opacity: 0;
  animation: fadeInLeft 0.5s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
