@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Modern Color Palette */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #6366f1;
  --accent-color: #10b981;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --white-color: #ffffff;
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);

  /* Effects */
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wave {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

.container-login {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 7rem;
  padding: 0 2rem;
  align-items: center;
}

.img {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.img img {
  width: 500px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
  animation: float 6s ease-in-out infinite;
}

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

.login-content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

form {
  width: 420px;
  background: var(--white-color);
  padding: 3rem 2.5rem !important;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  animation: slideInRight var(--transition-base);
}

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

.login-content img {
  height: 80px;
  margin-bottom: 1rem !important;
}

.login-content h2 {
  margin: 1rem 0 !important;
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-content .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem !important;
}

.login-content .input-div {
  position: relative;
  display: grid;
  grid-template-columns: 7% 93%;
  margin: 1.5rem 0 !important;
  padding: 0.5rem 0 !important;
  border-bottom: 2px solid var(--gray-200);
  transition: all var(--transition-base);
}

.login-content .input-div.one {
  margin-top: 0 !important;
}

.i {
  color: var(--gray-400);
  display: flex;
  justify-content: center;
  align-items: center;
}

.i i {
  transition: all var(--transition-base);
  font-size: 1.25rem;
}

.input-div > div {
  position: relative;
  height: 45px;
}

.input-div > div > h5 {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-base);
  pointer-events: none;
}

.input-div:before,
.input-div:after {
  content: '';
  position: absolute;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transition: all var(--transition-base);
}

.input-div:before {
  right: 50%;
}

.input-div:after {
  left: 50%;
}

.input-div.focus:before,
.input-div.focus:after {
  width: 50%;
}

.input-div.focus > div > h5 {
  top: -8px;
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
}

.input-div.focus > .i > i {
  color: var(--primary-color);
}

.input-div > div > input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: none;
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.input-div.pass {
  margin-bottom: 0.5rem !important;
}

a {
  display: block;
  text-align: right;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  margin: 0.5rem 0 !important;
  font-weight: 500;
}

a:hover {
  color: var(--primary-color);
}

.btn {
  display: block;
  width: 100%;
  height: 50px;
  border-radius: var(--radius-xl);
  outline: none;
  border: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  background-size: 200%;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--white-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 !important;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover {
  background-position: right;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(0);
}

/* Social Login Buttons */
.social-login {
  margin-top: 2rem !important;
  padding-top: 2rem !important;
  border-top: 1px solid var(--gray-200);
}

.social-login p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem !important;
}

.social-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-btn {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--white-color);
}

.social-btn:hover {
  border-color: var(--primary-color);
  background: var(--gray-50);
  transform: translateY(-2px);
}

.social-btn i {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

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

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid var(--white-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media screen and (max-width: 1050px) {
  .container-login {
    grid-gap: 5rem;
  }
}

@media screen and (max-width: 1000px) {
  form {
    width: 360px;
    padding: 2.5rem 2rem !important;
  }

  .login-content h2 {
    font-size: 1.75rem;
    margin: 0.75rem 0 !important;
  }

  .img img {
    width: 400px;
  }
}

@media screen and (max-width: 900px) {
  .container-login {
    grid-template-columns: 1fr;
  }

  .img {
    display: none;
  }

  .wave {
    display: none;
  }

  .login-content {
    justify-content: center;
  }

  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
}

@media screen and (max-width: 500px) {
  form {
    width: 100%;
    max-width: 360px;
    padding: 2rem 1.5rem !important;
  }

  .login-content h2 {
    font-size: 1.5rem;
  }

  .container-login {
    padding: 0 1rem;
  }
}

/* Error Messages */
.error-message {
  background-color: #fee;
  color: #c33;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius-md);
  margin-bottom: 1rem !important;
  font-size: 0.875rem;
  border-left: 3px solid #c33;
  animation: shake 0.3s;
}

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

/* Success Messages */
.success-message {
  background-color: #efe;
  color: #3c3;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius-md);
  margin-bottom: 1rem !important;
  font-size: 0.875rem;
  border-left: 3px solid #3c3;
}
