* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: Helvetica, Arial, sans-serif;
  background: #101014;
  color: #e8e8ed;
  min-height: 100vh;
}
#root { max-width: 1040px; margin: 0 auto; padding: 24px 16px; }
h1 {
  text-align: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 28px;
}
.panel-headers {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}
.panel-header {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  color: #a0a0b0;
  font-weight: 600;
  padding: 10px;
  background: #1c1c24;
  border-radius: 10px 10px 0 0;
  border: 1px solid #2a2a36;
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.slot-row {
  display: flex;
  gap: 12px;
  margin-bottom: 1px;
}
.slot-cell {
  flex: 1;
  background: #1c1c24;
  padding: 10px 14px;
  border-left: 1px solid #2a2a36;
  border-right: 1px solid #2a2a36;
}
.slot-row:last-of-type .slot-cell {
  border-bottom: 1px solid #2a2a36;
  border-radius: 0 0 10px 10px;
  padding-bottom: 14px;
}
.slot-label {
  font-size: 0.65rem;
  color: #6b6b7b;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.dropdown-wrapper { position: relative; }
.dropdown-input {
  width: 100%;
  padding: 7px 30px 7px 10px;
  background: #14141a;
  border: 1px solid #2a2a36;
  border-radius: 6px;
  color: #e8e8ed;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.dropdown-input:focus { border-color: #5b8af5; }
.dropdown-input::placeholder { color: #4a4a58; }
.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #4a4a58;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px;
}
.clear-btn:hover { color: #f06050; }
.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: #1c1c24;
  border: 1px solid #2a2a36;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 100;
}
.dropdown-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #22222c;
}
.dropdown-item:hover { background: #24242e; }
.dropdown-item-name { color: #d0d0da; }
.dropdown-item-def { color: #6b6b7b; font-size: 0.75rem; }
.dropdown-item-set { color: #5dba72; font-size: 0.7rem; margin-left: 6px; }
.piece-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  white-space: nowrap;
  max-width: 100%;
}
.pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-defense {
  background: rgba(255,213,79,0.12);
  color: #ffd54f;
  font-weight: 600;
}
.pill-bonus {
  background: rgba(160,160,176,0.1);
  color: #9090a0;
}
.pill-set {
  background: rgba(93,186,114,0.14);
  color: #5dba72;
  font-weight: 600;
}
.pill-set-bonus {
  background: rgba(93,186,114,0.1);
  color: #5dba72;
}
.comparison-section {
  background: #1c1c24;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid #2a2a36;
  margin-top: 28px;
}
.comparison-title {
  font-size: 0.85rem;
  color: #a0a0b0;
  margin-bottom: 14px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.comparison-row {
  display: flex;
  align-items: stretch;
  margin-bottom: 1px;
  min-height: 30px;
}
.comparison-cell {
  flex: 1;
  padding: 5px 12px;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
}
.comparison-label {
  width: 240px;
  min-width: 240px;
  padding: 5px 10px;
  font-size: 0.8rem;
  color: #6b6b7b;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16161e;
}
.comparison-cell-left { justify-content: flex-end; text-align: right; }
.comparison-cell-right { justify-content: flex-start; text-align: left; }
.cell-better { background: rgba(93,186,114,0.12); color: #5dba72; }
.cell-worse { background: rgba(240,96,80,0.12); color: #f06050; }
.cell-equal { background: rgba(160,160,176,0.06); color: #6b6b7b; }
.cell-only { background: rgba(160,160,176,0.06); color: #6b6b7b; }
.cell-empty { background: rgba(0,0,0,0.1); }
.comparison-row-defense .comparison-label {
  color: #ffd54f;
  font-weight: 600;
  background: #101014;
}
.comparison-row-defense .comparison-cell {
  font-weight: 600;
  font-size: 0.95rem;
}
.comparison-separator {
  border-bottom: 1px solid #22222c;
  margin: 2px 0;
}
.empty-state {
  text-align: center;
  color: #4a4a58;
  padding: 30px;
  font-style: italic;
  font-size: 0.88rem;
}
.footer {
  text-align: center;
  color: #4a4a58;
  font-size: 0.75rem;
  margin-top: 36px;
  padding-bottom: 16px;
}
.footer a {
  color: #6b6b8a;
  text-decoration: none;
}
.footer a:hover { color: #a0a0b0; }
.dropdown-list::-webkit-scrollbar { width: 5px; }
.dropdown-list::-webkit-scrollbar-track { background: #1c1c24; }
.dropdown-list::-webkit-scrollbar-thumb { background: #333340; border-radius: 3px; }
@media (max-width: 700px) {
  #root { padding: 12px 10px; }
  h1 { font-size: 1.1rem; margin-bottom: 16px; }

  /* Keep panels side by side but tighter */
  .slot-row { gap: 6px; }
  .panel-headers { gap: 6px; }
  .panel-header { font-size: 0.72rem; padding: 7px 4px; }
  .slot-cell { padding: 8px 8px; }

  .slot-label { font-size: 0.6rem; }
  .dropdown-input { font-size: 0.78rem; padding: 8px 26px 8px 8px; }
  .dropdown-item { font-size: 0.78rem; padding: 8px 8px; }
  .pill { font-size: 0.65rem; padding: 2px 6px; }

  /* Comparison: stack label above, values side by side below */
  .comparison-section { padding: 12px 8px; }
  .comparison-row { flex-wrap: wrap; min-height: unset; }
  .comparison-label {
    width: 100%;
    min-width: 100%;
    order: -1;
    background: transparent;
    justify-content: center;
    padding: 6px 8px 2px;
    font-size: 0.72rem;
  }
  .comparison-row-defense .comparison-label {
    background: transparent;
  }
  .comparison-cell { font-size: 0.8rem; padding: 2px 8px 6px; }
  .comparison-cell-left { justify-content: flex-end; }
  .comparison-cell-right { justify-content: flex-start; }
  .comparison-row-defense .comparison-cell { font-size: 0.88rem; }
}
