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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  padding: 20px;
  background: #fff;
  color: #000;
}

header {
  font-size: 18px;
  font-weight: bold;
  padding-bottom: 12px;
  border-bottom: 2px solid #000;
  margin-bottom: 16px;
}

.panels {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  border: 1px solid #ccc;
  padding: 12px;
}

.panel h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 8px;
}

#account-info {
  font-size: 13px;
  line-height: 1.6;
}

.account-row {
  display: flex;
  gap: 8px;
}

.account-label {
  color: #888;
  min-width: 60px;
}

.account-value {
  word-break: break-all;
}

/* Votes */

.vote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vote-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #eee;
}

.vote-table td:first-child {
  font-weight: bold;
  width: 80px;
}

.vote-none {
  color: #bbb;
}

.vote-buy {
  color: #2a7d2a;
  font-weight: bold;
}

.vote-sell {
  color: #c0392b;
  font-weight: bold;
}

/* Chat row */

.chat-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

#chat-panel {
  flex: 1;
  min-width: 0;
}

.chat-image {
  width: 300px;
  height: auto;
  object-fit: contain;
  align-self: flex-start;
  border: 1px solid #ccc;
}

#messages {
  height: 500px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.msg {
  padding: 3px 0;
  line-height: 1.5;
}

.msg-time {
  color: #999;
  font-size: 12px;
  margin-right: 6px;
}

.msg-name {
  font-weight: bold;
  margin-right: 4px;
}

.msg-vote-badge {
  display: inline-block;
  padding: 0 4px;
  border: 1px solid;
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-buy {
  border-color: #2a7d2a;
  color: #2a7d2a;
}

.badge-sell {
  border-color: #c0392b;
  color: #c0392b;
}

/* Consensus */

.consensus-msg {
  background: #fffde7;
  border: 1px solid #f9a825;
  padding: 6px 10px;
  margin: 6px 0;
  font-weight: bold;
}

/* Connection */

#connection-status {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  background: #fff;
}

.connected {
  border-color: #2a7d2a !important;
  color: #2a7d2a;
}

.disconnected {
  border-color: #c0392b !important;
  color: #c0392b;
}

/* Copyable */
.copyable {
  cursor: pointer;
  border-bottom: 1px dashed #999;
}

.copyable:hover {
  background: #f0f0f0;
}

#copy-toast {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  font-size: 12px;
  padding: 4px 12px;
  background: #000;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

#copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Shrimp colors */
.shrimp-chuck { color: #c0392b; }
.shrimp-gary { color: #27ae60; }
.shrimp-coral { color: #d35400; }
.shrimp-bob { color: #2980b9; }
.shrimp-sandy { color: #8e44ad; }

@media (max-width: 900px) {
  .chat-row {
    flex-direction: column;
  }
  .chat-image {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 700px) {
  .panels {
    grid-template-columns: 1fr;
  }
}
