/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, Roboto, Helvetica, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

/* Navbar Styles */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-image {
  height: 50px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: #0d0d0d;
}

.logo-subtitle {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 13px;
  color: #808080;
}

.main-nav {
  display: flex;
  gap: 25px;
}

.nav-link {
  color: #808080;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
  color: #3328bf;
}

/* Auth buttons in the header - match index.html style */
.auth-buttons {
  display: flex;
  gap: 16px;
  align-items: center;
}

.login-btn,
.signup-btn {
  font-family: 'Plus Jakarta Sans', 'Inter', Arial, sans-serif;
  font-size: 16px;
  padding: 10px 24px;
  border-radius: 8px; /* Less rounded, more rectangular */
  border: 2px solid #3328bf;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  outline: none;
  box-shadow: 0 2px 8px rgba(51, 40, 191, 0.04);
}

.login-btn {
  background: #fff;
  color: #3328bf;
  border: 2px solid #3328bf;
  outline: none;
  box-shadow: 0 2px 8px rgba(51, 40, 191, 0.04);
}

.login-btn:focus,
.login-btn:active {
  outline: none;
  box-shadow: 0 2px 8px rgba(51, 40, 191, 0.04);
  background: #f3f3ff;
  color: #241a8f;
  border-color: #241a8f;
}

.signup-btn {
  background: #3328bf;
  color: #fff;
}

.signup-btn:hover,
.signup-btn:focus {
  background: #241a8f;
  border-color: #241a8f;
  color: #fff;
}

.login-btn:focus,
.login-btn:active,
.signup-btn:focus,
.signup-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Main Content Styles */
.selection-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.selection-header {
  text-align: center;
  margin-bottom: 50px;
}

.selection-header h1 {
  font-size: 48px;
  font-weight: 600;
  color: #3328bf;
  margin-bottom: 15px;
}

.subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #e0e0e0;
  z-index: 1;
}

.progress-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
  padding-top: 30px;
  color: #808080;
  font-weight: 500;
}

.progress-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e0e0e0;
  border: 4px solid #e0e0e0;
  transition: all 0.3s;
}

.progress-step.active {
  color: #3328bf;
}

.progress-step.active::before {
  background-color: #3328bf;
  border-color: #3328bf;
}

/* Form Steps */
.form-step {
  display: none;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  padding: 40px;
  margin-bottom: 50px;
  transition: all 0.5s ease;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
  font-size: 32px;
  color: #0d0d0d;
  margin-bottom: 10px;
}

.form-step p {
  color: #666;
  margin-bottom: 30px;
}

/* Step 1: Academic Information */
.subject-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.subject-group {
  position: relative;
  background-color: #f9f9fb;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.subject-group:hover {
  border-color: #3328bf;
  box-shadow: 0 5px 15px rgba(51, 40, 191, 0.1);
}

.subject-group label {
  font-weight: 600;
  margin-bottom: 12px;
  color: #0d0d0d;
  font-size: 16px;
  display: block;
}

.subject-group input {
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  background-color: white;
  transition: all 0.3s;
  width: 100%;
}

.subject-group input:focus {
  border-color: #3328bf;
  box-shadow: 0 0 0 3px rgba(51, 40, 191, 0.2);
  outline: none;
}

.subject-group input.error {
  border-color: #ff4d4f;
}

.remove-subject {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #ff4d4f;
  cursor: pointer;
  font-size: 18px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.remove-subject:hover {
  background-color: rgba(255, 77, 79, 0.1);
}

.subject-management {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  align-items: center;
}

.subject-selector-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-grow: 1;
}

.subject-selector select {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  min-width: 250px;
  flex-grow: 1;
}

.help-text {
  color: #666;
  font-size: 14px;
  margin-top: 10px;
  width: 100%;
}

.add-subject-btn {
  background-color: #3328bf;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.add-subject-btn:hover {
  background-color: #2a1fa0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(51, 40, 191, 0.3);
}

.add-subject-btn:active {
  transform: translateY(0);
}

/* Step 2: Interests */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.interest-card {
  position: relative;
}

