/* General Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #66fcf1; /* Accent color */
  --color-secondary: #45a29e;
  --color-bg-dark: #1f2833;
  --color-bg-light: #2b3a4a;
  --color-border: #3a475a;
  --color-text: #c5c5c5;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, var(--color-bg-dark), #0b0c0e);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.app-container {
  background-color: var(--color-bg-dark);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 800px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

/* Screen Management */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  transform: translateX(100%);
  overflow-y: auto;
}

.screen.active {
  position: relative;
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* Header & Info */
header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 2em;
}

.job-count-text {
  margin-top: 15px;
  font-size: 1.1em;
  color: var(--color-secondary);
}

/* Buttons */
.main-btn,
.secondary-btn {
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 20px auto 0;
}

.main-btn {
  background-color: var(--color-primary);
  color: var(--color-bg-dark);
}

.main-btn:hover {
  background-color: var(--color-secondary);
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  font-size: 1em;
  font-weight: 400;
  margin: 10px auto;
}

.secondary-btn:hover {
  background-color: rgba(102, 252, 241, 0.1);
}

/* Quiz Styles */
.progress-bar-container {
  height: 8px;
  background-color: var(--color-border);
  border-radius: 4px;
  margin-bottom: 30px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--color-primary);
  border-radius: 4px;
  transition: width 0.4s ease-out;
}

.question-title {
  font-size: 1.5em;
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease-in-out;
  /* Restored original padding/border look for full width */
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.answer-option {
  background-color: var(--color-bg-light);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  text-align: left;
  width: 100%;
}

.answer-option:hover {
  background-color: var(--color-border);
  border-color: var(--color-primary);
  transform: scale(1.02);
}

.answer-option.selected {
  background-color: var(--color-secondary);
  border-color: var(--color-primary);
  color: var(--color-bg-dark);
  font-weight: 600;
}

/* Result Screen Styles */
.result-card {
  text-align: center;
  padding: 40px;
  background-color: var(--color-bg-light);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: zoomIn 0.5s ease-out;
}

.job-title-result {
  font-size: 2.5em;
  color: var(--color-secondary);
  margin-bottom: 30px;
  text-transform: uppercase;
}

.job-details {
  text-align: left;
  padding: 20px;
  background-color: var(--color-bg-dark);
  border-radius: 8px;
  /* Added padding bottom for separation */
  padding-bottom: 30px;
}

.job-details i {
  color: var(--color-primary);
  margin-right: 10px;
}

/* Ensure the description takes full width */
.detail-description {
  grid-column: 1 / -1;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

/* Style for the new requirement section */
.detail-requirement {
  grid-column: 1 / -1; /* Takes full width below the stats grid */
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  font-weight: 600; /* Emphasize the requirement label */
  color: var(--color-primary); /* Use primary color for emphasis */
  font-size: 1.05em; /* Match other p tags */
}

.detail-requirement #job-requirement-result {
  font-weight: 400; /* Keep the actual result text lighter */
  color: var(--color-text);
}

.stats-grid {
  display: grid;
  /* Updated grid to 2 columns */
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeInModal 0.3s ease-out;
}

.modal-content {
  background-color: var(--color-bg-dark);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid var(--color-secondary);
  width: 90%;
  max-width: 900px;
  border-radius: 15px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease-out;
}

#full-job-table {
  width: 100%;
  border-collapse: collapse;
}

#full-job-table th,
#full-job-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9em;
}

/* Adjust column widths for better fit with the new Requirement column */
#full-job-table th:nth-child(1) {
  width: 25%;
} /* Job Title */
#full-job-table th:nth-child(2) {
  width: 35%;
} /* Description */
#full-job-table th:nth-child(3) {
  width: 15%;
} /* Salary */
#full-job-table th:nth-child(4) {
  width: 10%;
} /* Hours */
#full-job-table th:nth-child(5) {
  width: 15%;
} /* Requirement */

#full-job-table th {
  background-color: var(--color-secondary);
  color: var(--color-bg-dark);
  font-weight: 600;
}

#full-job-table tr:nth-child(even) {
  background-color: var(--color-bg-light);
}

.close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
