body {
  padding: 50px 40px 40px;
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #999;
  text-align: left;
  margin-bottom: 4px;
}

.summary {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #111;
  text-align: left;
  margin-bottom: 28px;
}

.search-bar {
  margin-bottom: 32px;
}

.search-bar input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #333;
  outline: none;
  background: transparent;
  transition: border-color 0.2s;
}
.search-bar input::placeholder { color: #bbb; }
.search-bar input:focus { border-bottom-color: #111; }

.set-section {
  margin-bottom: 40px;
}

.set-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.set-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.set-count {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #bbb;
  font-variant-numeric: tabular-nums;
}
.set-count.complete { color: #DA291C; }

.progress-bar {
  width: 100%;
  height: 3px;
  background: #f0f0f0;
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #111;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.progress-fill.complete { background: #DA291C; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}

.toy-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 6px;
  transition: background 0.15s;
}
.toy-item:hover {
  background: #f5f5f5;
}

.toy-item img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform 0.2s;
}
.toy-item:hover img { transform: scale(1.08); }

.toy-item.not-collected img {
  filter: brightness(0);
  opacity: 0.15;
}
.toy-item.not-collected:hover img {
  filter: brightness(0);
  opacity: 0.25;
  transform: scale(1.08);
}

.toy-item .tooltip {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: #666;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  padding: 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.toy-item:hover .tooltip { opacity: 1; }
.toy-item.not-collected .tooltip { color: #bbb; }

@media (max-width: 600px) {
  body { padding: 40px 16px 30px; }
  .summary { font-size: 24px; margin-bottom: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); gap: 4px; }
  .set-title { font-size: 14px; }
  .toy-item .tooltip { font-size: 8px; }
  .nav-link { font-size: 12px; top: 12px; }
  .nav-link.right { right: 12px; }
  .nav-link.left { left: 12px; }
}

/* Popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.popup-card {
  background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 3%, #f6f6f6 4%, #fafafa 50%, #ececec 100%);
  border-radius: 12px;
  border: 1px solid #999;
  padding: 0;
  max-width: 380px;
  width: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6) inset, 0 8px 30px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
  overflow: hidden;
}

.popup-card::before {
  content: '';
  display: block;
  width: 100%;
  height: 24px;
  background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 45%, #c8c8c8 55%, #c0c0c0 100%);
  border-bottom: 1px solid #aaa;
  flex-shrink: 0;
}

.popup-close {
  position: absolute;
  top: 5px;
  left: 10px;
  width: 14px;
  height: 14px;
  background: linear-gradient(180deg, #ff6058 0%, #e33e32 100%);
  border: 1px solid #cf3a2f;
  border-radius: 50%;
  font-size: 0;
  cursor: pointer;
  z-index: 5;
}
.popup-close:hover { background: linear-gradient(180deg, #ff7b72 0%, #e85046 100%); }
.popup-close::after {
  content: '\00D7';
  font-size: 11px;
  color: #820b00;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.popup-card > img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
  margin: 24px 0 16px;
}

.popup-info {
  width: 100%;
  text-align: center;
  padding: 0 28px 24px;
}

.popup-info h2 {
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  color: #222;
  margin-bottom: 2px;
}

.popup-set {
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: #3366cc;
  font-weight: normal;
  margin-bottom: 14px;
}

.popup-details {
  width: 100%;
  border-top: 1px solid #c8c8c8;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.detail-label {
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: #888;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: #333;
}

.ebay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 18px;
  background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
  border: 1px solid #aaa;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #333;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.5) inset;
}
.ebay-btn:hover { background: linear-gradient(180deg, #f0f0f0 0%, #ddd 100%); }
.ebay-btn img { height: 16px; width: auto; }
