* {
  box-sizing: border-box;
}


body {
  margin: 0;
  background: linear-gradient(#eef3f9, #f7f9fc);
  font-family: "Segoe UI", Arial, sans-serif;
}


.container {
  max-width: 1100px;
  margin: auto;
  padding: 30px;
}


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


header p {
  color: #6b7280;
}


.card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}


label {
  font-weight: 500;
  display: block;
  margin-top: 10px;
}


input,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}


textarea {
  min-height: 120px;
}


button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-size: 16px;
  cursor: pointer;
}


button:hover {
  background: #1e40af;
}


button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}


.or-divider {
  display: flex;
  align-items: center;
  margin: 14px 0;
}


.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd;
}


.or-divider span {
  margin: 0 10px;
  font-size: 12px;
  color: #777;
}


.results-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}


.hidden {
  display: none;
}


.skill {
  display: inline-block;
  padding: 6px 14px;
  margin: 6px 6px 0 0;
  border-radius: 20px;
  font-size: 14px;
}


.matched {
  background: #d1fae5;
  color: #065f46;
}


.missing {
  background: #fee2e2;
  color: #991b1b;
}


.preferred {
  background: #dbeafe;
  color: #1e40af;
}


.center {
  text-align: center;
}


.score {
  font-size: 18px;
  font-weight: 600;
}


/* ==========================================================
   AUTH
   ========================================================== */

.auth-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f4f6fa;
}


.auth-container {
  width: 360px;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
  text-align: center;
}


.auth-container h2 {
  margin-bottom: 20px;
}


.auth-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}


.auth-switch {
  margin: 10px 0 16px;
  font-size: 14px;
}


.auth-switch span {
  cursor: pointer;
  color: #6b7280;
}


.auth-switch span.active {
  color: #2563eb;
  font-weight: 600;
}


#authBtn {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 15px;
}


#authMessage {
  margin-top: 10px;
  color: red;
  font-size: 14px;
}


/* ==========================================================
   LOGOUT
   ========================================================== */

.logout-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}


.logout-btn {
  width: auto !important;
  padding: 6px 18px !important;
  margin-top: 0 !important;
  font-size: 14px;
  border-radius: 8px;
  background-color: #dc2626;
}


.logout-btn:hover {
  background-color: #b91c1c;
}


/* ==========================================================
   RESULT SUMMARY
   ========================================================== */

.analysis-message {
  text-align: center;
  margin-top: 12px;
  color: #6b7280;
  font-size: 14px;
}


.result-summary {
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 12px;
  margin: 16px 0 20px;
}


.result-summary p {
  margin: 8px 0;
}


.recommendation-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}


.recommendation-good {
  background: #d1fae5;
  color: #065f46;
}


.recommendation-moderate {
  background: #fef3c7;
  color: #92400e;
}


.recommendation-low {
  background: #fee2e2;
  color: #991b1b;
}


.empty-result {
  color: #6b7280;
  font-size: 14px;
  margin-top: 8px;
}


/* ==========================================================
   SCORE BREAKDOWN
   ========================================================== */

.score-breakdown {
  margin-top: 24px;
  text-align: left;
}


.score-breakdown h4 {
  text-align: center;
  margin-bottom: 14px;
}


.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
}


.score-row:last-child {
  border-bottom: none;
}


#strengthsList,
#weaknessesList {
  padding-left: 20px;
}


#strengthsList li,
#weaknessesList li {
  margin-bottom: 7px;
  line-height: 1.5;
}


/* ==========================================================
   INTERVIEW INTELLIGENCE
   ========================================================== */

.secondary-action-btn {
  background: #1d4ed8;
}


.secondary-action-btn:hover {
  background: #1e40af;
}


.interview-heading h3 {
  margin-bottom: 5px;
}


.interview-heading p {
  margin-top: 0;
  color: #6b7280;
}


.interview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}


.interview-category {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
}


.interview-category-full {
  grid-column: 1 / -1;
}


.interview-category h4 {
  margin-top: 0;
  color: #1f2937;
}


.interview-category ol {
  padding-left: 22px;
  margin-bottom: 0;
}


.interview-category li {
  margin-bottom: 10px;
  line-height: 1.5;
  color: #374151;
}


/* ==========================================================
   HISTORY
   ========================================================== */

.history-section {
  margin-top: 10px;
}


.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}


.history-header h3 {
  margin: 0 0 4px;
}


.history-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}


.history-refresh-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
}


.history-table-wrapper {
  width: 100%;
  overflow-x: auto;
}


.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}


.history-table th {
  text-align: left;
  padding: 12px 10px;
  background: #f8fafc;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}


.history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}


.history-table tbody tr:hover {
  background: #f9fafb;
}


.view-result-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
}


.history-empty {
  text-align: center;
  color: #6b7280;
  padding: 20px 0;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .container {
    padding: 18px;
  }


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


  .interview-grid {
    grid-template-columns: 1fr;
  }


  .interview-category-full {
    grid-column: auto;
  }


  .history-header {
    align-items: flex-start;
    flex-direction: column;
  }


  .history-refresh-btn {
    align-self: flex-start;
  }

}