:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --bg-dark: #1a1a2e;
  --bg-card: #16213e;
  --text-light: #eee;
  --success-color: #27ae60;
  --warning-color: #f39c12;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #f0f0f0 !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  padding-top: 130px;
  display: flex;
  flex-direction: column;
}

#page-container {
  flex: 1;
}

body, h4, h5 {
  color: white;
}

input {
  color: white;
}

.search-input::placeholder {
  color: white;
}

#categoryMarkerName::placeholder {
  color: white;
}

.header {
  background: rgba(22, 33, 62, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--secondary-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-top {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

.header h1 {
  color: var(--secondary-color);
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  font-size: 1.8rem;
}

/* Animated Navigation Styles */
.navbar-mainbg {
  background-color: rgba(44, 62, 80, 0.5);
  padding: 0px;
}

.navbar-toggler {
  border: none;
  padding: 10px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

#navbarSupportedContent {
  overflow-y: clip;
  position: relative;
}

#navbarSupportedContent ul {
  padding: 0px;
  margin: 0px;
}

#navbarSupportedContent ul li a i {
  margin-right: 10px;
}

#navbarSupportedContent li {
  list-style-type: none;
  float: left;
}

#navbarSupportedContent ul li a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 15px;
  display: block;
  padding: 20px 20px;
  transition-duration: 0.6s;
  transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

#navbarSupportedContent > ul > li.active > a {
  color: var(--primary-color);
  background-color: transparent;
  transition: all 0.7s;
}

#navbarSupportedContent a:not(:only-child):after {
  content: "\f105";
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 14px;
  font-family: "Font Awesome 5 Free";
  display: inline-block;
  padding-right: 3px;
  vertical-align: middle;
  font-weight: 900;
  transition: 0.5s;
}

#navbarSupportedContent .active > a:not(:only-child):after {
  transform: rotate(90deg);
}

.hori-selector {
  display: inline-block;
  position: absolute;
  height: 100%;
  top: 0px;
  left: 0px;
  transition-duration: 0.6s;
  transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  background-color: #fff;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  margin-top: 10px;
}

.hori-selector .right,
.hori-selector .left {
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: #fff;
  bottom: 10px;
}

.hori-selector .right {
  right: -25px;
}

.hori-selector .left {
  left: -25px;
}

.hori-selector .right:before,
.hori-selector .left:before {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgb(33 47 70);
}

.hori-selector .right:before {
  bottom: 0;
  right: -25px;
}

.hori-selector .left:before {
  bottom: 0;
  left: -25px;
}

@media(min-width: 992px) {
  .navbar-expand-custom {
    -ms-flex-flow: row nowrap;
    flex-flow: row nowrap;
    -ms-flex-pack: start;
    justify-content: flex-start;
  }
  .navbar-expand-custom .navbar-nav {
    -ms-flex-direction: row;
    flex-direction: row;
  }
  .navbar-expand-custom .navbar-toggler {
    display: none;
  }
  .navbar-expand-custom .navbar-collapse {
    display: -ms-flexbox!important;
    display: flex!important;
    -ms-flex-preferred-size: auto;
    flex-basis: auto;
  }
}

@media (max-width: 991px) {
  #navbarSupportedContent ul li a {
    padding: 12px 30px;
  }
  .hori-selector {
    margin-top: 0px;
    margin-left: 10px;
    border-radius: 0;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
  }
  .hori-selector .left,
  .hori-selector .right {
    right: 10px;
  }
  .hori-selector .left {
    top: -25px;
    left: auto;
  }
  .hori-selector .right {
    bottom: -25px;
  }
  .hori-selector .left:before {
    left: -25px;
    top: -25px;
  }
  .hori-selector .right:before {
    bottom: -25px;
    left: -25px;
  }
}

