:root {
  --Easy-color: #4caf50;
  --Medium-color: #ffc107;
  --Hard-color: #f44336;
  --Expert-color: #2196f3;
  --Nightmare-color: #b5b5b5;
}

html, body {
  height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: #323232;
  background: linear-gradient(to bottom,#292828 0%,#323232 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color: #f5f5f5;
  font-family: Verdana, sans-serif;
  line-height: 1.6;
}

#content {
  flex: 1 0 auto;
  margin: 0 5px;
}

#footer {
  background: linear-gradient(to right,#1c1b1b,#2d2c2c);
  color: #a5a4a4;
  width: 100%;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 0;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

#header {
  background: linear-gradient(to right,#2d2c2c,#3d3c3c);
  color: white;
  display: flex;
  align-items: center;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  flex-shrink: 0;
  margin-bottom: 15px;
}

#breadcrumb {
  display: inline-flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '\f105';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  padding: 0 5px;
  color: white;
}

#home-icon-link {
  color: #c0c0c0;
  margin-right: 10px;
}

#home-icon-link:hover {
  color: white;
}

#home-icon-link i {
  font-size: 20px;
}

.created_by {
  position: relative;
}

.footer_logo {
  width: 15px;
  height: 15px;
  margin: 0 3px;
  position: relative;
  top: 5px;
}

.not_affiliated {
  font-size: 10px;
  text-align: center;
}

.main_page {
  position: relative;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90%;
  min-height: calc(100svh - 70px);
  min-width: 100%;
}

.main_page::before {
  content: ' ';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  opacity: 0.05;
  background-image: url('/static/images/favicon.png');
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.main_page > * {
  position: relative;
  z-index: 1;
}

a {
  color: #9a9aff;
}

a:hover {
  color: #ffa500;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
}

p {
  margin-bottom: 1em;
}

.container {
  width: 80%;
  margin: auto;
  padding: 20px;
}

.item_container {
  display: flex;
  flex-wrap: wrap;
}

.item {
  width: 90px;
  height: 90px;
  background-color: #e3e3e3;
  margin: 2px;
  position: relative;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: box-shadow 0.1s ease, transform 0.1s ease, background-color 0.1s ease;
  cursor: default;
}

.item:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  cursor: pointer;
}

.item_img {
  width: 75px;
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%,-50%);
}

