/* Chat Board Styles */
.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  background: var(--bg-color);
  margin-bottom: 1rem;
}

.chat-message {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
}

.chat-message:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chat-message-author {
  font-weight: bold;
  color: var(--accent-color);
}

.chat-message-email {
  color: var(--text-secondary);
  font-size: 0.8em;
  margin-left: 0.5rem;
}

.chat-message-timestamp {
  color: var(--text-secondary);
  font-size: 0.8em;
}

.chat-message-content {
  margin: 0.5rem 0;
  white-space: pre-wrap;
  line-height: 1.4;
}

.chat-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

.chat-form-container {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  background: var(--bg-color);
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-form input,
.chat-form textarea {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-form input:focus,
.chat-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.chat-submit-btn {
  padding: 0.75rem;
  background: var(--accent-color);
  color: var(--bg-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.2s;
}

.chat-submit-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.chat-submit-btn:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
}

/* Rate Limit Modal Styles */
.rate-limit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}

.rate-limit-modal {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease-out;
}

.rate-limit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.rate-limit-header h2 {
  margin: 0;
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.rate-limit-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.rate-limit-close:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.rate-limit-content {
  padding: 1.5rem;
  text-align: center;
}

.rate-limit-content p {
  margin: 1rem 0;
  color: var(--text-color);
  line-height: 1.5;
}

.rate-limit-countdown {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}

.countdown-text {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.countdown-timer {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
  font-family: "JetBrains Mono", monospace;
  animation: pulse 2s infinite;
}

.rate-limit-tip {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
