canvas {
  display: block;
  
}

.gen-col-wrapper{
  display:flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  border:1px solid #CCC;
}

#board-spec-container{
  width:65%;
}

/* Footer styling */
.toggle-container {
  position: relative;
  width:30%;
  background:#f0f0f0;
  padding: 20px 30px;
  border-radius: 4px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  width: max-content;
  align-items: center;
}

.control-pair {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 200px;
}

.slider-group, .toggle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Slider customization */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 1px;
  background: black;
  border-radius: 0;
  margin: 5px 0;
}

input[type="range"].toggle {
  width: 50px;
}

/* Handle (dot) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; /* Doubled from 8px */
  height: 16px; /* Doubled from 8px */
  background: black;
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px; /* Doubled from 8px */
  height: 16px; /* Doubled from 8px */
  background: black;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Remove focus outline */
input[type="range"]:focus {
  outline: none;
}

/* Slider labels */
.slider-label {
  font-family: var(--font-family);
  font-size: 12px;
  margin-bottom: 5px;
}

.print-button {
  padding: 8px 16px;
  background: black;
  color: white;
  border: none;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.print-button:hover {
  opacity: 0.8;
}

/* Rules Overlay */
.rules-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

.rules-container .rules-overlay,
.rules-container .rules-close {
  pointer-events: auto;
}

.rules-overlay {
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  transition: right 0.3s ease-in-out;
  z-index: 9999;
  font-family: var(--font-family);
  overflow-y: auto;
  box-sizing: border-box;
}

.rules-overlay.active {
  right: 0;
}

.rules-content {
  position: relative;
  max-width: 800px;
  margin: 60px auto;
  padding: 20px 40px;
  color: black;
  display: flex;
  flex-direction: column;
  gap: 40px;
  z-index: 10000; /* Above overlay */
}

.rules-section {
  padding-top: 20px;
  line-height: 1.6;
}

.rules-section h3 {
  font-size: 24px;
  margin-bottom: 1.5em;
}

.rules-section h4 {
  font-size: 20px;
  margin: 1em 0;
}

.rules-section h5 {
  font-size: 16px;
  margin: 1em 0;
}

.rules-section ul {
  margin: 0.5em 0;
  padding-left: 20px;
}

.rules-section li {
  margin: 0.3em 0;
}

/* Update close button to be part of the overlay movement */
.rules-close {
  position: fixed;
  top: 20px;
  right: -100%; /* Match overlay initial position */
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 10001;
  transition: right 0.3s ease-in-out; /* Match overlay transition */
}

/* Move close button with overlay */
.rules-overlay.active + .rules-close {
  right: calc(100% - 50px); /* Position from right edge when active */
}

.rules-close::before,
.rules-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: black;
}

.rules-close::before {
  transform: rotate(45deg);
}

.rules-close::after {
  transform: rotate(-45deg);
}

.rules-language {
  display: none;
}

.language-button {
  padding: 8px 16px;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 12px;
}

.language-button.active {
  opacity: 0.6;
}

/* Update button group styling */
.control-pair .toggle-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* Only hide labels for the button column */
.control-pair:last-child .toggle-group .slider-label {
  display: none;
}

/* Restore other toggle group labels */
.control-pair .toggle-group .slider-label {
  display: block;
}

/* Adjust button layout in last column */
.control-pair:last-child .toggle-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}




.slider-label {
  font-family: var(--font-family);
}

.print-button {
  font-family: var(--font-family);
}

.rules-overlay {
  font-family: var(--font-family);
}

.language-button {
  font-family: var(--font-family);
}

/* Questions List Styles */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.questions-list .question-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #eee;
}

.questions-list .form-group {
  margin-bottom: 0;
}

/* Remove old accordion styles */
.questions-accordion,
.accordion-toggle,
.toggle-icon,
.question-header,
.question-content {
  /* Remove these styles or comment them out */
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

.error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 4px;
}

.form-group input.field-error,
.form-group select.field-error,
.form-group textarea.field-error {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

.validation-message {
    display: none;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.6rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* Multiple Choice Question Styles */
.answers-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.answers-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.answer-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.answer-group input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.answer-group input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    cursor: pointer;
}

.answer-group input[type="radio"]:checked {
    accent-color: var(--primary-color);
}

.answer-group:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 0.5rem;
    margin: -0.5rem 0;
}
