/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #111;
  color: #ddd;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #ccc;
  text-decoration: none;
}

a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Header */
header {
  background: #0a0a0a;
  border-bottom: 1px solid #333;
  padding: 20px 0;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

h1 {
  font-size: 28px;
  font-weight: 300;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tagline {
  color: #888;
  font-size: 13px;
  margin-bottom: 16px;
}

nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}

nav a {
  color: #888;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover {
  color: #fff;
  text-decoration: none;
}

nav a.active {
  color: #fff;
  border-bottom-color: #fff;
}

/* Main */
main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 20px;
  margin-bottom: 16px;
  color: #888;
  font-size: 12px;
}

.meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Currency toggle — applies to the entire table, independent of print search */
.currency-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  max-width: 100%;
}

.currency-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.currency-pill {
  padding: 6px 10px;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 999px;
  color: #aaa;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1.2;
}

.currency-pill:hover {
  color: #fff;
  border-color: #666;
}

.currency-pill.is-active {
  color: #0a0a0a;
  background: #7ab8f5;
  border-color: #7ab8f5;
  font-weight: 600;
}

.fx-note {
  color: #666;
  font-size: 11px;
  white-space: nowrap;
}

/* Print name filter (search only) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
}

.filter-label {
  color: #999;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  flex-shrink: 0;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.filter-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  background: #111;
  border: 1px solid #444;
  border-radius: 4px;
  color: #eee;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-input::placeholder {
  color: #666;
}

.filter-input:focus {
  border-color: #7ab8f5;
  box-shadow: 0 0 0 2px rgba(122, 184, 245, 0.15);
}

.filter-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.filter-clear {
  flex-shrink: 0;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 4px;
  color: #aaa;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.filter-clear:hover {
  color: #fff;
  border-color: #666;
  background: #222;
}

.price-original {
  color: #777;
  font-size: 11px;
  font-weight: 400;
  margin-left: 2px;
}

.price-realised .price-original {
  color: #6a8a6a;
}

/* Table */
.auction-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
}

.auction-table thead {
  background: #222;
}

.auction-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  font-weight: 600;
  border-bottom: 1px solid #333;
}

.auction-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #282828;
  vertical-align: middle;
  font-size: 13px;
  color: #ccc;
}

.auction-table tbody tr:hover {
  background: #222;
}

.auction-table tbody tr:last-child td {
  border-bottom: none;
}

.auction-table td a {
  color: #7ab8f5;
}

.auction-table td a:hover {
  color: #a8d4ff;
}

.price-realised {
  color: #9fd89f;
  font-weight: 600;
  white-space: nowrap;
}

.thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  background: #333;
}

.no-thumb {
  width: 60px;
  height: 60px;
  background: #282828;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 10px;
}

/* Month group header */
.month-header {
  background: #1a1a1a;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  border-bottom: 1px solid #333;
}

.month-header td {
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  background: #161616;
  font-weight: 600;
}

/* States */
.loading, .empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 15px;
}

/* Footer */
footer {
  border-top: 1px solid #222;
  padding: 20px;
  text-align: center;
  color: #555;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 20px;
  }

  .auction-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auction-table th,
  .auction-table td {
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .thumb {
    width: 40px;
    height: 40px;
  }

  .no-thumb {
    width: 40px;
    height: 40px;
  }

  .meta-bar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .currency-toggle {
    width: 100%;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    width: 100%;
  }

  .filter-input {
    max-width: none;
  }

  .fx-note {
    white-space: normal;
  }
}