.item_amt {
  background: rgba(255,255,255,0.6);
  color: #333;
  font-weight: bold;
  font-size: 14px;
  text-align: right;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.item_amt span {
  margin-right: 3px;
}

.loot-table {
  border-collapse: collapse;
  background-color: #2a2a2a;
  color: #f5f5f5;
  margin-bottom: 20px;
  table-layout: fixed;
}

.loot-table th, .loot-table td {
  border-top: 2px solid #3f3f3f;
  border-right: 2px solid #3f3f3f;
  border-bottom: 2px solid #3f3f3f;
}

.loot-table th:first-child, .loot-table td:first-child {
  border-left: 2px solid #3f3f3f;
  border-bottom: 2px solid #3f3f3f;
}

.loot-header {
  background-color: #333;
  text-align: center;
  padding: 10px 15px;
  font-size: 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.loot-row:nth-child(odd) {
  background-color: #2f2f2f;
}

.loot-row:nth-child(even) {
  background-color: #2a2a2a;
}

.loot-row {
  transition: background-color 0.3s ease;
}

.loot-row:hover {
  background-color: #323232;
}

.loot-row td {
  width: 125px;
}

.loot-item, .loot-amount, .loot-edit {
  position: relative;
  padding: 8px 10px;
  text-align: center;
}

.loot-x {
  font-size: 11px;
}

.loot-priority span, .priority {
  font-size: 11px;
  color: #00c2ff;
  background-color: #222;
  padding: 5px;
  border-radius: 4px;
}

.filtered, .hide {
  display: none;
}

.item-name {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  font-weight: bold;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.loot-category {
  background-color: #413934;
  color: #ddd;
  position: sticky;
  top: 50px;
  z-index: 5;
  padding-left: 5px;
  font-size: 13px;
  font-weight: normal;
  text-transform: uppercase;
  border-top: 1px solid #555;
  border-bottom: 1px solid #555;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  margin-bottom: 1px;
  font-weight: bold;
}

.loot-category + .loot-category {
  border-top: none;
}

.loot-image {
  width: 60px;
  height: 60px;
  padding: 5px;
  background-color: #363636;
  border-radius: 4px;
  box-shadow: 0 2px 2px rgba(0,0,0,0.3);
}

.loot-amount {
  font-size: 16px;
  font-weight: bold;
}

.loot-previous-values {
  background-color: rgb(97, 0, 1);
  position: relative;
}

.loot-new-values {
  background-color: rgb(0, 97, 1);
  position: relative;
}

.diff-legend-container {
  display: inline-block;
}

.diff-legend {
  padding: 5px;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  position: relative;
}

.clear-amounts-btn {
  position: absolute;
  right: -7px;
  background: none;
  background-color: #d9534f !important;
  border: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  top: -5px;
  margin: 0px !important;
}

.input-label {
  font-size: 12px;
  color: #ccc;
}

.input-short {
  width: 75px;
  font-size: 16px;
  padding: 4px;
  margin: 0;
}

.priority-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
}

.priority-label {
  font-size: 12px;
  color: #ccc;
}

.action-button {
  display: block;
  text-align: center;
  padding: 4px 8px;
  margin: 5px 0px 0px;
  font-size: 14px;
  color: #fff;
  background: #5cb85c;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.save-button {
  background: #5cb85c;
}

.cancel-button {
  background: #f0ad4e;
}

.delete-button {
  background: #d9534f;
}

.delete-button.confirm {
  background: #a94432;
}

.edit-button {
  background-color: #4caf50;
}

.action-button:hover {
  opacity: 0.85;
}

.add-new-item-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

.drawer-open {
  overflow: hidden;
}

.drawer-open .add-new-item-container {
  display: none;
}

.add-new-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #4caf50;
  color: white;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  font-size: 24px;
  cursor: pointer;
}

.add-new-item:hover {
  background-color: #3e8e41;
}

.add-new-item:focus {
  outline: none;
}

.item-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 75%;
  background-color: #323232;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 100;
  overflow-y: auto;
  transition: top 0.3s;
}

.item-drawer.open {
  display: block;
  top: 0;
}

.close-drawer-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}

.drawer-header {
  padding: 10px;
  border-bottom: 1px solid #ccc;
  text-align: center;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;
  padding: 10px;
  overflow-y: hidden;
}

.category-empty {
  display: none;
}

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

.item-drawer.open + .dark-overlay {
  display: block;
}

.drawer-content {
  padding: 10px;
}

