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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #3b0712, #1a0a0f, #2a1a1f);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: white;
  position: relative;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* LOGO - Top left */
.top-logo {
  position: fixed;
  top: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 10;
}

.top-logo img {
  height: 32px;
}

.top-logo span {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff, #f0a0b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-container {
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease-out;
}

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

/* HEADER */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
}

/* MESSAGES */
.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInDown 0.3s ease-out;
}

.alert i {
  font-size: 18px;
  flex-shrink: 0;
}

.alert-success {
  background: rgba(45, 172, 74, 0.15);
  color: #4ade80;
  border: 1px solid rgba(45, 172, 74, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation:
    shake 0.5s,
    fadeInDown 0.3s ease-out;
}

.alert-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

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

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-4px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(4px);
  }
}

/* OAUTH BUTTONS - Wide like Hostinger */
.oauth-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-oauth {
  flex: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-oauth:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-oauth img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.btn-oauth.facebook,
.btn-oauth.google {
  background: #1a1a1a;
  border-color: #333;
}

.btn-oauth.facebook:hover,
.btn-oauth.google:hover {
  background: #252525;
}

/* DIVIDER */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  color: #666;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #333, transparent);
}

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

label {
  display: block;
  margin-bottom: 8px;
  color: #bbb;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.form-group:focus-within label {
  color: #fff;
}

.required-star {
  color: #ef4444;
  margin-left: 2px;
}

.input-wrapper {
  position: relative;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  padding-left: 44px;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 15px;
  color: white;
  transition: all 0.2s;
}

input::placeholder {
  color: #555;
}

input:focus {
  outline: none;
  border-color: #8a1c33;
  background: #111;
  box-shadow: 0 0 0 3px rgba(138, 28, 51, 0.15);
}

input:valid:not(:placeholder-shown) {
  border-color: #2dac4a;
}

input:invalid {
  box-shadow: none;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  font-size: 16px;
  transition: all 0.2s;
}

input:focus ~ .input-icon {
  color: #8a1c33;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #aaa;
}

/* FORGOT PASSWORD LINK */
.forgot-link {
  display: block;
  text-align: right;
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 13px;
}

.forgot-link a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link a:hover {
  color: #fff;
}

/* SUBMIT BUTTON */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #8a1c33, #6b1528);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #9a2040, #7a1830);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(138, 28, 51, 0.4);
}

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

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-submit.loading::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* FOOTER */
.login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #222;
}

.login-footer p {
  color: #888;
  font-size: 14px;
}

.login-footer a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: #8a1c33;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .login-container {
    padding: 28px 24px;
  }

  .top-logo {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 24px;
    justify-content: center;
  }
}
