* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0f0f0f;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Segoe UI', sans-serif;
}

.chat-wrapper {
  width: 100%;
  max-width: 720px;
  height: 90vh;
  background: #1a1a1a;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

.chat-header {
  background: #111;
  padding: 16px 20px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  font-size: 28px;
  background: #1e1e2e;
  padding: 8px;
  border-radius: 10px;
}

.chat-header h1 {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
}

.status {
  font-size: 12px;
  color: #4ade80;
}

.new-chat-btn {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.new-chat-btn:hover {
  background: #333;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  word-break: break-word;
}

.message.bot {
  background: #2a2a2a;
  color: #e0e0e0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.user {
  background: #4f46e5;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #2a2a2a;
  background: #111;
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  min-width: 0;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}

.chat-input-area input:focus {
  border-color: #4f46e5;
}

.chat-input-area button {
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chat-input-area button:hover {
  background: #4338ca;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

/* ── Build Card ── */
.build-card {
  background: #1e1e2e;
  border: 1px solid #4f46e5;
  border-radius: 16px;
  padding: 20px;
  margin: 8px 0;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.build-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.build-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.build-card-header h3 {
  color: #ffffff;
  font-size: 16px;
  margin: 0 0 4px;
}

.build-total {
  color: #4f46e5;
  font-size: 20px;
  font-weight: 700;
}

.build-components {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.component-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  background: #2a2a2a;
  border-radius: 10px;
  gap: 12px;
  overflow: hidden;
}

.component-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.component-label {
  font-size: 11px;
  color: #4f46e5;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.component-name {
  font-size: 13px;
  color: #ffffff;
  font-weight: 500;
  word-break: break-word;
}

.component-reason {
  font-size: 11px;
  color: #888;
  word-break: break-word;
  line-height: 1.4;
}

.component-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.component-price {
  font-size: 14px;
  color: #4ade80;
  font-weight: 600;
  white-space: nowrap;
}

.buy-btn {
  display: inline-block;
  background: #f59e0b;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.buy-btn:hover {
  background: #d97706;
}

.build-summary {
  background: #2a2a2a;
  border-radius: 10px;
  padding: 12px;
  border-left: 3px solid #4f46e5;
  margin-bottom: 16px;
}

.build-summary p {
  color: #aaa;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  word-break: break-word;
}

.build-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
  flex-wrap: wrap;
}

.copy-btn {
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #4338ca;
}

.whatsapp-btn {
  background: #25d366;
  color: white;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s;
}

.whatsapp-btn:hover {
  background: #1da851;
}

.share-confirm {
  font-size: 13px;
  color: #4ade80;
  display: none;
}

.price-note {
  font-size: 11px;
  color: #888;
  display: block;
  margin-top: 4px;
}