/* Import Sportify Color Variables */
:root {
  --energy-red: #E53E3E;
  --sport-green: #38A169;
  --athletic-blue: #3182CE;
  --motivation-orange: #DD6B20;
  --discipline-navy: #2D3748;
  --champion-gold: #D69E2E;
  --pure-white: #FFFFFF;
  --light-gray: #F7FAFC;
  --medium-gray: #A0AEC0;
  --dark-gray: #4A5568;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--athletic-blue) 0%, var(--sport-green) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 20px 0;
}

.signin-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 450px;
  z-index: 10;
  position: relative;
}

.signin-card {
  background: var(--pure-white);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px 32px;
  width: 100%;
  backdrop-filter: blur(10px);
}

.logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--discipline-navy);
  margin-bottom: 8px;
}

.brand-subtitle {
  color: var(--medium-gray);
  font-size: 14px;
  font-weight: 500;
}

.signin-form {
  width: 100%;
}

/* Message Containers */
.message-container {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  display: none;
  animation: slideIn 0.3s ease-out;
}

.error-container {
  background: rgba(229, 62, 62, 0.1);
  border: 1px solid var(--energy-red);
  color: var(--energy-red);
}

.success-container {
  background: rgba(56, 161, 105, 0.1);
  border: 1px solid var(--sport-green);
  color: var(--sport-green);
}

.message-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-content i {
  font-size: 16px;
}

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

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--discipline-navy);
  font-size: 14px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--medium-gray);
  font-size: 16px;
  z-index: 2;
}

.input-wrapper input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--pure-white);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--athletic-blue);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.toggle-password {
  position: absolute;
  right: 16px;
  color: var(--medium-gray);
  cursor: pointer;
  font-size: 16px;
  z-index: 2;
}

.toggle-password:hover {
  color: var(--athletic-blue);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--dark-gray);
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--light-gray);
  border-radius: 4px;
  margin-right: 8px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
  background: var(--athletic-blue);
  border-color: var(--athletic-blue);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--pure-white);
  font-size: 12px;
  font-weight: bold;
}

.forgot-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.forgot-link {
  color: var(--athletic-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: var(--energy-red);
}

.signin-btn {
  width: 100%;
  padding: 16px;
  background: var(--energy-red);
  color: var(--pure-white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.signin-btn:hover {
  background: var(--motivation-orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(229, 62, 62, 0.3);
}

.signin-btn:disabled {
  background: var(--medium-gray);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
  color: var(--medium-gray);
  font-size: 14px;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--light-gray);
  z-index: 1;
}

.divider span {
  background: var(--pure-white);
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.social-signin {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  background: var(--pure-white);
  color: var(--dark-gray);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.google-btn:hover {
  border-color: #db4437;
  color: #db4437;
  transform: translateY(-1px);
}

.facebook-btn:hover {
  border-color: #4267B2;
  color: #4267B2;
  transform: translateY(-1px);
}

.facebook-btn.disabled {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
  cursor: not-allowed;
  opacity: 0.6;
}

.facebook-btn.disabled:hover {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
  transform: none;
}

.signup-link {
  text-align: center;
  font-size: 14px;
  color: var(--dark-gray);
}

.signup-link a {
  color: var(--athletic-blue);
  text-decoration: none;
  font-weight: 600;
}

.signup-link a:hover {
  color: var(--energy-red);
}

/* Auth Footer Links */
.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
  flex-wrap: wrap;
}

.auth-footer-links a {
  color: #718096;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.auth-footer-links a:hover {
  color: var(--energy-red);
}

@media (max-width: 480px) {
  .auth-footer-links {
    gap: 15px;
    font-size: 0.8rem;
  }
}

.sports-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sport-icon {
  position: absolute;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.sport-icon:nth-child(1) {
  top: 10%;
  left: 10%;
  color: var(--sport-green);
  opacity: 0.1;
  animation-delay: 0s;
}

.sport-icon:nth-child(2) {
  top: 20%;
  right: 15%;
  color: var(--motivation-orange);
  opacity: 0.1;
  animation-delay: 1s;
}

.sport-icon:nth-child(3) {
  bottom: 30%;
  left: 20%;
  color: var(--champion-gold);
  opacity: 0.1;
  animation-delay: 2s;
}

.sport-icon:nth-child(4) {
  bottom: 20%;
  right: 10%;
  color: var(--athletic-blue);
  opacity: 0.1;
  animation-delay: 3s;
}

.sport-icon:nth-child(5) {
  top: 50%;
  left: 5%;
  color: var(--athletic-blue);
  opacity: 0.1;
  animation-delay: 4s;
}

.sport-icon:nth-child(6) {
  top: 70%;
  right: 25%;
  color: var(--energy-red);
  opacity: 0.1;
  animation-delay: 5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--athletic-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error States */
.error {
  border-color: var(--energy-red) !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.error-message {
  color: var(--energy-red);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Success States */
.success {
  border-color: var(--sport-green) !important;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1) !important;
}

/* Responsive Design */
@media (max-width: 480px) {
  .signin-card {
    margin: 10px;
    padding: 32px 24px;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .forgot-links {
    align-self: stretch;
  }
  
  .social-signin {
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .signin-card {
    padding: 24px 20px;
  }
  
  .brand-title {
    font-size: 24px;
  }
  
  .input-wrapper input {
    padding: 14px 14px 14px 44px;
  }
}