/* General Layout - Consistent with other services */
:root {
  --bg-main: #f8f9fa;
  --bg-panel: #ffffff;
  --text-main: #212529;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --accent-color: #007aff;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
}

.layout {
  display: flex;
  height: 100vh;
}

/* Chat Panel */
.chat-panel {
  width: 35%;
  max-width: 400px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.chat-header .dot {
  width: 8px;
  height: 8px;
  background-color: #2abf88;
  border-radius: 50%;
  margin-right: 8px;
}

.messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
}

.msg {
  padding: 0.75rem 1rem;
  border-radius: 18px;
  margin-bottom: 0.75rem;
  max-width: 85%;
  line-height: 1.5;
}

.msg strong { font-weight: 700; }

.msg.me {
  background-color: var(--accent-color);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg.ai {
  background-color: #e9ecef;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.composer {
  display: flex;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.composer textarea {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-main);
  font-size: 1rem;
  resize: none;
}

.composer button {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0.75rem 1.5rem;
  margin-left: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

/* Initial Choices */
.initial-choices {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.choice-button {
  display: block;
  width: 68%;
  max-width: 260px;
  padding: 0.7rem 0.9rem;
  margin: 0.3rem auto;
  background-color: #e9ecef;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  min-height: 2.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.choice-button:hover {
  background-color: #dee2e6;
  border-color: #adb5bd;
}


/* Preview Panel */
.preview-panel {
  flex-grow: 1;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  width: 100%;
  max-width: 800px;
  background: var(--bg-panel);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 2rem;
  transition: all 0.3s ease;
}

.card.is-blank {
  text-align: center;
  color: var(--text-light);
}

.title {
  text-align: center;
  margin-top: 0;
  font-weight: 700;
  font-size: 1.75rem;
}

.card-content-wrapper {
  margin-top: 2rem;
}

/* Specific styles for Robot Converter */
.workshop-panel {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-light);
  font-size: 1.1rem;
}

.robot-placeholder p {
  font-size: 4rem;
  margin: 0;
}

.algorithm-steps {
  text-align: left;
  align-self: flex-start;
  width: 100%;
  color: var(--text-main);
}

.algorithm-steps h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text-main);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.algorithm-steps ol {
  padding-left: 20px;
  margin: 0;
}

.algorithm-steps li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.converter-tool {
  width: 100%;
  padding-top: 1rem;
}

.converter-tool .input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.converter-tool input {
  flex-grow: 1;
  font-size: 1.1rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
}

.converter-tool button {
  font-size: 1.05rem;
  padding: 0.65rem 1.25rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.result-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: #e9ecef;
  border-radius: 8px;
  text-align: center;
}

.result-panel h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text-light);
  font-weight: 500;
}

.result-panel .result-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 2px;
}

.steps-toggle {
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

.conversion-steps-container {
  margin-top: 0.5rem;
  text-align: left;
  font-family: monospace;
  background: var(--text-main);
  color: #e9ecef;
  padding: 0.75rem;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-x: auto;
} 