/* Controls section layout and spacing */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 18px;
  align-items: flex-end;
}
.controls label {
  display: flex;
  align-items: center;
  min-width: 220px;
  max-width: 260px;
  width: 260px;
  margin-top: 0;
  margin-bottom: 0;
  justify-content: space-between;
}
.controls label input[type="checkbox"] {
  margin-right: 8px;
}
@media (max-width: 900px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .controls label {
    width: auto;
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .controls label input[type="checkbox"] {
    margin-right: 8px;
  }
}
.controls label:not(:first-child) {
  margin-top: 10px;
}
.controls input[type="number"] {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  box-sizing: border-box;
}
#resetFilters {
  margin-top: 10px;
}
/* Forge Levels Tool Styles */
body {
  font-family: Arial, sans-serif;
  background: #f7f7fa;
  margin: 0;
  .forge-card {
    background: #fafaff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 10px 10px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 1em;
    position: relative;
    overflow: visible;
  }

  .copy-btn-container {
    position: absolute;
    top: 8px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 2;
  }

  .forge-card-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
}
  .copy-btn {
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.95em;
  }
  .copy-btn:hover {
    background: #357ab8;
  }
#resetFilters:hover {
  background: #e0e0e0;
}
#forgeTableContainer {
  margin-bottom: 18px;
}
.forge-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.forge-card {
  background: #fafaff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 10px 10px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 1em;
}
.forge-card .prob-bar {
  margin-top: 4px;
  min-width: 0;
  font-size: 0.98em;
}
.forge-card .prob-segment {
  font-size: 0.98em;
  min-width: 0;
  white-space: normal;
  padding: 2px 2px;
  text-align: left;
}
.forge-card .copy-btn {
  align-self: flex-end;
  margin-top: 4px;
}
.copy-btn {
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.95em;
}
.copy-btn:hover {
  background: #357ab8;
}
.prob-bar {
  display: flex;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2px;
}
.prob-segment {
  height: 100%;
  font-size: 0.9em;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
#scrollTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 100;
}
#scrollTop:hover {
  background: #357ab8;
}
@media (max-width: 900px) {
  .container {
    padding: 8px 1vw 16px 1vw;
    max-width: 100vw;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #forgeTableContainer {
    width: 100vw;
    margin-left: -2vw;
    margin-right: -2vw;
    overflow-x: unset;
  }
  #forgeTable {
    display: none;
  }
  .forge-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
  }
  .forge-card {
    background: #fafaff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 10px 10px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 1em;
  }
  .forge-card .prob-bar {
    margin-top: 4px;
    min-width: 0;
    font-size: 0.98em;
  }
  .forge-card .prob-segment {
    font-size: 0.98em;
    min-width: 0;
    white-space: normal;
    padding: 2px 2px;
    text-align: left;
  }
  .forge-card .copy-btn {
    align-self: flex-end;
    margin-top: 4px;
  }
}
