/* ============================================
   MODERN FUT TRACKER LOGIN - CLEAN DESIGN
   ============================================ */

:root {
  --primary-blue: #2563eb;
  --primary-purple: #9333ea;
  --accent-yellow: #ffe066;
  --bg-dark: #0a0e1a;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-input: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #e0e7ff;
  --text-muted: #a5b4fc;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(147, 51, 234, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(37, 99, 235, 0.15);
  --shadow-xl: 0 16px 48px rgba(37, 99, 235, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-image: url('../backgroundtest.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: calc(100vh - 80px);
}

.login-container {
  display: flex;
  max-width: 1100px;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  min-height: 600px;
  animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   IMAGE SIDE
   ============================================ */

.login-image-side {
  flex: 1;
  position: relative;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.login-side-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
}

/* ============================================
   FORM SIDE
   ============================================ */

.login-form-side {
  flex: 1.2;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.form-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
}

.login-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
}

.login-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.5rem;
}

/* ============================================
   FORM STYLES
   ============================================ */

.login-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.input-group-modern {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:has(input:focus) .input-icon {
  color: var(--primary-purple);
}

.input-wrapper input[type="password"] {
  padding-right: 3.5rem;
}

.toggle-password-modern {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 2;
}

.toggle-password-modern:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.toggle-password-modern:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* ============================================
   FORM OPTIONS
   ============================================ */

.form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.forgot-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--primary-purple);
  text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary-modern {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
}

.btn-primary-modern:active {
  transform: translateY(0);
}

.btn-primary-modern svg {
  transition: transform 0.3s ease;
}

.btn-primary-modern:hover svg {
  transform: translateX(4px);
}

.btn-secondary-modern {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary-modern:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-secondary-modern:active {
  transform: translateY(0);
}

/* ============================================
   FORM DIVIDER
   ============================================ */

.form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.form-divider span {
  padding: 0 1rem;
}

/* ============================================
   FORM FOOTER
   ============================================ */

.form-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-footer p {
  margin: 0;
}

.register-link {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.register-link:hover {
  color: var(--primary-purple);
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */

.modern-footer {
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  text-align: center;
  margin-top: auto;
}

.modern-footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
  .login-container {
    flex-direction: column;
    max-width: 500px;
    min-height: auto;
  }

  .login-image-side {
    display: none;
  }

  .login-form-side {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 640px) {
  .login-main {
    padding: 1rem;
  }

  .login-container {
    border-radius: 20px;
  }

  .login-form-side {
    padding: 2rem 1.5rem;
  }

  .form-header {
    margin-bottom: 2rem;
  }

  .form-logo {
    width: 56px;
    height: 56px;
  }

  .login-title {
    font-size: 1.75rem;
  }

  .login-subtitle {
    font-size: 0.9rem;
  }

  .input-group-modern {
    margin-bottom: 1.25rem;
  }

  .input-wrapper input {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    font-size: 0.95rem;
  }

  .input-icon {
    left: 0.875rem;
    font-size: 0.95rem;
  }

  .btn-primary-modern,
  .btn-secondary-modern {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .login-form-side {
    padding: 1.5rem 1rem;
  }

  .form-logo {
    width: 48px;
    height: 48px;
  }

  .login-title {
    font-size: 1.5rem;
  }
}

/* ============================================
   LOADER OVERLAY (for login animation)
   ============================================ */

#login-anim-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  transition: opacity 0.7s;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline-offset: 4px;
}
