/* Import Cairo font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700;800&display=swap');

/* CSS Variables */
:root {
  --primary-red: #942326;
  --light-red: #d4a5a6;
  --cream-bg: #f4edd3;
  --text-gray: #514d55;
  --input-bg: rgba(217, 217, 217, 0.2);
  --create-bg: rgba(148, 35, 38, 0.05);
}

/* Global Styles */
* {
  font-family: 'Cairo', sans-serif;
}

body {
  background-color: var(--cream-bg);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Circles */
.background-circles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.circle {
  position: absolute;
  border-radius: 50%;
}

.circle-left-top {
  width: 400px;
  height: 400px;
  background-color: var(--primary-red);
  top: -100px;
  left: -200px;
  opacity: 0.8;
}

.circle-right-top {
  width: 300px;
  height: 300px;
  background-color: var(--light-red);
  top: -50px;
  right: -150px;
  opacity: 0.6;
}

.circle-right-bottom {
  width: 350px;
  height: 350px;
  background-color: var(--light-red);
  bottom: -100px;
  right: -175px;
  opacity: 0.7;
}

/* Main Card */
.main-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  position: relative;
  z-index: 1;
}

/* Login Section */
.login-section {
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 600px;
}

.login-title {
  color: var(--primary-red);
  font-weight: 800;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.login-form {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.login-input {
  background-color: var(--input-bg);
  border: none;
  border-radius: 10px;
  height: 60px;
  font-size: 15px;
  font-weight: 500;
  padding: 0 1.5rem;
  text-align: right;
  transition: all 0.3s ease;
}

.login-input::placeholder {
  color: rgba(81, 77, 85, 0.6);
  font-weight: 500;
}

.login-input:focus {
  background-color: var(--input-bg);
  border: 2px solid var(--primary-red);
  box-shadow: 0 0 0 0.2rem rgba(148, 35, 38, 0.25);
  outline: none;
}

.btn-login {
  background-color: var(--primary-red);
  border: none;
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  min-width: 200px;
}

.btn-login:hover {
  background-color: #7a1e21;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.facebook-text {
  color: var(--text-gray);
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.facebook-link {
  color: #1877f2;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.3s ease;
}

.facebook-link:hover {
  color: #166fe5;
  text-decoration: underline;
}

/* Create Account Section */
.create-account-section {
  background-color: var(--create-bg);
  border-radius: 0 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 600px;
  padding: 2rem;
}

.create-account-content {
  text-align: center;
  max-width: 350px;
}

.create-account-title {
  color: var(--primary-red);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.create-account-text {
  color: var(--primary-red);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.btn-create-account {
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  min-width: 180px;
}

.btn-create-account:hover {
  background-color: var(--primary-red);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Bottom Logo */
.bottom-logo {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 10;
}

.logo-img {
  max-width: 80px;
  height: auto;
  opacity: 0.8;
}

/* Loading Animation */
.btn-login.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* Success Modal */
.modal-content {
  border-radius: 15px;
  border: none;
}

.success-icon {
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Form Validation Styles */
.form-control.is-invalid {
  border: 2px solid #dc3545;
}

.form-control.is-valid {
  border: 2px solid #198754;
}

.invalid-feedback {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .main-card {
    margin: 1rem;
    min-height: auto;
  }
  
  .create-account-section {
    border-radius: 20px 20px 0 0;
    min-height: 300px;
    order: -1;
  }
  
  .login-section {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  
  .login-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  .create-account-title {
    font-size: 1.25rem;
  }
  
  .create-account-text {
    font-size: 0.9rem;
  }
  
  .bottom-logo {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .login-input {
    height: 55px;
    font-size: 14px;
  }
  
  .btn-login, .btn-create-account {
    padding: 0.875rem 1.5rem;
    font-size: 14px;
    min-width: 160px;
  }
  
  .login-section {
    padding: 1.5rem 1rem;
  }
  
  .create-account-section {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 575.98px) {
  .main-card {
    margin: 0.5rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
  
  .create-account-title {
    font-size: 1.1rem;
  }
  
  .login-form {
    max-width: 100%;
  }
}

/* Animation for page load */
.main-card {
  animation: slideUp 0.8s ease-out;
}

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

/* Circle animations */
.circle-left-top {
  animation: float 6s ease-in-out infinite;
}

.circle-right-top {
  animation: float 8s ease-in-out infinite reverse;
}

.circle-right-bottom {
  animation: float 7s ease-in-out infinite;
}

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