/* ==========================================
   SIDEBAR LAYOUT
========================================== */
#map-menu {
  display:flex;
  flex-direction:column;
  height:100vh;
  width:400px;
  background:rgba(20,20,20,0.75);
  backdrop-filter:blur(10px);
  color:white;
  overflow:visible;
  position:relative;
  transition: transform .28s ease;
  z-index: 2000;
}

.sidebar-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #555 #222;
}

.sidebar-inner::-webkit-scrollbar {
  width: 6px;
}

.sidebar-inner::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 999px;
}

.sidebar-inner::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-top {
  padding: 20px;
  padding-bottom: 5px;
}

.sidebar-scroll {
  padding: 0 20px 20px;
  scrollbar-width: thin;
  scrollbar-color: #555 #222;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 3px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-footer {
  font-size: 11px;
  color: #888;
  background-color: #111;
  padding: 12px 20px 70px;
  line-height: 1.4;
  text-align: center;
  border-top: 1px solid #222;
}

.sidebar-logo {
  display: block;
  max-width: 160px;
  margin: 0 auto 6px auto;
}

.category-wrapper {
  min-height: 0;
  padding: 10px 16px 14px;
}

/* ========================================
   Sidebar Toggle Handle
======================================== */

.sidebar-toggle-btn {

  position: absolute;
  top: 120px;
  right: -18px;

  width: 30px;
  height: 46px;
  padding: 0;

  border-radius: 999px;

  background: linear-gradient(135deg,#c43ad6,#7a2cff);

  border: 1px solid rgba(255,255,255,0.15);

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

  color: white;
  font-size: 14px;

  cursor: pointer;

  box-shadow:
    0 8px 18px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.25);

  transition:
    transform .25s ease,
    background .25s ease,
    box-shadow .25s ease;

  z-index: 10000;
}

/* Hover */

.sidebar-toggle-btn:hover {
  transform: scale(1.05);
}

/* Icon */

.sidebar-toggle-btn i {
  transition: transform .25s ease;
  pointer-events: none;
}

/* Rotation beim Einklappen */

#map-menu.collapsed {
  transform: translateX(-360px);
}

#map-menu.collapsed .sidebar-logo,
#map-menu.collapsed .controls,
#map-menu.collapsed #map-switcher,
#map-menu.collapsed .map-view-section,
#map-menu.collapsed .global-search,
#map-menu.collapsed .sidebar-scroll,
#map-menu.collapsed .sidebar-footer,
#map-menu.collapsed .sidebar-legal,
#map-menu.collapsed #map-content-links,
#map-menu.collapsed .menu-ad-slot {
  display: none !important;
}

/* ==========================================
   SIDEBAR SECTIONS
========================================== */

.sidebar-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-section:last-child {
  border-bottom: none;
}

/* ==========================================
   SIDEBAR CONTROLS / SEARCH
========================================== */
.controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.controls button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.controls button::before {
  display: inline-block;
  margin-right: 6px;
  font-size: 13px;
  line-height: 1;
  opacity: 0.9;
}

.controls button:hover {
  background: rgba(255,255,255,0.14);
}

#show-all-btn::before {
  content: "👁";
}

#hide-all-btn::before {
  content: "🚫";
}

.controls button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(24, 31, 46, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.filter-search {
  position: relative;
  margin-top: 12px;
}

.filter-search::before {
  content: "🔍";
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #aaa;
}

#category-search {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: #2c2c2c;
  color: white;
  border: none;
  border-radius: 8px;
}

.global-search {
  position: relative;
  margin: 18px 16px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 3000;
}

.global-search::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 14px;
  top: calc(14px + 24px);
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

#search-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

#search-input:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(181, 56, 183, 0.30);
}

#search-input:focus {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(181, 56, 183, 0.65);
  box-shadow: 0 0 0 3px rgba(181, 56, 183, 0.14);
}

#search-results,
.search-results-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  box-sizing: border-box;
  z-index: 1200;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 23, 34, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.search-result-item {
  padding: 11px 14px;
  color: #f2f2f2;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.search-result-item:hover {
  background: rgba(181, 56, 183, 0.16);
}

.no-result {
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.60);
  font-size: 14px;
}

/* ==========================================
   SIDEBAR CATEGORIES / FILTERS
========================================== */
.category {
  margin-bottom: 24px;
}

.category h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
  font-weight: bold;
  color: #ffffff;
}

.category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category li {
  font-size: 14px;
}

.category ul li {
  margin-bottom: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.category ul li label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.category ul li input[type="checkbox"] {
  accent-color: #b538b7;
  width: 16px;
  height: 16px;
}

.label-text {
  color: #ddd;
  white-space: normal !important;
  font-size: 14px;
}

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

.category-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 0 14px 0 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 3px;
  background: #b538b7;
}

.category-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(181, 56, 183, 0.45);
  transform: translateY(-1px);
}

