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

body {
  font-family: sans-serif;
  background: #1a1a1a;
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.banner img {
  height: 80px;
  width: auto;
  border-radius: 16px;
  border: 2px solid #e8572a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.banner img.flipped {
  transform: scaleX(-1);
}

h1 {
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 700px;
}

.control-row {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

.list-filter {
  width: 100%;
  max-width: 700px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 16px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.list-filter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.5rem;
}

.list-checkboxes {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.list-checkboxes label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.list-checkboxes input[type="checkbox"] {
  accent-color: #e8572a;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

button {
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: opacity 0.15s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

button:hover {
  opacity: 0.85;
}

#btn-shuffle {
  background: #e8572a;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.7rem 2rem;
}

#btn-sync {
  background: #444;
  color: #ccc;
}

#btn-reset {
  background: #333;
  color: #888;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  font-weight: normal;
}

#picked {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

#picked img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

#picked .record-artist {
  font-size: 1.3rem;
  font-weight: bold;
}

#picked .record-title {
  font-size: 1.1rem;
  color: #aaa;
}

#btn-mark-played {
  background: #2a2a2a;
  color: #aaa;
  border: 1px solid #3a3a3a;
  font-size: 0.9rem;
  font-weight: normal;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#status {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#table-toggle {
  background: none;
  border: none;
  color: #555;
  font-size: 0.8rem;
  font-weight: normal;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 700px;
}

#table-toggle:hover {
  color: #888;
}

#table-toggle .chevron {
  display: inline-block;
  transition: transform 0.3s ease;
  font-style: normal;
}

#table-toggle.collapsed .chevron {
  transform: rotate(-90deg);
}

.table-wrap {
  width: 100%;
  max-width: 700px;
  overflow: hidden;
  max-height: 500000px;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.table-wrap.collapsed {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.2s ease;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #2e2e2e;
}

th {
  color: #888;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.75rem;
}

td a {
  text-decoration: none;
}

tr:hover td {
  background: #222;
}

tr.played td:not(:last-child) {
  opacity: 0.35;
}

.btn-toggle-played {
  background: none;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  box-shadow: none;
  color: #666;
  font-size: 0.75rem;
  font-weight: normal;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-toggle-played:hover {
  border-color: #666;
  color: #aaa;
  opacity: 1;
}

tr.played .btn-toggle-played {
  color: #e8572a;
  border-color: #e8572a55;
}
