* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  background-color: #0a1c1c; /* deep teal background */
  color: #f5f7f5;
  padding: 20px;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-top: 20px;
}

.count {
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-align: center;
  color: #a5e1d2;
  text-decoration: none;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #cfffea;
}

p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #a5e1d2;
}

a {
  color: #9fffcb;
  text-decoration: underline;
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  max-width: 500px;
  width: 100%;
  gap: 10px;
}

#username {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #203d3d;
  background-color: #081818;
  color: #cfffea;
  font-size: 16px;
}

#username:focus {
  outline: none;
  border-color: #9fffcb;
  box-shadow: 0 0 8px #9fffcb40;
}

#search-btn {
  padding: 12px 24px;
  background-color: #cfffea;
  color: #0f2c2c;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.2s;
}

#search-btn:hover {
  background-color: #a5e1d2;
  transform: translateY(-2px);
}

#search-btn:disabled {
  background-color: #496b6b;
  cursor: not-allowed;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(207, 255, 234, 0.3);
  border-radius: 50%;
  border-top-color: #9fffcb;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  background-color: #5b1a1a;
  color: #ffdcdc;
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background-color: #081818;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  border: 1px solid #203d3d;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px #9fffcb40;
  background-color: #102828;
}

.summary-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #a5e1d2;
}

.summary-card .count {
  font-size: 2rem;
  font-weight: 700;
}

.summary-card.easy .count {
  color: #9fffcb;
}

.summary-card.medium .count {
  color: #cfffea;
}

.summary-card.hard .count {
  color: #a5e1d2;
}

.summary-card.extreme .count {
  color: #ff6b6b;
}

.badge-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}

@media (min-width: 1600px) {
  .badge-sections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.badge-section {
  background-color: #081818;
  border-radius: 8px;
  overflow: hidden;
  height: fit-content;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  border: 1px solid #203d3d;
}

.section-header {
  background-color: #102828;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #cfffea;
}
@media (max-width: 1200px) {
  .badge-sections-grid {
    grid-template-columns: 1fr;
  }
  .badge-section {
    max-height: 400px;
  }
}

.section-count {
  font-size: 1rem;
  font-weight: 500;
  color: #a5e1d2;
}

.badge-table-container {
  overflow-y: auto;
  flex-grow: 1;
}

.badge-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #0f2c2c;
  color: #f5f7f5;
}

.badge-table th {
  background-color: #102828;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  color: #72b891;
  position: sticky;
  top: 0;
}

.badge-table td {
  padding: 10px 12px;
  border-top: 1px solid #203d3d;
  font-size: 0.9rem;
}

.badge-table tr:nth-child(even) {
  background-color: #0d2424;
}

.badge-table tr.owned {
  background-color: #193f3f;
  font-weight: 500;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-owned {
  background-color: #00ff73;
  color: #0f2c2c;
}

.status-missing {
  background-color: #496b6b;
  color: #cfffea;
}

.hidden {
  display: none;
}

.section-header::after {
  content: "−";
  font-weight: bold;
  color: #9fffcb;
}

.badge-section.collapsed .badge-table-container {
  display: none;
}

.badge-section.collapsed .section-header::after {
  content: "+";
}
