body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1f1f1f;
  color: white;
}

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.app-header {
  height: 60px;
  background-color: #2a2a2a;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-sizing: border-box;
  border-bottom: 1px solid #333;
}

.app-header .header-icon {
  width: 48px;
  height: 48px;
  margin-right: 0.75rem;
}

.app-icon {
  flex: 0 0 200px;
}

.app-header h1 {
  font-size: 1.25rem;
  margin: 0;
  color: white;
}

.search-results {
  position: fixed;
  display: flex;
  flex-direction: column;
  top: 60px;
  left: 220px;
  z-index: 10;
  background-color: #494949;
  max-height: 230px;
  width: 250px; 
  overflow-y: auto;
}

.search-result:hover, .search-result.highlighted {
  background-color: #595959;
}

button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

button:disabled {
  color: #999;
  cursor: default;
}

.sidebar-toggle {
  background: none;
  margin-right: 10px;
  border: none;
  color: white;
  font-size: 1.5rem;
  display: none;
  cursor: pointer;
}

.app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 60px);
}

.sidebar {
  width: 200px;
  background-color: #2a2a2a;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.sidebar a {
  color: white;
  text-decoration: none;
  display: block;
  width: calc(100% - 28px);
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.navgroup.active {
  background-color: #1f1f1f;
  border-left: 4px solid var(--accent-color);
}

.navgroup.active a {
  padding-left: calc(1rem - 4px);
}

.navgroup.active a.active {
  color: var(--accent-color);
  padding-left: calc(1rem - 4px);
}

.navgroup.active a.subnav {
  padding-left: 35px;
  width: calc(100% - 48px);
}

.navgroup:not(.active) a.subnav {
  display: none;
}

.sidebar a:hover {
  background-color: #333;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  background-color: #202020;
}

.card {
  text-decoration: none;
  color: inherit;
  width: 240px;
  background-color: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s;
}

.card img {
  width: 100%;
  height: 135px; /* 240 * 9 / 16 = 135 */
  object-fit: cover;
}

.hover-blue:hover i {
  color: cornflowerblue;
}

.hover-danger:hover i {
  color: var(--danger-color);
}

.playlistDetails-recentUploads {
  overflow: auto;
}

th, td {
  text-align: left;
  padding: 8px;
}

td.fixed {
  white-space: nowrap;
}

td.expand {
  width: 100%;
}

tbody td {
  font-size: 14px;
  border-top: 1px solid gray;
}

tbody a {
  text-decoration: none;
}

.setting {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.setting input,
.setting textarea,
.setting select {
  width: 100%;
  background-color: #333;
  border-radius: 4px;
  border: 1px solid white;
  color: white;
  max-width: 600px;
  padding: 8px;
  margin-top: 6px;
}

.setting label {
  margin-top: 6px;
}

div.pairedInput>input:nth-child(1) {
  border-radius: 4px 0px 0px 4px;
  margin-top: 0px;
}

div.pairedInput>input:nth-child(2) {
  border-radius: 0px 4px 4px 0px;
  margin-top: 0px;
}

.container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ======== Custom checkbox ======== */
.container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  border-radius: 2px;
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
}

.container:hover input ~ .checkmark {
  background-color: #ccc;
}

.container input:checked ~ .checkmark {
  background-color: var(--accent-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.container input:checked ~ .checkmark:after {
  display: block;
}

.container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}
/* ================================= */

@media (max-width: 768px) {
  .app-icon {
    flex: 0 0 60px;
  }

  .search-results {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 60px;
    left: 130px;
    z-index: 10;
    background-color: #494949;
    max-height: 230px;
    width: 250px; 
    overflow-y: auto;
  }

  .card {
    width: 170px;
  }

  .card img {
    height: 100px;
  }

  .sidebar {
    position: absolute;
    left: 0;
    height: calc(100vh - 60px);
    transform: translateX(-100%);
    z-index: 1000;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: block;
  }

  .app-container {
    position: relative;
  }

  .playlistDetails-poster {
    display: none;
  }

  .playlistDetails-recentUploads {
    overflow: visible; /* This switches the scroll from just the "recent uploads" list to almost the whole page */
  }

  .small-padding-mobile {
    padding: 5px !important; /* Using !important to allow inline style to define the padding, but might want to avoid */
  }

  .flex-column-mobile {
    flex-direction: column;
  }

  .setting {
    align-items: start;
    gap: 0px;
    margin-bottom: 30px;
  }

  .setting input {
    width: calc(100% - 18px);
  }
}
