html,
body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Rubik", sans-serif;
  background-color: #f0f4f8;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
}

#loading-span {
  display: block;
  text-align: left;
  font-size: 1.2em;
  margin-left: 10px;
  color: #4a5568;
}

#search-input {
  display: block;
  width: calc(100% - 22px);
  padding: 10px;
  margin-bottom: 20px;
  margin-left: 10px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  max-width: 300px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#controls-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: 10px;
  margin-bottom: 20px;
}

#controls-container > div {
  display: flex;
  align-items: center;
}

#sort-by-size {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 30px 8px 10px;
  font-size: 0.95em;
  color: #333;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-left: 5px;
}

#sort-by-size:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#filter-has-noise {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.2em;
  height: 1.2em;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-right: 8px;
  vertical-align: middle;
}

#filter-has-noise:checked {
  background-color: #007bff;
  border-color: #007bff;
}

#filter-has-noise:checked::after {
  content: "";
  position: absolute;
  left: 0.35em;
  top: 0.15em;
  width: 0.3em;
  height: 0.6em;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#controls-container label {
  font-size: 0.95em;
  color: #4a5568;
  cursor: pointer;
  vertical-align: middle;
}

#clickpack-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 10px 10px;
}

#clickpack-tbl td {
  background-color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#clickpack-tbl td:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.clickpack {
  font-size: 1.1em;
  font-weight: 600;
  color: #2d3748;
}

.tag {
  background-color: #edf2f7;
  color: #4a5568;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  margin-left: 10px;
  cursor: pointer;
}

.tippy-content {
  white-space: pre-line;
}

.button-3,
.button-4 {
  appearance: none;
  background-color: #2ea44f;
  border: 1px solid rgba(27, 31, 35, 0.15);
  border-radius: 6px;
  box-shadow: rgba(27, 31, 35, 0.1) 0 1px 0;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 6px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
  transition: all 0.2s ease;
  margin-right: 4px;
}

.button-3:hover,
.button-4:hover {
  background-color: #2c974b;
}

.button-4 {
  background-color: #0366d6;
}

.button-4:hover {
  background-color: #0353b4;
}

#popup {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  z-index: 1000;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  width: 90%;
  max-width: 600px;
}

#closePopup {
  background-color: #e53e3e;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: background-color 0.3s ease;
}

#closePopup:hover {
  background-color: #c53030;
}

#fileList {
  list-style-type: none;
  padding: 0;
  margin-top: 40px;
}

.folder-item {
  list-style-type: none;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #edf2f7;
  background-color: #f9fafb;
  border-radius: 4px;
  margin-bottom: 5px;
}

.folder-item:hover {
  background-color: #f3f4f6;
}

.folder-name {
  font-weight: bold;
  color: #374151;
}

.folder-item ul {
  list-style-type: none;
  padding-left: 20px;
  margin-top: 5px;
}

.folder-item.open > .folder-name::before {
  content: "▼ ";
  margin-right: 5px;
}

.folder-item:not(.open) > .folder-name::before {
  margin-right: 5px;
}

.file-item {
  padding-left: 10px; /* Indent files slightly less than folders */
}
.audioListItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #edf2f7;
}

.audioListItem button {
  background-color: #4299e1;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.audioListItem button:hover {
  background-color: #3182ce;
}

#audioPlayer {
  display: none;
}

#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.listItemButton {
  margin-left: 6px;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  #clickpack-tbl td {
    padding: 10px;
  }

  .button-3,
  .button-4 {
    padding: 5px 10px;
    font-size: 12px;
    display: block;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .button-3 {
    margin-bottom: 4px;
  }
}
