.settings {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: 200ms ease;
}

.settings[data-open='true'] {
  opacity: 1;
  backdrop-filter: blur(5px);
  pointer-events: all;
}

.box {
  width: 600px;
  height: 400px;
  padding: 15px;
  background: #111;
  border-radius: 5px;
  transition: transform 200ms ease;
  transform: scale(1.05);

  display: flex;
  flex-direction: column;
}

.settings[data-open='true'] .box {
  transform: scale(1);
}

.box > h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
}

.box h2 button {
  all: unset;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: 200ms ease;
}

.content {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  height: calc(100% - 33px);
}

.tabs {
  display: flex;
  flex-direction: column;
  width: 150px;
  gap: 2px;
  overflow-y: auto;
}

.tabs button {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 5px;
  transition: 200ms ease;
  cursor: pointer;
}

.tabs button:is(:hover, [data-active='true']) {
  background: #222;
}

.tab {
  flex: 1;
  overflow: hidden;
}

.tab > div {
  animation: appear 500ms ease;
  overflow-y: auto;
  max-height: 100%;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.logsTab {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.logsTab .logs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: monospace;
  user-select: text;
  background: #222;
  padding: 10px;
  border-radius: 5px;
  flex: 1;
  max-height: 288px; /* reasonable css crashout */
  overflow-y: auto;
}

.logsTab .controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.logsTab .controls .level {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logsTab .controls select {
  padding: 5px;
  font-size: 16px;
  border-radius: 5px;
  background: #222;
  color: #fff;
  border: 1px solid #333;
  transition: 200ms ease;
}

.logsTab .controls select:focus {
  outline: none;
  border: 1px solid #555;
}

.logsTab .controls .buttons {
  display: flex;
  gap: 8px;
}

.logsTab .controls .buttons button {
  display: flex;
  padding: 8px;
}

.aboutTab .app {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.aboutTab .app img {
  width: 80px;
}

.aboutTab .app .version {
  font-size: 14px;
  color: #aaa;
}

.credit {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.credit img {
  width: 48px;
  border-radius: 50%;
}

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

.credit .info a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.credit .info p {
  font-size: 14px;
  color: #aaa;
}

.toggleSetting {
  display: flex;
  justify-content: space-between;
}

.toggleSetting .description {
  font-size: 14px;
  color: #aaa;
}

.settingsTab {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inputWithSubmitSetting {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.inputWithSubmitSetting .description {
  font-size: 14px;
  color: #aaa;
}

.inputWithSubmitSetting .form {
  display: flex;
  gap: 10px;
}

.inputWithSubmitSetting .form input {
  flex: 1;
}

.error {
  color: #f00;
  animation: appear 500ms ease;
}

.success {
  color: #1ed760;
  animation: appear 500ms ease;
}

.selectSetting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.selectSetting .description {
  font-size: 14px;
  color: #aaa;
}

.selectSetting select {
  padding: 5px;
  font-size: 16px;
  border-radius: 5px;
  background: #222;
  color: #fff;
  border: 1px solid #333;
  transition: 200ms ease;
}

.selectSetting select:focus {
  outline: none;
  border: 1px solid #555;
}

.sliderSetting {
  display: flex;
  flex-direction: column;
  transition: 200ms ease;
}

.sliderSetting[data-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}

.sliderSetting .description {
  font-size: 14px;
  color: #aaa;
}

.sliderSetting input {
  flex: 1;
  padding: 5px;
  font-size: 16px;
  border-radius: 5px;
  background: #222;
  color: #fff;
  border: 1px solid #333;
  transition: 200ms ease;
}

.sliderSetting input:focus {
  outline: none;
  border: 1px solid #555;
}

.patches {
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: appear 500ms ease;
}

.patch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 5px;
  transition: 200ms ease;
}

.patch:hover {
  background: #222;
}

.patch h3 {
  font-size: 16px;
}

.patch p {
  font-size: 14px;
}

.patch > span {
  color: #1ed760;
}

.patch button {
  display: flex;
  padding: 8px;
}

.buttonSetting {
  display: flex;
  transition: 200ms ease;
  align-items: center;
}

.buttonSetting[data-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}

.buttonSetting .description {
  font-size: 14px;
  color: #aaa;
}

.buttonSetting button {
  display: flex;
  padding: 8px;
}

.screensaverSettings {
  display: flex;
  flex-direction: column;
}

.screensaverSettings .header {
  display: flex;
  align-items: center;
}

.screensaverSettings .description {
  font-size: 14px;
  color: #aaa;
}

.screensaverSettings .actions {
  display: flex;
  gap: 10px;
}

.screensaverSettings .actions button {
  display: flex;
  padding: 8px;
}

.screensaverSettings .status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background-color: rgba(30, 215, 96, 0.1);
  border-left: 3px solid #1ed760;
  border-radius: 4px;
  color: #1ed760;
  font-size: 14px;
  animation: appear 500ms ease;
}

.screensaverSettings .status[data-type='error'] {
  background-color: rgba(255, 0, 0, 0.1);
  border-left: 3px solid #ff4040;
  color: #ff6b6b;
}

.patches .status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgb(0, 100, 255, 0.1);
  border-left: 3px solid #0096ff;
  border-radius: 4px;
  color: #0096ff;
  font-size: 14px;
  animation: appear 500ms ease;
  margin-bottom: 10px;
}
