:root {
  --primary: #4361ee;
  --error: #ef233c;
  --text: #2b2d42;
  --light: #edf2f4;
  --gray: #8d99ae;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: #f8f9fa;
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.main-header {
  background: var(--primary);
  color: white;
  padding: 20px 0;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container {
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin: 20px auto;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 28px;
}

.header p {
  color: var(--gray);
  margin: 0;
}

/* FORM STYLES */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 500;
  color: var(--text);
}

input, select {
  padding: 14px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 16px;
  transition: border 0.3s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
}

.submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}

.submit-btn:hover {
  background: #3a56d4;
}

/* RESULTS SECTION */
.loading-hidden {
  display: none;
}

#loading {
  text-align: center;
  margin: 20px 0;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid var(--primary);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

.result-hidden, .error-hidden {
  display: none;
}

#result {
  background: #f8f9fe;
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
  line-height: 1.8;
}

#error {
  color: var(--error);
  background: #fff5f5;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  border-left: 4px solid var(--error);
}

/* COMPREHENSIVE SALARY GUIDE */
.salary-info {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.salary-info h2 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
}

.info-section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  line-height: 1.8;
}

.info-section h3 {
  color: var(--primary);
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 20px;
  border-bottom: 2px solid #ebf2fa;
  padding-bottom: 8px;
}

/* RECOMMENDED RESOURCES */
.external-resources {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}
.external-resources h3 {
  color: var(--primary);
  margin-bottom: 20px;
}

.external-resources ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  padding-left: 20px;
}

.external-resources li {
  margin-bottom: 12px;
}

.external-resources a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.3s;
  display: inline-block;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
}

.external-resources a:hover {
  color: #3a56d4;
  border-bottom: 1px solid #3a56d4;
}

/* FOOTER */
footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.copyright {
  margin-top: 20px;
  color: var(--gray);
  font-size: 14px;
}

/* MOBILE STYLES */
@media (max-width: 767px) {
  body {
    padding: 10px;
  }

  .container {
    width: calc(100% - 20px);
    padding: 20px;
    margin: 10px auto;
    border-radius: 8px;
  }

  .header h1, .salary-info h2, .external-resources h3 {
    font-size: 24px;
  }

  .info-section, .external-resources {
    padding: 20px;
  }

  .info-section h3 {
    font-size: 18px;
  }

  .external-resources ul {
    grid-template-columns: 1fr;
  }

  /* Prevent iOS zoom */
  input, select {
    font-size: 16px !important;
  }
}