.search-container {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.sticky-column {
  position: sticky;
  top: 150px;
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
}

.sticky-column > .card-body {
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.filters-card {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

#recipesContainer {
  max-height: calc(100vh - 370px);
  overflow-y: auto;
}

.inventory-card-body {
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}

.search-section h5 {
  color: var(--secondary-color);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.inventory-items-section h5 {
  color: var(--secondary-color);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.inventory-divider {
  border-color: rgba(52, 152, 219, 0.3);
  margin: 1.5rem 0;
}

.inventory-items-section {
  margin-top: 1rem;
}

.inventory-list {
  overflow-y: auto;
}

.search-input {
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--secondary-color);
  color: var(--text-light);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  padding-right: 2.5rem;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.search-input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent-color);
  color: var(--text-light);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
}

.clear-search-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  transition: all 0.3s;
  font-size: 1rem;
  opacity: 0.7;
}

.clear-search-btn:hover {
  background: rgba(231, 76, 60, 0.3);
  color: var(--accent-color);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.search-help-btn {
  background: rgba(52, 152, 219, 0.2);
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 50%;
  transition: all 0.3s;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-help-btn:hover {
  background: var(--secondary-color);
  color: white;
  transform: scale(1.1);
}

.inventory-item-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 0.5rem;
}

.card {
  background: var(--bg-card);
  border: none;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 40px rgba(52, 152, 219, 0.3);
}

.card-body {
  color: white;
  max-height: calc(100vh - 240px);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), #34495e);
  border-bottom: 2px solid var(--secondary-color);
  padding: 1rem 1.5rem;
  font-weight: 600;
}

.badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
}