.interest-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.interest-card label {
  display: block;
  padding: 25px 20px;
  background-color: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.interest-card label i {
  font-size: 24px;
  color: #3328bf;
  margin-bottom: 10px;
  display: block;
}

.interest-name {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 18px;
  color: #0d0d0d;
}

.interest-description {
  display: block;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.interest-card input[type="checkbox"]:checked + label {
  border-color: #3328bf;
  background-color: rgba(51, 40, 191, 0.05);
  color: #3328bf;
}

.interest-help {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f9f9fb;
  border-radius: 8px;
}

.interest-help i {
  color: #3328bf;
  font-size: 20px;
}

/* Step 3: Preferences */
.preferences-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 30px;
}

.preference-section {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.preference-section h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #0d0d0d;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preference-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preference-option {
  display: flex;
  align-items: flex-start;
  padding: 15px;
  background-color: #f9f9fb;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.preference-option:hover {
  border-color: #3328bf;
}

.preference-option input {
  margin-right: 12px;
  margin-top: 3px;
}

.option-title {
  font-weight: 500;
  display: block;
}

.option-description {
  font-size: 14px;
  color: #666;
  display: block;
  margin-top: 5px;
}

.preferences-help {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f9f9fb;
  border-radius: 8px;
}

.preferences-help i {
  color: #3328bf;
  font-size: 20px;
}

/* Step 4: Results */
.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.summary-card h3 {
  font-size: 18px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0d0d0d;
}

.fit-meter {
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  margin-bottom: 10px;
  position: relative;
}

.fit-meter span {
  position: absolute;
  right: 0;
  top: -25px;
  font-weight: 600;
  color: #3328bf;
}

.meter-bar {
  height: 100%;
  border-radius: 5px;
  background-color: #3328bf;
}

.results-filter {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  background-color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.filter-group, .sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group select, .sort-group select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
}

.result-card {
  background-color: white;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.result-card.best-match {
  border: 2px solid #3328bf;
}

.result-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #3328bf;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.result-header {
  padding: 20px;
  background-color: #f9f9fb;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-header h3 {
  font-size: 22px;
  color: #0d0d0d;
}

.institution {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

.match-score {
  background-color: #3328bf;
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 16px;
}

.result-details {
  padding: 20px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
}

.stat-label {
  color: #666;
}

.stat-value {
  font-weight: 500;
}

.stat-value.high {
  color: #28a745;
}

.stat-value.moderate {
  color: #ffc107;
}

.stat-value.affordable {
  color: #28a745;
}

.stat-value.expensive {
  color: #dc3545;
}

.result-subjects {
  margin-bottom: 20px;
}

.result-subjects h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #0d0d0d;
}

.result-subjects ul {
  list-style-type: none;
}

.result-subjects li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  padding-left: 25px;
}

.result-subjects li::before {
  content: '•';
  position: absolute;
  left: 10px;
  color: #3328bf;
  font-weight: bold;
}

.result-description {
  margin-bottom: 20px;
}

.result-description h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #0d0d0d;
}

.result-description p {
  color: #666;
  line-height: 1.6;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.save-btn, .explore-btn, .compare-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.save-btn {
  background-color: white;
  border: 1px solid #3328bf;
  color: #3328bf;
}

.explore-btn {
  background-color: #3328bf;
  border: 1px solid #3328bf;
  color: white;
}

.compare-btn {
  background-color: white;
  border: 1px solid #ddd;
  color: #666;
}

.save-btn:hover {
  background-color: rgba(51, 40, 191, 0.05);
}

.explore-btn:hover {
  background-color: #2a1fa0;
}

.compare-btn:hover {
  background-color: #f5f5f5;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.loading-results {
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.loading-results i {
  font-size: 40px;
  color: #3328bf;
  margin-bottom: 20px;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loading-text {
  animation: pulse 1.5s infinite;
  color: #666;
  font-size: 18px;
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

.prev-btn, .next-btn, .save-all-btn {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.prev-btn {
  background-color: white;
  border: 1px solid #d6d6d6;
  color: #0d0d0d;
}

.next-btn, .save-all-btn {
  background-color: #3328bf;
  border: 1px solid #3328bf;
  color: white;
}

.prev-btn:hover {
  background-color: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.next-btn:hover, .save-all-btn:hover {
  background-color: #2a1fa0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(51, 40, 191, 0.3);
}

.prev-btn:active, .next-btn:active, .save-all-btn:active {
  transform: translateY(0);
}

/* Footer Styles */
.footer {
  background-color: #f5f5f7;
  padding: 60px 0 0;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-brand {
  margin-bottom: 30px;
}

.footer-logo {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 26px;
  color: #0d0d0d;
  margin-bottom: 5px;
}

.footer-tagline {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

.footer-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: #666;
  font-size: 18px;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #3328bf;
}

.links-title, .contact-title {
  font-size: 18px;
  font-weight: 600;
  color: #0d0d0d;
  margin-bottom: 20px;
}

.link-item {
  margin-bottom: 15px;
}

.link-item a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}

.link-item a:hover {
  color: #3328bf;
}

.bullet {
  color: #666;
}

.contact-info {
  color: #666;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta-title {
  font-size: 28px;
  font-weight: 600;
  color: #0d0d0d;
  margin-bottom: 20px;
  line-height: 1.3;
}

.cta-button {
  display: inline-block;
  background-color: #3328bf;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background-color: #2a1fa0;
}

.footer-divider {
  border-top: 1px solid #ddd;
  margin: 20px 0;
}

.copyright {
  text-align: center;
  padding: 20px 0;
  color: #666;
  font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .navbar-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .selection-header h1 {
    font-size: 36px;
  }
  
  .progress-step {
    font-size: 14px;
  }
  
  .form-step {
    padding: 25px;
  }
  
  .preferences-container {
    grid-template-columns: 1fr;
  }
  
  .result-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .selection-header h1 {
    font-size: 28px;
  }
  
  .form-step h2 {
    font-size: 24px;
  }
  
  .subject-inputs {
    grid-template-columns: 1fr;
  }
  
  .subject-management {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .prev-btn, .next-btn, .save-all-btn {
    width: 100%;
    justify-content: center;
  }
  
  .results-filter {
    flex-direction: column;
  }
  
  .filter-group, .sort-group {
    width: 100%;
  }
  
  .filter-group select, .sort-group select {
    width: 100%;
  }
}