body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #343a40;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: relative;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
}

.logo i {
  color: #007bff;
  margin-right: 10px;
  font-size: 1.8rem;
}

main {
  flex: 1;
  padding: 20px 0;
}

.container {
  max-width: 900px;
  margin: 30px auto;
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Homepage Styles */
.hero-section {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
}

.feature-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0 40px 0;
}

.feature-item {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #dee2e6;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
}

.feature-item h3 {
  color: #212529;
  margin: 10px 0 5px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.feature-item p {
  color: #6c757d;
  margin: 0;
  font-size: 0.9rem;
}

.upload-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  border-radius: 15px;
  margin: 30px 0;
  text-align: center;
  color: white;
}

.upload-section h2 {
  color: white;
  margin-bottom: 10px;
  font-size: 1.6rem;
}

.upload-subtitle {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.upload-area {
  background: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(10px);
}

.upload-area:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.8;
}

#fileInput {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  top: 0;
  left: 0;
}

.upload-label {
  cursor: pointer;
  display: block;
}

.upload-text {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.upload-size {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
}

.analyze-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  background: linear-gradient(135deg, #218838, #1e7e34);
}

.btn-icon {
  font-size: 1.2rem;
}

.loading-content {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.loading-content i {
  font-size: 2.5rem;
  color: #667eea;
  margin-bottom: 15px;
}

.loading-content p {
  font-size: 1.1rem;
  color: #212529;
  margin: 10px 0 5px 0;
  font-weight: 500;
}

.loading-content small {
  color: #6c757d;
  font-size: 0.9rem;
}

footer {
  background-color: #212529;
  color: #f8f9fa;
  padding: 20px 0;
  text-align: center;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

h1 {
  color: #212529;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
  font-size: 2.2rem;
  position: relative;
  padding-bottom: 15px;
}

h1:after {
  content: "";
  position: absolute;
  width: 100px;
  height: 4px;
  background-color: #007bff;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Legacy form styles - now using upload-section */
form:not(.upload-section form) {
  display: none;
}

/* Legacy file input - now using custom upload area */
input[type="file"]:not(#fileInput) {
  display: none;
}

/* Legacy button - now using analyze-btn */
button:not(.analyze-btn) {
  display: none;
}

button:hover {
  background-color: #0062cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

#results {
  margin-top: 40px;
}

.section {
  margin-bottom: 30px;
  padding: 25px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section h2 {
  color: #212529;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
  font-weight: 600;
  font-size: 1.6rem;
}

.section h3 {
  color: #343a40;
  margin: 18px 0 12px 0;
  font-weight: 500;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.section h3:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  margin-right: 10px;
  border-radius: 2px;
}

.strengths h3:before {
  background-color: #28a745;
}

.improvements h3:before {
  background-color: #fd7e14;
}

.strengths,
.improvements {
  margin: 20px 0;
  padding: 15px;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.strengths {
  border-left: 4px solid #28a745;
}

.improvements {
  border-left: 4px solid #fd7e14;
}

ul {
  list-style-type: none;
  padding-left: 10px;
  margin: 15px 0;
}

li {
  margin: 10px 0;
  position: relative;
  padding-left: 25px;
  line-height: 1.5;
}

li:before {
  font-family: Arial, sans-serif;
  position: absolute;
  left: 0;
  top: 0;
}

.strengths li:before {
  content: "✓";
  color: #28a745;
  font-weight: bold;
}

.improvements li:before {
  content: "→";
  color: #fd7e14;
  font-weight: bold;
}

.error {
  background-color: #fff5f5;
  color: #e03131;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 5px solid #e03131;
  box-shadow: 0 2px 10px rgba(224, 49, 49, 0.1);
}

.error h2 {
  margin-top: 0;
  color: #e03131;
}

/* Loading indicator */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.loading i {
  font-size: 2rem;
  color: #007bff;
  animation: spin 1s infinite linear;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    margin: 15px;
    padding: 20px;
  }

  button {
    width: 100%;
  }

  h1 {
    font-size: 1.8rem;
  }
}

/* Animation for results */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#results > div {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}

#results > div:nth-child(1) {
  animation-delay: 0.1s;
}
#results > div:nth-child(2) {
  animation-delay: 0.2s;
}
#results > div:nth-child(3) {
  animation-delay: 0.3s;
}
#results > div:nth-child(4) {
  animation-delay: 0.4s;
}
#results > div:nth-child(5) {
  animation-delay: 0.5s;
}
#results > div:nth-child(6) {
  animation-delay: 0.6s;
}
#results > div:nth-child(7) {
  animation-delay: 0.7s;
}

.intro-text {
  text-align: center;
  margin-bottom: 30px;
  color: #495057;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ATS Score Styles */
.ats-score-section {
  margin-bottom: 30px;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.ats-score-container h2 {
  color: white;
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.8rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 15px;
}

.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.score-circle.excellent {
  background: linear-gradient(135deg, #4caf50, #45a049);
}

.score-circle.good {
  background: linear-gradient(135deg, #2196f3, #1976d2);
}

.score-circle.fair {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}

.score-circle.poor {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.score-number {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1;
}

.score-total {
  font-size: 1rem;
  opacity: 0.9;
}

.score-text {
  text-align: center;
  max-width: 300px;
}

.score-text h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  color: white;
}

.score-text h3:before {
  display: none;
}

.score-description {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.4;
}

.score-breakdown {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 25px;
  backdrop-filter: blur(10px);
}

.score-breakdown h3 {
  color: white;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.2rem;
}

.score-breakdown h3:before {
  display: none;
}

.breakdown-grid {
  display: grid;
  gap: 15px;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  align-items: center;
  gap: 15px;
}

.breakdown-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.breakdown-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  border-radius: 4px;
  transition: width 1s ease-out;
}

.breakdown-score {
  font-size: 0.9rem;
  font-weight: bold;
  text-align: right;
}

.ats-improvements {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.ats-improvements h3 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.ats-improvements h3:before {
  display: none;
}

.improvement-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.improvement-list li {
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 0;
  padding: 12px 15px;
  border-radius: 6px;
  position: relative;
  padding-left: 40px;
  backdrop-filter: blur(5px);
}

.improvement-list li:before {
  content: "💡";
  position: absolute;
  left: 15px;
  top: 12px;
}

/* Responsive adjustments for ATS score */
@media (max-width: 768px) {
  .score-display {
    flex-direction: column;
    gap: 20px;
  }

  .breakdown-item {
    grid-template-columns: 80px 1fr 40px;
    gap: 10px;
  }

  .breakdown-label,
  .breakdown-score {
    font-size: 0.8rem;
  }

  .score-circle {
    width: 100px;
    height: 100px;
  }

  .score-number {
    font-size: 2rem;
  }

  /* Enhanced homepage responsive styles */
  .feature-highlights {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }

  .feature-item {
    padding: 15px;
  }

  .feature-icon {
    font-size: 2rem;
  }

  .upload-area {
    padding: 20px;
  }

  .upload-icon {
    font-size: 2.5rem;
  }

  .upload-text {
    font-size: 1rem;
  }

  .analyze-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .hero-section {
    padding: 15px 0;
  }

  .upload-section {
    padding: 25px 20px;
  }
}