.category-toggle-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.category-toggle-title i {
  margin-right: 8px;
  opacity: 0.9;
  font-size: 14px;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(181, 56, 183, 0.85);
  line-height: 1;
}

.toggle-switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: all 0.22s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.22s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #b538b7, #ff5dd6);
  border-color: rgba(243, 201, 74, 0.75);
  box-shadow: 0 0 0 2px rgba(243, 201, 74, 0.12);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(25px);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid rgba(243, 201, 74, 0.95);
  outline-offset: 2px;
}

.category-landscape::before {
  background: #6ad2ff;
}

.category-landscape .category-toggle-title i {
  color: #6ad2ff;
}

.category-trailer::before {
  background: #ff5dd6;
}

.category-trailer .category-toggle-title i {
  color: #ff5dd6;
}

.category-leak::before {
  background: #00b4ff;
}

.category-leak .category-toggle-title i {
  color: #00b4ff;
}

.category-screenshot::before {
  background: #f7c948;
}

.category-screenshot .category-toggle-title i {
  color: #f7c948;
}

/* ==========================================
   SIDEBAR MAP / LANGUAGE
========================================== */
#map-switcher,
#map-content-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

#map-switcher .lang-switch-desktop {
  grid-column: 1 / -1;
}

#map-switcher {
  margin-top: 6px;
  margin-bottom: 14px;
}

#map-content-links {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  margin-bottom: 20px;
  padding: 14px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.map-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 23, 34, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.map-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(24, 31, 46, 0.88);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.map-btn:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 3px rgba(181, 56, 183, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.map-btn.active {
  border-color: rgba(181, 56, 183, 0.45);
  background:
    linear-gradient(180deg, rgba(181, 56, 183, 0.22), rgba(255, 76, 145, 0.14)),
    rgba(20, 26, 38, 0.92);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(181, 56, 183, 0.16);
}

.map-btn.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lang-switch {
  display: flex;
  gap: 8px;
}

.lang-switch-desktop {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  grid-column: 1 / -1;
}

.lang-btn {
  background: rgba(17, 23, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(24, 31, 46, 0.88);
}

.lang-btn.active {
  border-color: rgba(181, 56, 183, 0.45);
  background:
    linear-gradient(180deg, rgba(181, 56, 183, 0.22), rgba(255, 76, 145, 0.14)),
    rgba(20, 26, 38, 0.92);
  color: #fff;
  box-shadow: 0 10px 28px rgba(181, 56, 183, 0.16);
}

@media (min-width: 769px) {
  .lang-switch-desktop {
    display: grid;
  }
}

/* ==========================================
   SIDEBAR MAP VIEW
========================================== */

.map-view-section {
  margin: 18px 16px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.map-view-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.map-view-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.map-toggle {
  flex-shrink: 0;
  transform: scale(0.9);
  transform-origin: right center;
}

.map-view-style {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.map-style-segment {
  display: flex;
  gap: 8px;
}

.map-style-option {
  flex: 1;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.map-style-option:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.map-style-option.active {
  background: rgba(181,56,183,0.9);
  border-color: rgba(255,255,255,0.16);
  color: #fff;
}

.map-view-style.is-disabled {
  opacity: 0.45;
}

.map-view-style.is-disabled .map-style-option {
  pointer-events: none;
}

.map-view-section .lang-switch-desktop {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ==========================================
   SIDEBAR FOOTER / LEGAL
========================================== */
.sidebar-legal {
  font-size: 9px;
  color: #bbb;
  text-align: center;
  margin-top: 24px;
  padding: 12px 10px 60px;
  border-top: 1px solid #333;
  line-height: 1.4;
}

.sidebar-legal p {
  margin: 6px 0;
}

.sidebar-legal a {
  color: #ece4ec;
  font-weight: 600;
  text-decoration: none;
}

.sidebar-legal a:hover {
  text-decoration: underline;
}

/* ==========================================
   SIDEBAR MOBILE
========================================== */
@media (max-width: 768px) {
  #map-menu {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(12px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 9999;
  }

  #map-menu.active {
    transform: translateX(0);
  }

  .sidebar-logo {
    display: none;
  }

  .category-toggle {
    min-height: 52px;
    padding: 0 12px;
  }

  .category-toggle-title {
    font-size: 15px;
  }

  .toggle-switch {
    width: 54px;
    height: 30px;
  }

  .toggle-slider::before {
    width: 22px;
    height: 22px;
  }

  .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
  }

  #map-switcher,
  #map-content-links,
  .lang-switch-desktop {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .map-btn {
    min-height: 46px;
    font-size: 13px;
    border-radius: 14px;
  }

  .lang-btn {
    min-height: 40px;
    border-radius: 12px;
  }

  #sidebar-toggle-desktop,
  .sidebar-toggle-btn {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .category ul li {
    font-size: 13px;
  }

  .label-text {
    font-size: 13px;
  }

  .category h3 {
    font-size: 15px;
  }

  .controls button {
    min-width: auto;
    font-size: 13px;
    padding: 5px 10px;
  }
}
