html {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.title {
  text-align: center;
}

.collected-count {
  color: gray;
  text-align: center;
}

.container {
  max-width: 800px;
  margin: auto;
  padding: 8px;
  flex: 1;
  box-sizing: border-box;
  width: 100%;
}

.filter-menu {
  padding: 10px;
  border: 5px solid #ccc;
}

.filter-menu-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.filter-title {
  font-weight: bold;
  margin-bottom: 10px;
}

.filters-section {
  margin-bottom: 10px;
}

.section-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.filters label {
  margin-right: 10px;
}

.tabs {
  display: flex;
  margin-top: 10px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-bottom: none;
  flex: 1;
  text-align: center;
  border-radius: 10px 10px 0 0;
  background-color: #e0e0e0;
  transition: background 0.2s, box-shadow 0.2s, border 0.2s;
  font-weight: normal;
  box-shadow: none;
  color: #000;
}

.tab.active {
  background-color: #c8c8c8;
  font-weight: bold;
  box-shadow: inset 0px -3px 0px 0px #4a90e2;
  text-shadow: 0 1px 2px rgba(74, 144, 226, 0.12);
  color: #000;
}

.dark-mode .tab {
  background-color: #080909;
  color: #ccc;
}

.dark-mode .tab.active {
  background-color: #0f1112;
  color: #fff;
  font-weight: bold;
  box-shadow: inset 0px -3px 0px 0px #3a6ea5;
}

.tab-content {
  display: none;
  border: 1px solid #ccc;
  border-top: none;
}

.tab-content.active {
  display: block;
}

.weapon-info {
  display: flex;
  flex-direction: column;
}

.weapon-value {
  font-size: 0.8em;
  color: rgb(168, 160, 149);
  margin-top: 4px;
}

button.accordion {
  background-color: #e0e0e0;
  height: 40px;
  color: #444;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  text-align: left;
  font-size: 18px;
  transition: background-color 0.4s ease;
  border-radius: 5px;
  margin-bottom: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #CCC;
  border-left: none;
  border-right: none;
}

.dark-mode button.accordion {
  background-color: #0d0e0f;
  color: white;
  border: 1px solid #555;
  border-left: none;
  border-right: none;
}

.accordion.active,
.accordion:hover {
  background-color: #c8c8c8;
}

.dark-mode .accordion.active,
.dark-mode .accordion:hover {
  background-color: #1a1c1e;
}

.panel {
  padding: 0 6px;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  border-radius: 5px;
}

.dark-mode .panel {
  background-color: #1B1A1B;
}

.weapon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 10px;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  transition: background-color 0.5s ease;
  position: relative;
}

.dark-mode .weapon {
  background-color: #2f3335;
  border-bottom-color: rgb(58, 62, 65)
}

.collected.weapon {
  background-color: #a5d6a7;
}

.dark-mode .collected.weapon {
  background-color: #2e7d32;
}

.reset-menu-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.reset-menu {
  padding: 20px;
  border: 5px solid #f44;
  border-radius: 5px;
}

.reset-menu-buttons {
  display: flex;
  justify-content: space-evenly;
  padding: 30px 0 35px 0;
}

.reset-menu .section-title {
  text-align: center;
}

.reset-menu button {
  width: 160px;
  height: 80px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 10px;
}

.location-name {
  font-weight: bold;
}

.weapon-name {
  margin-right: 10px;
  flex-grow: 1;
  min-width: 25%;
  font-weight: bold;
}

.description {
  font-size: 0.8em;
  color: #666;
  text-align: right;
  flex-grow: 1;
  max-width: 60%;
}

.dark-mode .description {
  color: #CCC
}

.rarity-rectangle-weapon {
  width: 5px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 0 3px 3px 0;
}

.rarity-rectangle-weapon.right {
  right: 0;
  left: inherit;
  border-radius: 3px 0 0 3px;
}

.common {
  background-color: #306821;
}

.rare {
  background-color: #30489b;
}

.epic {
  background-color: #70166d;
}

