/* TABLE STYLING */
table {
  border-collapse: collapse;
  margin: 30px auto;
  background: var(--surface-color, #161B22);
}

th, td {
  border: 1px solid var(--border-color, rgba(255,255,255,0.2));
  width: 180px;
  height: 90px;
  text-align: center;
  vertical-align: middle;
  padding: 6px;
  color: var(--text-primary, #F8FAFC);
}

th {
  background: var(--header-footer-color, #282828);
  font-weight: bold;
  color: var(--text-primary, #F8FAFC);
}

.incorrect {
  background-color: #ff4444 !important;
  transition: background-color 0.5s ease;
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.cell-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.hint-btn {
  background: none;
  border: 1px solid #ffae00;
  color: #ffae00;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
}

.hint-btn:hover {
  background: var(--accent, #ffae00);
  color: var(--text-primary, #0F172A);
}

.hint-text {
  font-size: 11px;
  color: var(--text-secondary, #8B949E);
  font-style: italic;
  max-width: 120px;
  text-align: center;
}

.revealed {
  background-color: #3498db !important;
  color: white !important;
  transition: background-color 0.5s ease;
}

.reveal-btn {
  background: none;
  border: 1px solid #3498db;
  color: #3498db;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 2px;
}

.reveal-btn:hover {
  background: #3498db;
  color: white;
}

.correct {
  font-weight: bold;
}
body.light-theme .correct {
  background: #d4edda;
  color: #0F172A;
}
body.dark-theme .correct,
body:not(.light-theme):not(.dark-theme) .correct {
  background: #166534;
  color: #fff;
}

.button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
