body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: white;
  color: black;
}

.transition {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.anchor-div {
  margin-top: 20px;
}

.dark-mode {
  background-color: #2c2c2c;
  color: #e0e0e0;
}

.top-right-toggles {
  position: absolute;
  top: 20px;
  right: 20px;
}

.toggle-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-item {
  display: flex;
  align-items: right; 
  gap: 8px; 
}

.toggle-label {
  margin-right: 10px;
  font-size: 16px;
}

.toggle-slider {
  appearance: none;
  width: 34px;
  height: 20px;
  background: #ccc;
  border-radius: 50px;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transform: translateY(-50%);
  transition: transform 0.3s;
}

.toggle-slider:checked {
  background: #4CAF50;
}

.toggle-slider:checked:before {
  transform: translate(16px, -50%);
}

.card {
  max-width: 380px;
  width: 90%;
  margin: 96px auto;
  padding: 36px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background-color: white;
  text-align: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.card h1 {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 600;
}

.card .subtitle {
  margin: -16px 0 24px;
  font-size: 14px;
  color: #666;
}

.dark-mode .card .subtitle {
  color: #aaa;
}

.card form {
  display: flex;
  flex-direction: column;
}

.card .anchor-div {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.error {
  display: block;
  min-height: 18px;
  margin-top: -4px;
  margin-bottom: 4px;
  color: #d32f2f;
  font-size: 13px;
  text-align: left;
}

.dark-mode .card {
  background-color: #333;
  color: #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dark-mode .error {
  color: #ff6b6b;
}

.input-field {
  width: 100%; 
  padding: 12px 14px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  background-color: white;
  color: black;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box; 
}

.input-field:focus {
  border-color: #007BFF; 
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  outline: none; 
}

.dark-mode .input-field {
  background-color: #2c2c2c;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .input-field:focus {
  border-color: #4da3ff;
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.2);
}

.question-container {
  display: flex;
  justify-content: space-between;
  align-items: right;
  margin-bottom: 20px;
}

.question-text {
  font-size: 18px;
  margin-bottom: 10px;
  display: inline-flex;
}

input[type="radio"] {
  display: none;
}

.radio-label {
  display: flex;
  padding: 10px 30px;
  margin: 5px;
  border-radius: 5px;
  background-color: #f1f1f1;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  align-items: center;
  transition: background-color 0.3s ease; 
}

.radio-group {
  display: flex;
  gap: 10px;
}

input[type="radio"]:checked + .radio-label.yes {
  background-color: #4CAF50;
  color: white;
}

input[type="radio"]:checked + .radio-label.no {
  background-color: #f44336;
  color: white;
}

input[type="text"],
input[type="password"] {
  padding: 10px;
  border: 1px solid #ccc;
  display: flex;
}

.radio-label:hover {
  background-color: #ddd;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: #007BFF;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 24px;
}

button[type="submit"]:hover {
  background-color: #0056b3;
}

.dark-mode .radio-label {
  background-color: #444;
  color: #e0e0e0;
}

.dark-mode input[type="radio"]:checked + .radio-label.yes {
  background-color: #388e3c;
}

.dark-mode input[type="radio"]:checked + .radio-label.no {
  background-color: #d32f2f;
}

.dark-mode .radio-label:hover {
  background-color: #555;
}

.dark-mode button[type="submit"] {
  background-color: #007BFF;
}

.dark-mode button[type="submit"]:hover {
  background-color: #0056b3;
}

a {
  color: #0077ff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

a:hover {
  color: #ff0066;
  transform: scale(1.05);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0077ff, #ff0066);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.4s ease;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

a:active {
  transform: scale(0.95);
  color: #ff3399;
}

.deck-card {
  max-width: 640px;
  margin: 48px auto;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  background-color: white;
}

.signed-in,
.deck-help,
.deck-summary {
  margin: 8px 0 16px;
}

.op-choices {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.op-choice {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f4f4f4;
  cursor: pointer;
  font-size: 14px;
}

.op-choice.selected {
  background: #007BFF;
  border-color: #0056b3;
  color: white;
}

.deck-grid {
  display: grid;
  grid-template-columns: 28px repeat(13, 1fr);
  gap: 4px;
  touch-action: none;
  user-select: none;
}

.deck-corner,
.deck-axis {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #666;
}

.deck-cell {
  aspect-ratio: 1;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f4f4f4;
  padding: 0;
  cursor: crosshair;
}

.deck-cell.selected {
  background: #007BFF;
  border-color: #0056b3;
}

.deck-card .button {
  width: 100%;
  padding: 12px;
  background-color: #007BFF;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.dark-mode .op-choice {
  background: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .op-choice.selected {
  background: #007BFF;
  border-color: #4da3ff;
  color: white;
}

.deck-card .button:hover {
  background-color: #0056b3;
}

.dark-mode .deck-card {
  background-color: #2c2c2c;
  color: #e0e0e0;
}

.dark-mode .deck-axis,
.dark-mode .deck-corner {
  color: #bbb;
}

.dark-mode .deck-cell {
  background: #3a3a3a;
  border-color: #555;
}

.dark-mode .deck-cell.selected {
  background: #007BFF;
  border-color: #4da3ff;
}
