/**
 * Premium Authentication Pages CSS
 * Login & Register - Modern, profesyonel tasarım
 */

:root {
  --auth-primary: #6366f1;
  --auth-primary-dark: #4f46e5;
  --auth-secondary: #8b5cf6;
  --auth-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --auth-dark-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  --auth-success: #10b981;
  --auth-danger: #ef4444;
  --auth-warning: #f59e0b;
}

/* Page Background Override */
body:has(.auth-container) main {
  background: var(--auth-dark-gradient);
  min-height: 100vh;
  position: relative;
}

body:has(.auth-container) main::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Ana Layout */
.auth-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

/* Header */
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: authSlideDown 0.6s ease forwards;
}

.auth-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Form Card */
.auth-form {
  background: white;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2.5rem;
  animation: authFadeIn 0.7s ease forwards;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mesaj Kutuları */
.form-message {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: authPulse 0.5s ease;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Form Grupları */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  height: 52px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.95rem;
  color: #1e293b;
  transition: all 0.2s ease;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  outline: none;
  border-color: var(--auth-primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  height: auto;
  padding: 1rem;
  min-height: 100px;
  resize: vertical;
}

/* Checkbox Stili */
.form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  margin-right: 0.75rem;
  margin-top: 0.1rem;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.form-check-input:checked {
  background: var(--auth-gradient);
  border-color: var(--auth-primary);
}

.form-check-input:checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-check-label {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

.form-check-label a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.form-check-label a:hover {
  text-decoration: underline;
}

/* Gönder Butonu */
.form-submit {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 2rem;
  background: var(--auth-gradient);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.form-submit:active {
  transform: translateY(-1px);
}

/* Şifremi Unuttum Linki */
.forgot-password {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.forgot-password:hover {
  text-decoration: underline;
  color: var(--auth-primary-dark);
}

/* Footer */
.auth-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-footer p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.auth-footer > p a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.auth-footer > p a:hover {
  text-decoration: underline;
}

/* Or Separator */
.or-sep {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.or-sep::before,
.or-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-social-wrap {
  width: 100%;
}

/* Sosyal Butonlar */
.auth-social {
  display: flex;
  justify-content: center;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 280px;
  height: 52px;
  border-radius: 14px;
  background: white;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
  cursor: pointer;
}

.auth-social-btn i {
  font-size: 1.25rem;
}

.auth-social-btn i.fa-google {
  background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

/* Şifre Gücü */
.password-strength {
  margin-top: 0.75rem;
}

.strength-meter {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-meter-fill[data-strength="0"] {
  width: 0;
}

.strength-meter-fill[data-strength="1"] {
  width: 25%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.strength-meter-fill[data-strength="2"] {
  width: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.strength-meter-fill[data-strength="3"] {
  width: 75%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.strength-meter-fill[data-strength="4"] {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.strength-text {
  font-size: 0.8rem;
  color: #64748b;
}

.strength-text span {
  font-weight: 700;
}

/* Terms Links */
.terms-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Form Hint */
.form-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Animasyonlar */
@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authPulse {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Responsive Düzen */
@media (max-width: 768px) {
  .auth-container {
    padding: 1.5rem 1rem 3rem;
    min-height: auto;
  }
  
  .auth-header h1 {
    font-size: 1.75rem;
  }
  
  .auth-form {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .form-control {
    height: 48px;
  }
  
  .form-submit {
    height: 52px;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 1rem 1rem 2rem;
  }
  
  .auth-header h1 {
    font-size: 1.5rem;
  }
  
  .auth-header p {
    font-size: 0.9rem;
  }
  
  .auth-form {
    padding: 1.5rem 1.25rem;
    border-radius: 18px;
  }
  
  .form-label {
    font-size: 0.85rem;
  }
  
  .form-control {
    height: 46px;
    font-size: 0.9rem;
    border-radius: 12px;
  }
  
  .form-submit {
    height: 50px;
    font-size: 0.95rem;
    border-radius: 12px;
  }
  
  .auth-social-btn {
    height: 48px;
    border-radius: 12px;
  }
}
