html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #f0f0f0;
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: #1f1f1f;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.leaflet-marker-icon.aircraft-icon {
  transform: none !important;
  transform-origin: center center !important;
}

.submenu {
  display: none;
  margin-left: 20px;
}

.submenu.open {
  display: block;
}

.top-bar h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 600;
}

.top-bar img {
  height: 30px;
  margin-left: 50px;
}

.small-icon {
  height: 22px;
  border-radius: 50%;
  transition: transform 0.3s;
}
.small-icon:hover {
  transform: scale(1.1);
}

/* Sidebar */
#sidebar {
  background: linear-gradient(to bottom right, #1c1c2e, #2a2a44);
  width: 280px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  position: fixed;
  top: 60px;
  left: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding-top: 10px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}

#sidebar.collapsed {
  width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#sidebar.collapsed * {
  display: none !important;
}

#sidebar.collapsed ~ #sidebar-toggle {
  left: 0 !important;
}

#sidebar-toggle.collapsed {
  transform: rotate(180deg);
}

main.expanded {
  margin-left: 0 !important;
  width: 100% !important;
}

/* Sidebar toggle arrow */
#sidebar-toggle {
  position: fixed;
  top: 80px;
  left: 280px;
  width: 30px;
  height: 50px;
  background-color: #333;
  color: #fff;
  font-size: 20px;
  text-align: center;
  line-height: 50px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.3s ease;
}

/* Menu Styling */
ul.menu, ul.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu .menu-item {
  margin: 0 10px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px 15px;
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.05);
}

.menu-link {
  display: block;
  font-weight: 600;
  font-size: 1.1em;
  color: #fff;
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.menu-link:hover {
  color: #4caf50;
}

/* Submenu Items */
.submenu {
  padding: 6px 0;
}

.list-group-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: #ccc;
  font-size: 0.95em;
}

.list-group-item label {
  flex: 1;
  cursor: pointer;
  transition: color 0.3s ease;
}

.list-group-item label:hover {
  color: #fff;
}

.list-group-item input[type="checkbox"],
.list-group-item input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #4caf50;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.list-group-item input[type="radio"] {
  border-radius: 50%;
}

.list-group-item input:checked {
  background-color: #4caf50;
  box-shadow: 0 0 6px #81c784;
}

/* Main content */
main {
  position: relative;
  margin-left: 280px;
  transition: margin-left 0.3s ease;
  width: calc(100% - 280px);
  height: calc(100vh - 60px);
}

main.expanded {
  margin-left: 0;
  width: 100%;
}

/* Leaflet Map */
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.leaflet-tile-pane img {
  transition: opacity 0.5s ease-in-out;
}

/* Radar Control */
#radarControl {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 999;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
  max-width: 95%;
  overflow: hidden;
}

#radarPlayBtn {
  background: #4caf50;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
}

#radarScrubber {
  width: 70%;
  height: 8px;
  flex-shrink: 1;
  border-radius: 4px;
}

/* Chrome Thumb */
#radarScrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Firefox Track */
#radarScrubber::-moz-range-track {
  height: 2px;
  background: #ffffff;
  border-radius: 4px;
}

/* Firefox Thumb */
#radarScrubber::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: rgb(54, 0, 248);
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  border: none;
}

/* Optional Firefox Progress for better fill (if supported) */
#radarScrubber::-moz-range-progress {
  background-color: #81c784;
  height: 8px;
}

#radarTimestamp {
  min-width: 160px;
  text-align: right;
  font-size: 0.9em;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sbtn {
  display: inline-block;
  padding: 6px 12px;
  background-color: #4caf50;
  color: white;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.sbtn:hover {
  background-color: #45a049;
}
