:root {
  --violet: hsl(257, 40%, 49%);
  --soft-magenta: hsl(300, 69%, 71%);
  --white: #fff;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* 1. CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Primary color as background */
    background-color: hsl(257, 40%, 49%);
    background-image: url('./images/bg-desktop.svg');
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
    font-family: 'Open Sans', sans-serif; /* Body font */
    font-weight: 400;
    min-height: 100vh;
    line-height: 1.6;
    padding: 40px 70px;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* 2. Header Styles */
.header {
    margin-bottom: 60px;
}
.logo {
    height: 50px;
    width: auto;
}

/* 3. Main Hero Section (Two-Column Layout) */
.hero {
    display: flex;
    align-items: center;
    gap: 50px;
    flex: 1; /* Pushes footer down */
    margin-bottom: 30px;
}
.hero-image,
.hero-content {
    flex: 1; /* Makes both columns equal width */
}
.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}
.hero-title {
    font-family: 'Poppins', sans-serif; /* Heading font */
    font-weight: 600;
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 20px;
}
.hero-text {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* 4. Button Styles */
.btn {
    display: inline-block;
    background-color: white;
    color: hsl(257, 40%, 49%);
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    padding: 15px 60px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn:hover {
    background-color: hsl(300, 69%, 71%); /* Magenta for hover */
    color: white;
}

/* 5. Footer & Social Links */
.footer {
    text-align: right;
    margin-top: auto; /* Ensures footer sticks to bottom in flex container */
}
.social-links {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 25px;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    border: 1px solid white;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    transition: all 0.3s ease;
}
.social-link:hover {
    border-color: hsl(300, 69%, 71%);
    color: hsl(300, 69%, 71%);
}
.attribution {
    font-size: 0.8rem;
    opacity: 0.8;
}
.attribution a {
    color: hsl(300, 69%, 71%);
}

/* 6. Mobile Responsive Styles (for screens less than 768px) */
@media (max-width: 768px) {
    body {
        background-image: url('./images/bg-mobile.svg');
        background-size: contain;
        padding: 30px 35px;
        text-align: center;
    }

    .logo {
        height: 35px;
    }

    .hero {
        flex-direction: column;
        gap: 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .footer {
        text-align: center;
        margin-top: 50px;
    }

    .social-links {
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(52, 32, 97, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 600px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
  background: linear-gradient(135deg, hsl(257, 40%, 49%), hsl(300, 69%, 71%));
  color: white;
  padding: 25px 30px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.modal-header h2 i {
  margin-right: 10px;
}

.close-modal {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.close-modal:hover {
  transform: scale(1.2);
}

.modal-body {
  padding: 30px;
}

/* Form Tabs */
.form-tabs {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 15px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  color: hsl(257, 40%, 49%);
  border-bottom-color: hsl(257, 40%, 49%);
  font-weight: 600;
}

.tab-btn:hover:not(.active) {
  color: hsl(300, 69%, 71%);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form Elements */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.form-group label i {
  margin-right: 8px;
  color: hsl(257, 40%, 49%);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: hsl(257, 40%, 49%);
  box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.1);
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1rem;
}

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

.strength-bar {
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.strength-bar::before {
  content: '';
  display: block;
  height: 100%;
  width: 33%;
  background: #ff4757;
  transition: all 0.3s;
}

.strength-text {
  font-size: 0.8rem;
  color: #666;
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.btn-prev,
.btn-next,
.btn-submit {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-prev {
  background: #f5f5f5;
  color: #666;
}

.btn-next,
.btn-submit {
  background: linear-gradient(135deg, hsl(257, 40%, 49%), hsl(300, 69%, 71%));
  color: white;
}

.btn-submit {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.btn-prev:hover {
  background: #e0e0e0;
}

.btn-next:hover,
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  cursor: pointer;
}

.checkbox-label input {
  margin-right: 10px;
  width: auto;
}

.terms-link {
  color: hsl(257, 40%, 49%);
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Progress Bar */
.form-progress {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.progress-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, hsl(257, 40%, 49%), hsl(300, 69%, 71%));
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.9rem;
  color: #666;
  display: block;
  text-align: center;
}

/* Error Styling */
.error-message {
  color: #ff4757;
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
}

.form-group input.error,
.form-group select.error {
  border-color: #ff4757;
}

.hint {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-top: 5px;
}

/* Success Modal */
.success-modal .modal-content {
  text-align: center;
  max-width: 500px;
}

.success-icon {
  font-size: 4rem;
  color: #4CAF50;
  margin: 20px 0;
}

.success-modal h2 {
  color: hsl(257, 40%, 49%);
  margin-bottom: 15px;
}

.success-modal p {
  color: #666;
  margin-bottom: 10px;
}

.success-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.btn-outline {
  padding: 12px 25px;
  background: white;
  border: 2px solid hsl(257, 40%, 49%);
  color: hsl(257, 40%, 49%);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: hsl(257, 40%, 49%);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .btn-prev,
  .btn-next,
  .btn-submit {
    width: 100%;
    justify-content: center;
  }
  
  .success-actions {
    flex-direction: column;
  }
}

.strength-bar {
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
  position: relative;
}

.strength-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--strength-width, 33%);
  background: var(--strength-color, #ff4757);
  transition: all 0.3s;
}

/* =============== DEBUG STYLES =============== */
.debug-outline {
  outline: 2px solid red !important;
}

/* Pastikan tombol register terlihat jelas */
#openRegisterModal {
  position: relative;
  z-index: 100;
}

/* Pastikan modal di atas semua elemen */
.modal {
  z-index: 10000 !important;
}

/* Highlight tombol saat di-hover untuk feedback visual */
#openRegisterModal:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

/* Pastikan link tidak memiliki underline yang mengganggu */
.btn {
  text-decoration: none !important;
}