/* Reset dan Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.6;
}

/* Container */
.register-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.register-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  animation: slideUp 0.6s ease-out;
}

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

/* Form Section */
.register-form {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.alert-danger {
  background-color: #fee;
  color: #c53030;
  border: 1px solid #fed7d7;
}

.error-message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  background-color: #fee;
  color: #c53030;
  border: 1px solid #fed7d7;
  display: none;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 14px;
}

.required {
  color: #e53e3e;
}

/* Form Controls */
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: #f7fafc;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #a0aec0;
  font-weight: 400;
}

/* Input Groups */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-control {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: #667eea;
  background-color: #f0f4ff;
}

/* Form Text */
.form-text {
  font-size: 13px;
  color: #718096;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-text i {
  color: #667eea;
}

/* Password Strength */
.password-strength {
  margin-top: 10px;
}

.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.strength-bar {
  height: 4px;
  flex: 1;
  background-color: #e2e8f0;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.strength-bar.weak {
  background-color: #f56565;
}

.strength-bar.medium {
  background-color: #ed8936;
}

.strength-bar.strong {
  background-color: #48bb78;
}

.strength-text {
  font-size: 12px;
  font-weight: 500;
  color: #718096;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.btn-submit.loading .button-text {
  opacity: 0;
}

.btn-submit.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Login Link */
.login-link {
  text-align: center;
  margin-top: 24px;
  color: #718096;
  font-size: 14px;
}

.login-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.login-link a:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Info Section */
.register-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.register-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.info-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 400px;
}

.info-content h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.info-content p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Features List */
.features-list {
  list-style: none;
  text-align: left;
}

.features-list li {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0.9;
  animation: fadeInLeft 0.6s ease-out;
  animation-fill-mode: both;
}

.features-list li:nth-child(1) {
  animation-delay: 0.1s;
}
.features-list li:nth-child(2) {
  animation-delay: 0.2s;
}
.features-list li:nth-child(3) {
  animation-delay: 0.3s;
}
.features-list li:nth-child(4) {
  animation-delay: 0.4s;
}
.features-list li:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 0.9;
    transform: translateX(0);
  }
}

.features-list li i {
  background: rgba(255, 255, 255, 0.2);
  padding: 12px;
  border-radius: 50%;
  margin-right: 16px;
  font-size: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .register-card {
    grid-template-columns: 1fr;
    margin: 10px;
  }

  .register-info {
    order: -1;
    padding: 30px 20px;
  }

  .register-form {
    padding: 30px 20px;
  }

  .info-content h3 {
    font-size: 24px;
  }

  .info-content p {
    font-size: 14px;
  }

  .features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .features-list li {
    margin-bottom: 0;
    font-size: 13px;
  }

  .features-list li i {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-right: 8px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .register-form {
    padding: 20px 15px;
  }

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

  .features-list {
    grid-template-columns: 1fr;
  }

  .btn-submit {
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* Form Validation States */
.form-control.is-valid {
  border-color: #48bb78;
  background-color: #f0fff4;
}

.form-control.is-invalid {
  border-color: #f56565;
  background-color: #fffaf0;
}

.form-control.is-valid:focus {
  border-color: #48bb78;
  box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.form-control.is-invalid:focus {
  border-color: #f56565;
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a67d8;
}