.legendary {
  background-color: #f17e05;
}

.tool {
  background-color: darkgrey;
}

.dark-mode .common,
.dark-mode .rare,
.dark-mode .epic {
  filter: brightness(130%);
}


.rarity-indicator {
  display: flex;
  gap: 5px;
  margin-left: 10px;
}

.rarity-rectangle-location {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  border: 1px outset black;
}

.dark-mode .rarity-rectangle-location {
  border: 1px outset white;
}

#locations {
  padding: 1px 0;
}

.rarity-count {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.button-container button {
  width: 100px;
  height: 30px;
}

button {
  border-radius: 5px;
  cursor: pointer;
  background: #eee;
  border: 1px solid #ccc;
  color: black;
}

.dark-mode button {
  background: #444;
  border: 1px solid #222;
  color: white;
}

.button-container .reset-btn,
.reset-menu-buttons button {
  background: #f44;
  border: 1px solid #a44;
  color: white;
}

.done-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 20px;
}



.subword {
  display: inline-block;
}

#collected-count {
  text-align: center;
  min-width: 120px;
}

.progress-container {
  text-align: center;
  min-width: 120px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: #ddd;
  border-radius: 2px;
  margin: 3px 0;
  overflow: visible;
}

.dark-mode .progress-bar {
  background-color: #444;
}

.progress-fill {
  height: 100%;
  background: #e74c3c;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  width: 0%;
}

.progress-fill.complete {
  background: linear-gradient(90deg, #1a7a42, #27ae60, #2ecc71, #58d68d);
  box-shadow: 0 0 4px rgba(46, 204, 113, 0.6), 0 0 12px rgba(46, 204, 113, 0.3);
}

.history-separator {
  border: 0;
  border-top: 2px solid #d0d0d0;
  margin: 24px 0;
  /* was 10px, now 15px for extra 5px buffer below */
  max-width: 800px;
}

.collection-history-container {
  max-width: 800px;
  margin: auto;
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.collection-history-title {
  font-size: 1.08em;
  margin-bottom: 6px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-align: center;
  /* center the title */
}

.dark-mode .collection-history-title {
  color: #ccc;
}

.collection-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* Add to ensure no overflow */
  width: 100%;
  box-sizing: border-box;
}

.collection-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 1em;
  background: #fff;
  color: #333;
  border-bottom: 1px solid #d8d8e0;
}

.dark-mode .collection-history-list li {
  background: #23272a;
  color: #eee;
  border-bottom: 1px solid #444;
}

.history-item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-right: 16px;
}

.collection-time {
  color: #888;
  font-size: 0.9em;
  margin-top: 2px;
}

.dark-mode .collection-time {
  color: #aaa;
}

.collection-history-list button {
  font-size: 0.95em;
  background: #e0e4f0;
  color: #444;
  border: 1px solid #b0b6c8;
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 12px;
}

.dark-mode .collection-history-list button {
  background: #444b5a;
  color: #eee;
  border: 1px solid #666c80;
}

.collection-history-empty {
  color: #999;
  font-style: italic;
  text-align: center;
  width: 100%;
  padding: 20px 0;
  font-size: 1em;
  background: transparent;
  margin: 0 auto;
  box-sizing: border-box;
}

.dark-mode .collection-history-empty {
  color: #aaa;
}

.reset-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}

.reset-link:hover {
  text-decoration: underline;
}

.dark-mode .reset-link {
  color: inherit;
}
.footer {
  text-align: center;
  padding: 30px 20px 20px 20px;
  margin-top: 40px;
  border-top: 2px solid #d0d0d0;
  font-size: 0.85em;
  color: #666;
  background-color: #f9f9f9;
}

.footer a {
  color: #aaa;
  text-decoration: none;
}

.footer a:hover {
  color: #666;
  text-decoration: underline;
}

.dark-mode .footer {
  color: #999;
  border-top-color: #444;
  background-color: #1a1a1a;
}

.dark-mode .footer a {
  color: #666;
}

.dark-mode .footer a:hover {
  color: #999;
}