.category-badge {
  background: linear-gradient(135deg, #34495e, #2c3e50);
  font-size: 0.85rem;
}

.method-badge {
  background: linear-gradient(135deg, #16a085, #138d75);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tooltip {
  position: absolute;
  z-index: 9999;
}

.tooltip-inner {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border: 2px solid var(--secondary-color);
  max-width: 300px;
  text-align: left;
}

.tooltip-arrow::before {
  border-top-color: var(--secondary-color) !important;
}

.inventory-item {
  background: rgba(52, 152, 219, 0.2);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  padding: 1rem;
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.inventory-item:hover {
  background: rgba(52, 152, 219, 0.3);
  border-color: var(--accent-color);
}

.inventory-item.zero-quantity {
  background: rgba(231, 76, 60, 0.2);
  border-color: var(--accent-color);
}

.inventory-item.zero-quantity strong {
  color: var(--accent-color);
}

.inventory-item.zero-quantity .qty-input {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  background: var(--secondary-color);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

.qty-input {
  width: 60px;
  text-align: center;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--secondary-color);
  color: var(--text-light);
  border-radius: 8px;
  padding: 0.3rem;
}

.remove-btn {
  background: var(--accent-color);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.remove-btn:hover {
  background: #c0392b;
  transform: scale(1.05);
}

.stat-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0.5rem;
}

.stat-icon {
  color: var(--secondary-color);
}

.filter-section {
  padding: 0;
}

.filter-label {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-divider {
  border-color: rgba(52, 152, 219, 0.3);
  margin: 1.5rem 0;
}

.filter-btn {
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  color: var(--text-light);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
}

.filter-btn:hover {
  background: rgba(52, 152, 219, 0.25);
  transform: translateX(5px);
  box-shadow: -3px 0 12px rgba(52, 152, 219, 0.3);
}

.filter-btn.active {
  background: var(--secondary-color);
  transform: translateX(5px);
  box-shadow: -3px 0 15px rgba(52, 152, 219, 0.5);
}

.method-btn {
  background: rgba(22, 160, 133, 0.1);
  border: 2px solid #16a085;
  color: var(--text-light);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
}

.method-btn:hover {
  background: rgba(22, 160, 133, 0.25);
  transform: translateX(5px);
  box-shadow: -3px 0 12px rgba(22, 160, 133, 0.3);
}

.method-btn.active {
  background: linear-gradient(135deg, #16a085, #138d75);
  border-color: #16a085;
  transform: translateX(5px);
  box-shadow: -3px 0 15px rgba(22, 160, 133, 0.5);
}

.suggestions-list {
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
  position: absolute;
  z-index: 1000;
  width: calc(100% - 4px);
  margin-top: 0.5rem;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

.suggestion-item:hover {
  background: rgba(52, 152, 219, 0.3);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: rgba(255,255,255,0.5);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255,255,255,0.7);
}

.coming-soon i {
  font-size: 5rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.coming-soon h2 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

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

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

.page-content {
  display: none;
}

.page-content.active {
  display: block;
}

/* ==================== INTERACTIVE MAP STYLES ==================== */
.map-header {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  text-align: center;
}

.map-header h2 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.map-header p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.map-credits {
  margin-top: 1rem;
}

.map-credits a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s;
}

.map-credits a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.map-controls {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  position: sticky;
  top: 150px;
}

.map-controls h5 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.map-controls .form-check {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 8px;
  transition: all 0.3s;
}

.map-controls .form-check:hover {
  background: rgba(52, 152, 219, 0.2);
}

.map-controls .form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  border: 2px solid var(--secondary-color);
  background-color: rgba(255,255,255,0.1);
}

.map-controls .form-check-input:checked {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.map-controls .form-check-label {
  cursor: pointer;
  margin-left: 0.5rem;
  color: var(--text-light);
}

.map-controls hr {
  border-color: rgba(52, 152, 219, 0.3);
  margin: 1rem 0;
}

.map-selector {
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--secondary-color);
  color: var(--text-light);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.map-selector:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
  color: var(--text-light);
}

.map-selector option {
  background: var(--bg-card);
  color: var(--text-light);
  padding: 0.5rem;
}

.map-selector optgroup {
  background: var(--bg-dark);
  color: var(--secondary-color);
  font-weight: 600;
}

.map-container {
  background: var(--bg-card);
  padding: 0;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
  height: 70vh;
  min-height: 500px;
}

#interactive-map {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  background: var(--bg-dark);
}

.leaflet-image-layer {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: var(--secondary-color);
  z-index: 1000;
}

/* Custom Leaflet marker styles */
.custom-map-marker {
  background: transparent;
  border: none;
}

.marker-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 0.3s;
  border: 2px solid white;
}

.marker-icon:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}

.marker-icon-image {
  background: white !important;
  padding: 4px;
  border-radius: 6px;
}

.marker-icon-image img {
  border-radius: 4px;
}

.marker-popup {
  color: white;
}

.marker-popup h6 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.marker-popup p {
  margin: 0;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

/* Override Leaflet popup styles */
.leaflet-popup-content-wrapper {
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.leaflet-popup-tip {
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: white;
}

/* ==================== FOOTER STYLES ==================== */
.site-footer {
  background: rgba(22, 33, 62, 0.98);
  border-top: 3px solid var(--secondary-color);
  padding: 2rem 0;
  margin-top: auto;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.site-footer h5 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.site-footer p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s;
}

.site-footer a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.site-footer .text-muted {
  color: rgba(255,255,255,0.5) !important;
}

/* ==================== MAP CONTEXT MENU ==================== */
.map-context-menu {
  position: absolute;
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  padding: 0.5rem 0;
  z-index: 10000;
  min-width: 220px;
  display: none;
}

.map-context-menu.show {
  display: block;
}

.context-menu-item {
  padding: 0.75rem 1rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
}

.context-menu-item:hover {
  background: rgba(52, 152, 219, 0.3);
  color: white;
}

.context-menu-item i {
  width: 20px;
  text-align: center;
  color: var(--secondary-color);
}

.context-menu-item.danger {
  color: var(--accent-color);
}

.context-menu-item.danger:hover {
  background: rgba(231, 76, 60, 0.2);
}

.context-menu-separator {
  height: 1px;
  background: rgba(52, 152, 219, 0.3);
  margin: 0.5rem 0;
}

/* Home marker styles */
.home-marker-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 0.3s;
  border: 3px solid white;
  background: linear-gradient(135deg, #27ae60, #229954);
}

.home-marker-icon.current {
  background: linear-gradient(135deg, #27ae60, #229954);
}

.home-marker-icon.old {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
  opacity: 0.7;
}

.home-marker-icon.friend {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.home-marker-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}

/* Custom modal for friend base name */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.custom-modal.show {
  display: flex;
}

.custom-modal-content {
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 15px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.custom-modal-header {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.custom-modal-body {
  margin-bottom: 1.5rem;
}

.custom-modal-body input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1rem;
}

.custom-modal-body input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.custom-modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.modal-btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), #2980b9);
  color: white;
}

.modal-btn-primary:hover {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: scale(1.05);
}

.modal-btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--text-light);
  border: 2px solid var(--secondary-color);
}

.modal-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* Marker type selection modal */
.marker-type-modal {
  max-width: 600px;
}

.marker-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 0.5rem;
}

