#climax-chat-widget {
  --cc-primary: #2563eb;
  --cc-primary-hover: #1d4ed8;
  --cc-bg: #ffffff;
  --cc-border: #e5e7eb;
  --cc-text: #1f2937;
  --cc-text-light: #6b7280;
  --cc-user-bg: #2563eb;
  --cc-user-text: #ffffff;
  --cc-assistant-bg: #f3f4f6;
  --cc-assistant-text: #1f2937;
  --cc-error-bg: #fef2f2;
  --cc-error-text: #991b1b;

  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* Toggle button */
#climax-chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cc-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.2s;
}

#climax-chat-toggle:hover {
  background: var(--cc-primary-hover);
}

/* Chat window */
#climax-chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 370px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

#climax-chat-window.climax-chat-hidden {
  display: none;
}

/* Header */
#climax-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--cc-primary);
  color: white;
  font-weight: 600;
}

#climax-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

/* Messages area */
#climax-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bubbles */
.climax-chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.climax-chat-user {
  align-self: flex-end;
  background: var(--cc-user-bg);
  color: var(--cc-user-text);
  border-bottom-right-radius: 4px;
}

.climax-chat-assistant {
  align-self: flex-start;
  background: var(--cc-assistant-bg);
  color: var(--cc-assistant-text);
  border-bottom-left-radius: 4px;
}

.climax-chat-error {
  background: var(--cc-error-bg);
  color: var(--cc-error-text);
}

/* Input form */
#climax-chat-form {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--cc-border);
  gap: 8px;
}

#climax-chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

#climax-chat-input:focus {
  border-color: var(--cc-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

#climax-chat-send {
  padding: 8px 16px;
  background: var(--cc-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}

#climax-chat-send:hover {
  background: var(--cc-primary-hover);
}

#climax-chat-send:disabled,
#climax-chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