.drawer-item {
  position: relative;
  display: inline-block;
  width: 90px;
  text-align: center;
  vertical-align: top;
  margin: 10px 2px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.drawer-item:not(.already-added):hover {
  transform: scale(1.05);
}

.drawer-item img {
  width: 50px;
  height: 50px;
  margin-bottom: 4px;
  padding: 5px;
  background-color: #363636;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s;
}

.drawer-item:not(.already-added):hover img {
  background-color: #404040;
}

.drawer-item span {
  width: 100%;
  position: absolute;
  bottom: -20px;
  font-size: 11px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  font-weight: bold;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: wrap;
  height: 40px;
  line-height: 11px;
}

.drawer-item.dlc-item, .drawer-item.already-added {
  opacity: 0.3;
  pointer-events: none;
  position: relative;
}

.drawer-item.dlc-item:after, .drawer-item.already-added:after {
  position: absolute;
  top: 0;
  left: 0;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
  transform: rotate(-45deg);
  transform-origin: center;
  pointer-events: none;
  padding: 0 3px;
}

.drawer-item.dlc-item:after {
  content: 'DLC';
  background-color: rgba(255,0,0,0.7);
}

.drawer-item.already-added:after {
  content: 'Added';
  background-color: rgba(0,0,0,0.7);
}


.item-count {
  font-size: 12px;
}

.Easy-color {
  color: var(--Easy-color);
}

.Medium-color {
  color: var(--Medium-color);
}

.Hard-color {
  color: var(--Hard-color);
}

.Expert-color {
  color: var(--Expert-color);
}

.Nightmare-color {
  color: var(--Nightmare-color);
}

.easy-btn {
  color: var(--Easy-color) !important;
}

.medium-btn {
  color: var(--Medium-color) !important;
}

.hard-btn {
  color: var(--Hard-color) !important;
}

.expert-btn {
  color: var(--Expert-color) !important;
}

.nightmare-btn {
  color: var(--Nightmare-color) !important;
}

.loot-description {
  display: flex;
  gap: 10px;
}

.difficulty-num-items {
  padding: 5px;
  display: inline-block;
  background-color: #fff;
}

.break {
  flex-basis: 100%;
  height: 0;
}

.filter-label {
  display: inline-block;
  margin: 5px 0;
  background-color: #2a2a2a;
  padding: 2px 5px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.filter-section {
  border-radius: 5px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.filter-options {
  margin: 5px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-option {
  color: #f5f5f5;
  border-color: #737373;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  background-color: transparent;
}

.btn-option.active {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-option:not(.active):hover {
  background-color: #222;
  color: white;
}

#exampleDrawerContent {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.example-item {
  position: relative;
  padding: 5px;
}

.example-item .loot-amount {
  bottom: -7px;
  position: absolute;
  right: -8px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

#exampleDrawer .drawer-header {
  font-size: 20px;
}

.example-refresh {
  margin-left: 10px;
  font-size: 18px;
}

.example-loading {
  font-size: 25px;
  color: #999;
  text-align: center;
  margin-top: 25px;
}

.unlock-section {
  display: inline-block;
  background-color: #404c57;
  padding: 10px;
  margin-bottom: 20px;
}

#unlockWord {
  font-size: 18px;
}

#loot-table-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}

.muted {
  color: #6c757d;
}

#loot-table-welcome {
  font-size: 14px;
  margin-bottom: 4px;
}

#loot-table-name {
  font-size: 30px;
  font-weight: bold;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

#loot-table-name-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

#loot-table-name-links a {
  display: flex;
  align-items: center;
  justify-content: center;
}

#loot-table-name-links img {
  opacity: 0.8;
  width: 24px;
  height: 24px;
}

#loot-table-name-links a:hover img {
  opacity: 1;
  transform: scale(1.2);
  transition: transform 0.2s, opacity 0.2s;
}

section {
  margin-left: 10px;
  margin-bottom: 40px;
}

.loot-examples {
  margin-top: 10px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-weight: bold;
}

.section-title {
  margin-left: 5px;
  font-size: 20px;
  font-weight: bold;
  color: #00c2ff;
  margin-bottom: 12px;
  padding-bottom: 5px;
  display: flex;
  align-items: center;
}

.section-title i {
  margin-right: 12px;
  font-size: 18px;
  color: inherit;
}

.loot-table #content {
  font-size: 14px;
}

@media only screen and (max-width: 600px), only screen and (max-height: 600px) and (orientation: landscape) {
  #loot-table-name {
    font-size: 20px;
  }

  #exampleDrawer .drawer-header {
    font-size: 12px;
  }

  .diff-legend {
    font-size: 12px;
  }

  .loot-pri-desc {
    font-size: 12px;
  }

  .example-refresh {
    font-size: 10px;
  }

  .loot-image {
    width: 30px;
    height: 30px;
  }

  .loot-header th {
    font-size: 8px;
  }

  .item-count {
    font-size: 8px;
  }

  .loot-amount {
    font-size: 10px;
  }

  .loot-priority span, .priority {
    font-size: 8px;
  }

  .item-name {
    font-size: 8px;
  }

  .loot-category {
    font-size: 8px;
    top: 25px;
  }

  .section-title {
    font-size: 16px;
  }
}