.marker-type-btn {
  padding: 1.5rem 1rem;
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 12px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.marker-type-btn:hover {
  background: rgba(52, 152, 219, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border-color: var(--accent-color);
}

.marker-type-btn i {
  font-size: 1.8rem;
  color: var(--secondary-color);
}

.marker-type-btn span {
  font-size: 0.9rem;
  font-weight: 600;
}

.custom-modal-body textarea {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1rem;
  resize: vertical;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.custom-modal-body textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.custom-modal-body .form-label {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.custom-modal-body .form-control {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1rem;
}

.custom-modal-body .form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
  background: rgba(255,255,255,0.15);
}

/* Preset selection modal */
.preset-selection-modal {
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.preset-selection-modal .custom-modal-body {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.preset-search-container {
  position: relative;
}

.preset-search-container .search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
  pointer-events: none;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
}

.preset-item {
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.preset-item:hover {
  background: rgba(52, 152, 219, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border-color: var(--accent-color);
}

.preset-item-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  padding: 0.25rem;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.preset-item:hover .preset-item-image {
  border-color: var(--secondary-color);
  background: rgba(255,255,255,0.1);
}

.preset-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
}

.preset-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.preset-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: rgba(255,255,255,0.5);
}

.preset-no-results i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* ==================== CATEGORY SELECTION MODAL ==================== */
.category-selection-modal {
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.category-selection-modal .custom-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
  padding-bottom: 0.5rem;
}

.category-tab {
  padding: 0.75rem 1.25rem;
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  font-weight: 600;
}

.category-tab:hover {
  background: rgba(52, 152, 219, 0.25);
  transform: translateY(-2px);
}

.category-tab.active {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.subcategory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.subcategory-tab {
  padding: 0.5rem 1rem;
  background: rgba(22, 160, 133, 0.1);
  border: 2px solid #16a085;
  border-radius: 6px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
  font-weight: 500;
}

.subcategory-tab:hover {
  background: rgba(22, 160, 133, 0.25);
}

.subcategory-tab.active {
  background: linear-gradient(135deg, #16a085, #138d75);
  color: white;
  border-color: #16a085;
}

.category-items-container {
  flex: 1;
  min-height: 300px;
  overflow-y: auto;
  border: 2px solid rgba(52, 152, 219, 0.3);
  border-radius: 10px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.category-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.category-item {
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.category-item:hover {
  background: rgba(52, 152, 219, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.category-item.selected {
  background: rgba(39, 174, 96, 0.3);
  border-color: var(--success-color);
}

.category-item-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  border: 2px solid var(--secondary-color);
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.category-item-checkbox:checked {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.category-item-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  padding: 0.25rem;
}

.category-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
  word-wrap: break-word;
  width: 100%;
}

/* ==================== ITEM INFO MODAL (Draggable/Resizable) ==================== */
.item-info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  max-width: 90vw;
  max-height: 85vh;
  background: #2b2b2b;
  border-left: 4px solid #f39c12;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  z-index: 10002;
  display: none;
  flex-direction: column;
  overflow: hidden;
  resize: both;
}

.item-info-modal.show {
  display: flex;
}

.item-info-modal.pinned {
  opacity: 0.95;
}

.item-info-header {
  background: #1f1f1f;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(243, 156, 18, 0.3);
  cursor: move;
  user-select: none;
}

.item-info-pin {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.item-info-pin:hover,
.item-info-pin.pinned {
  color: #f39c12;
  transform: rotate(45deg);
}

.item-info-drag-handle {
  flex: 1;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 1.2rem;
}

.item-info-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: all 0.3s;
  font-size: 1.3rem;
}

.item-info-close:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

.item-info-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.item-info-body {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 1.5rem;
}

.item-info-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.item-info-title {
  color: #f39c12;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.item-info-wiki-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}

.item-info-wiki-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.item-info-section {
  background: rgba(0,0,0,0.3);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(243, 156, 18, 0.2);
}

.item-info-section h6 {
  color: #f39c12;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.item-info-section p {
  color: white;
  margin: 0;
  font-size: 0.9rem;
}

.item-info-section ul {
  margin: 0;
  padding-left: 1.25rem;
  color: white;
  font-size: 0.9rem;
}

.item-info-section li {
  margin-bottom: 0.25rem;
}

.item-info-notes {
  width: 100%;
  min-height: 80px;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(243, 156, 18, 0.3);
  border-radius: 6px;
  color: white;
  padding: 0.75rem;
  font-size: 0.9rem;
  resize: vertical;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.item-info-notes:focus {
  outline: none;
  border-color: #f39c12;
  background: rgba(0,0,0,0.5);
}

.item-info-right {
  display: flex;
  flex-direction: column;
}

.item-info-image-container {
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.3);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(243, 156, 18, 0.2);
  text-align: center;
}

.item-info-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  padding: 0.5rem;
  margin-bottom: 1rem;
}

.item-info-add-image {
  padding: 0.5rem 1rem;
  background: rgba(52, 152, 219, 0.2);
  border: 2px solid var(--secondary-color);
  border-radius: 6px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
  width: 100%;
}

.item-info-add-image:hover {
  background: rgba(52, 152, 219, 0.4);
  border-color: #f39c12;
}

.item-info-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  color: rgba(243, 156, 18, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 2px;
  font-size: 0.9rem;
}

.item-info-resize-handle:hover {
  color: #f39c12;
}

/* ==================== MARKER GROUPING STYLES ==================== */
/* 2x2 Grid display for grouped markers */
.marker-group-grid {
  width: 42px;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(2, 20px);
  grid-template-rows: repeat(2, 20px);
  gap: 2px;
  background: white;
  padding: 1px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  position: relative;
}

.marker-group-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.marker-group-count {
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Marker Group View Modal */
.marker-group-modal {
  max-width: 700px;
  max-height: 80vh;
}

.marker-group-modal .custom-modal-body {
  max-height: 65vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.marker-group-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.marker-group-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
  flex-shrink: 0;
}

.marker-group-tab {
  padding: 0.75rem 1.25rem;
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.marker-group-tab img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  padding: 2px;
}

.marker-group-tab:hover {
  background: rgba(52, 152, 219, 0.25);
  transform: translateY(-2px);
}

.marker-group-tab.active {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.marker-group-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(52, 152, 219, 0.3);
  border-radius: 10px;
}

.marker-group-item-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.marker-group-item-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.marker-group-item-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  padding: 0.5rem;
  border: 2px solid var(--secondary-color);
}

.marker-group-item-info {
  flex: 1;
}

.marker-group-item-info h6 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.marker-group-item-info p {
  color: rgba(255,255,255,0.8);
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.marker-group-item-actions {
  display: flex;
  gap: 0.5rem;
}

.marker-group-item-actions button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
}

/* Remove Markers from Group Modal */
.remove-markers-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.remove-marker-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  transition: all 0.3s;
}

.remove-marker-item:hover {
  background: rgba(52, 152, 219, 0.2);
  border-color: var(--accent-color);
}

.remove-marker-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  border: 2px solid var(--secondary-color);
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.remove-marker-item input[type="checkbox"]:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.remove-marker-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  padding: 0.25rem;
  border: 2px solid transparent;
}

.remove-marker-item-info {
  flex: 1;
}

.remove-marker-item-info strong {
  color: var(--text-light);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.remove-marker-item-info small {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}

/* ==================== TOAST NOTIFICATION SYSTEM ==================== */
.toast-container {
  position: fixed;
  top: 150px;
  right: 20px;
  z-index: 10003;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.toast.hiding {
  animation: slideOutRight 0.3s ease-out forwards;
}

.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--secondary-color);
  animation: toastProgress 5s linear;
}

.toast.success {
  border-color: var(--success-color);
}

.toast.success::before {
  background: var(--success-color);
}

.toast.error {
  border-color: var(--accent-color);
}

.toast.error::before {
  background: var(--accent-color);
}

.toast.warning {
  border-color: var(--warning-color);
}

.toast.warning::before {
  background: var(--warning-color);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success-color);
}

.toast.error .toast-icon {
  color: var(--accent-color);
}

.toast.warning .toast-icon {
  color: var(--warning-color);
}

.toast.info .toast-icon {
  color: var(--secondary-color);
}

.toast-content {
  flex: 1;
  color: var(--text-light);
}

.toast-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.toast-close:hover {
  color: white;
  transform: scale(1.1);
}

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

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

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ==================== CUSTOM CONFIRMATION MODAL ==================== */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10004;
  animation: fadeIn 0.2s ease-out;
}

.confirm-modal.show {
  display: flex;
}

.confirm-modal-content {
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 15px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: scaleIn 0.3s ease-out;
}

.confirm-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.confirm-modal-icon {
  font-size: 2rem;
  color: var(--warning-color);
}

.confirm-modal-title {
  color: var(--secondary-color);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.confirm-modal-body {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.confirm-modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==================== MARKER DRAGGING EFFECTS ==================== */
.marker-dragging {
  cursor: grabbing !important;
  z-index: 9999 !important;
  opacity: 0.8;
  transform: scale(1.2);
  transition: transform 0.2s ease-out;
}

.marker-meld-preview {
  position: absolute;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Simple highlight for nearby marker */
.marker-meld-highlight {
  position: absolute;
  border: 3px solid var(--success-color);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseHighlight 1s ease-in-out infinite;
}

@keyframes pulseHighlight {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* ==================== UNDO/REDO CONTROLS ==================== */
.map-undo-redo-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.map-control-btn {
  width: 34px;
  height: 34px;
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 4px;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.map-control-btn:hover:not(:disabled) {
  background: var(--secondary-color);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
}

.map-control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(52, 152, 219, 0.3);
  color: rgba(255,255,255,0.3);
}

.map-control-btn:active:not(:disabled) {
  transform: scale(0.95);
}

/* ==================== CLEAR ALL MARKERS BUTTON ==================== */
.map-clear-all-btn-container {
  position: absolute;
  bottom: 30px;
  right: 10px;
  z-index: 1000;
}

.map-clear-all-btn {
  border-color: var(--accent-color) !important;
}

.map-clear-all-btn:hover:not(:disabled) {
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5) !important;
}

/* ==================== MINIMAP ==================== */
.minimap-container {
  position: absolute;
  bottom: 30px;
  left: 10px;
  width: 200px;
  height: 150px;
  background: var(--bg-card);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 1000;
  overflow: hidden;
}

.minimap-header {
  background: linear-gradient(135deg, var(--primary-color), #34495e);
  color: var(--text-light);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--secondary-color);
}

#minimap {
  width: 100%;
  height: calc(100% - 32px);
  background: var(--bg-dark);
}

.minimap-viewport {
  border: 2px solid var(--accent-color) !important;
  background: transparent !important;
  cursor: default;
}

/* ==================== DRAGGABLE MODALS ==================== */
.custom-modal-content {
  cursor: default;
}

.custom-modal-header {
  cursor: move;
  user-select: none;
}

.custom-modal.dragging .custom-modal-content {
  transition: none !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .sticky-column {
    position: static;
    max-height: none;
  }

  .sticky-column .card-body {
    overflow: visible;
  }

  .filters-card {
    max-height: none;
    overflow-y: visible;
  }

  .item-info-body {
    grid-template-columns: 1fr;
  }

  .item-info-right {
    order: -1;
  }
}

@media (max-width: 768px) {
  .map-container {
    height: 50vh;
    min-height: 400px;
  }

  .map-controls {
    position: static;
    margin-bottom: 1rem;
  }

  .site-footer .text-md-end {
    text-align: left !important;
    margin-top: 1rem;
  }

  .map-context-menu {
    min-width: 180px;
  }

  .context-menu-item {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  .marker-type-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .marker-type-btn {
    padding: 1rem 0.5rem;
  }

  .marker-type-btn i {
    font-size: 1.5rem;
  }

  .marker-type-btn span {
    font-size: 0.8rem;
  }

  .marker-type-modal {
    max-width: 90%;
  }

  .preset-selection-modal {
    max-width: 95%;
  }

  .preset-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .preset-item {
    padding: 0.75rem;
  }

  .preset-item-image {
    width: 48px;
    height: 48px;
  }

  .preset-item-name {
    font-size: 0.85rem;
  }

  .filter-btn,
  .method-btn {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }
}
