/* 
 * Polished CSS
 * A cleaned up and organized version of the original stylesheet
 */

/* ===== Variables ===== */
:root {
  --positive-color: #B8D0E6; 
  --neutral-color: #C1E1C1;  
  --negative-color: #F8C3C3;
  --border-color: #ddd;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --header-bg: #f2f2f2;
}

/* ===== Base Styles ===== */
body {
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  font-family: sans-serif;
}

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

h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.1rem;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  box-sizing: border-box;
  box-shadow: var(--shadow);
}

.navbar-links a {
  margin-left: 1rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
}

.navbar-links a:hover {
  color: #000;
  text-decoration: underline;
}



/* ===== Buttons ===== */
.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.auth-button {
  background-color: #222;
  color: white;
  width: 100%;
}

.auth-button:hover {
  background-color: #555;
}

.app-button {
  background-color: #bbb;;
  color: #333;
}

.app-button:hover {
  background-color: #ccc;
}

.button-row {
  display: flex;
  margin: 1rem 0 0 0;
  gap: 1rem;
}

/* ===== Forms ===== */
.form-container {
  background-color: #fff;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 320px;
  box-shadow: var(--shadow);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 400px;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
}

input,
select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1rem;
}

/* ===== Page Layout ===== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1rem 1rem 1rem; /* top, right, bottom, left */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assessment-card {
  background-color: #fff;
  padding: 15px;
  border-radius: 5px;
  box-shadow: var(--shadow);
}

/* ===== Matrix Layout ===== */
.matrix-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

/* Make the first column narrower */
.matrix-table th:first-child {
  width: 200px;
}

/* Distribute remaining columns equally */
.matrix-table th:not(:first-child) {
  width: calc((100% - 120px) / (var(--num-columns) - 1));
}

/* Table cells and headers */
.matrix-table th,
.matrix-table td {
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
}

/* Header styling */
.matrix-table thead th {
  background-color: var(--header-bg);
  font-weight: bold;
}

/* First column (participant names) */
.matrix-table th:first-child {
  text-align: left;
  min-width: 150px;
  background-color: var(--header-bg);
  position: sticky;
  left: 0;
}

/* Row headers */
.matrix-table tbody th {
  text-align: left;
  font-weight: 500;
  background-color: var(--header-bg);
}

/* Empty corner cell */
.matrix-table .empty-cell {
  background-color: var(--header-bg);
}

/* Self-referential cell (diagonal) */
.matrix-table .self-cell {
  text-align: center;
  color: #999;
}

.matrix-table th a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.matrix-table th a::after {
  content: "👤→";  /* Add indicator showing it's clickable */
  font-size: 1rem;
  margin-left: 5px;
}

/* Optional hover effect to show interactivity */
.matrix-table th a:hover {
  opacity: 0.8;
}

/* Sentiment colors for both inputs and results */
/* Sentiment colors for both inputs and results */
.positive, 
.positive-option,
td.positive {
  background-color: var(--positive-color);
}

.neutral, 
.neutral-option,
td.neutral {
  background-color: var(--neutral-color);
}

.negative, 
.negative-option,
td.negative {
  background-color: var(--negative-color);
}

/* Form elements within matrix */
.matrix-table select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  margin-bottom: 0;
}

/* Matrix responsive styles */
@media (max-width: 768px) {
  .matrix-table th,
  .matrix-table td {
    padding: 5px;
    font-size: 0.9rem;
  }
}