/* Base Styles */
:root {
  --primary-color: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #4338ca;
  --secondary-color: #10b981;
  --secondary-light: #34d399;
  --secondary-dark: #059669;
  --danger-color: #ef4444;
  --danger-light: #f87171;
  --warning-color: #f59e0b;
  --warning-light: #fbbf24;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: inherit;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Header Styles */
header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo i {
  font-size: 1.75rem;
  color: var(--primary-color);
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 100%;
  max-height: 400px;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.cta-button:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Section Styles */
section {
  padding: 4rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* Upload Section */
.upload-section {
  background-color: var(--bg-white);
}

.upload-container {
  max-width: 1000px;
  margin: 0 auto;
}

.file-upload-area {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.file-upload {
  flex: 1;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.file-upload:hover {
  border-color: var(--primary-light);
  background-color: rgba(79, 70, 229, 0.05);
}

.file-upload.active {
  border-color: var(--primary-color);
  background-color: rgba(79, 70, 229, 0.1);
}

.file-upload-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.file-upload h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.file-upload p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.file-types {
  font-size: 0.875rem;
  color: var(--text-lighter);
}

.file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-info {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--primary-color);
}

.submit-container {
  display: flex;
  justify-content: center;
}

.submit-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.submit-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.submit-button:disabled {
  background-color: var(--text-lighter);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading Section */
.loading-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background-color: var(--bg-white);
}

.loading-container {
  text-align: center;
  width: 100%;
  max-width: 500px;
}

.loading-spinner {
  display: inline-block;
  width: 80px;
  height: 80px;
  margin-bottom: 2rem;
}

.loading-spinner:after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-radius: 50%;
  border: 6px solid var(--primary-color);
  border-color: var(--primary-color) transparent var(--primary-color) transparent;
  animation: loading-spinner 1.2s linear infinite;
}

@keyframes loading-spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-container h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.loading-container p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.loading-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 0 1rem;
}

.loading-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-lighter);
  position: relative;
  width: 100px;
}

.loading-step i {
  font-size: 1.5rem;
}

.loading-step span {
  font-size: 0.875rem;
}

.loading-step.active {
  color: var(--primary-color);
}

.loading-step.completed {
  color: var(--secondary-color);
}

.loading-step.completed::after {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 0.75rem;
  position: absolute;
  top: 0;
  right: 20px;
  width: 20px;
  height: 20px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Results Section */
.results-section {
  background-color: var(--bg-light);
}

.results-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.explanation-card {
  background-color: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  grid-column: span 2;
}

.explanation-card ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.explanation-card li {
  margin-bottom: 0.5rem;
}

.explanation-card code {
  background-color: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
}

.results-card {
  background-color: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.match-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skills-overview-card {
  display: flex;
  flex-direction: column;
}

.detailed-results-card,
.suggestions-card {
  grid-column: span 2;
}

.match-score-container {
  text-align: center;
}

.match-score-container h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.circular-progress {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) 0%, #f3f4f6 0%);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
  position: relative;
}

.circular-progress-inner {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

#percentage-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

#match-message {
  font-size: 1.125rem;
  color: var(--text-light);
}

.skills-chart-container {
  flex: 1;
  min-height: 200px;
  position: relative;
  margin-bottom: 1.5rem;
}

.skills-count {
  display: flex;
  justify-content: space-between;
}

.count-item {
  text-align: center;
}

.count {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.label {
  font-size: 0.875rem;
  color: var(--text-light);
}

.count-item.matching .count {
  color: var(--secondary-color);
}

.count-item.missing .count {
  color: var(--danger-color);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-weight: 500;
  position: relative;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.tab-pane {
  display: none;
}

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

.tab-description {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.skills-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.skills-header i {
  font-size: 1.5rem;
}

#matching-tab .skills-header i {
  color: var(--secondary-color);
}

#missing-tab .skills-header i {
  color: var(--danger-color);
}

#resume-tab .skills-header i {
  color: var(--primary-color);
}

#job-tab .skills-header i {
  color: var(--text-dark);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  background-color: #f3f4f6;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#matching-tab .skill-tag {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--secondary-dark);
}

#missing-tab .skill-tag {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

#resume-tab .skill-tag {
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary-dark);
}

#job-tab .skill-tag {
  background-color: rgba(31, 41, 55, 0.1);
  color: var(--text-dark);
}

.skill-tag i {
  font-size: 0.75rem;
}

/* Suggestions Card */
.suggestions-card h3 {
  margin-bottom: 1.5rem;
}

#suggestions-list li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

#suggestions-list li::before {
  content: "\f0eb";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--warning-color);
}

/* Results Actions */
.results-actions {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.action-button {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: none;
}

.action-button:not(.secondary) {
  background-color: var(--primary-color);
  color: white;
}

.action-button:not(.secondary):hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.action-button.secondary {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.action-button.secondary:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* How It Works Section */
.how-it-works-section {
  background-color: var(--bg-light);
}

.steps-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 2rem;
  background-color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.step-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(79, 70, 229, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
}

.step-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.step p {
  color: var(--text-light);
}

/* About Section */
.about-section {
  background-color: var(--bg-white);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-light);
}

/* Footer */
footer {
  background-color: var(--bg-dark);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo i {
  font-size: 1.75rem;
  color: var(--primary-light);
}

.footer-logo h2 {
  font-size: 1.5rem;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-lighter);
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-lighter);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-lighter);
  font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .steps-container {
    flex-wrap: wrap;
  }

  .step {
    flex-basis: calc(50% - 1rem);
  }

  .footer-content {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .footer-logo {
    flex-basis: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
  }

  .file-upload-area {
    flex-direction: column;
  }

  .results-container {
    grid-template-columns: 1fr;
  }

  .detailed-results-card,
  .suggestions-card,
  .results-actions {
    grid-column: span 1;
  }

  .loading-steps {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .step {
    flex-basis: 100%;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .footer-links ul {
    align-items: center;
  }
}

/* Paste this at the bottom of styles.css */

.how-calculated-section {
  background-color: #ffffff;
  padding: 3rem 2rem;
  border-top: 1px solid #e5e7eb;
}

.how-calculated-section .explanation-box {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

.how-calculated-section ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.how-calculated-section li {
  margin-bottom: 0.5rem;
}

.how-calculated-section code {
  background-color: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
}


.chart-toggle-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.chart-btn {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s;
}

.chart-btn:hover {
  background-color: #e5e7eb;
  transform: translateY(-2px);
}

.chart-btn.active {
  background-color: #4f46e5;
  color: white;
  border-color: #4f46e5;
  transform: none;
}


.skills-overview-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
  width: 100%;
}
