* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
}

.container {
  width: 100%;
  height: 100vh;
  position: relative;
}

.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

.fire-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fire-icon {
  width: 30px;
  height: 30px;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="%23FF4136" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z M192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.custom-popup {
  background-color: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-width: 250px;
}

.custom-popup h3 {
  margin-bottom: 15px;
  color: #bc2a33;
  font-size: 16px;
  font-weight: 600;
}

.info-row {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}

.info-row .label {
  font-size: 12px;
  color: #999;
}

.info-row .value {
  font-size: 14px;
  font-weight: 500;
}

.leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  width: auto !important;
}

.info-legend {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  line-height: 1.5;
}

.timeline-container {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-60%); /* biraz daha sola kaydır */
z-index: 1000;
background: rgba(255, 255, 255, 0.96);
padding: 35px 16px;
border-radius: 16px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
width: 88%;
max-width: 1000px;
box-sizing: border-box;
}


/* Mobil menü kontrolü için */
.mobile-controls {
display: none;
}

@media (max-width: 768px) {

.fire-icon {
  width: 18px;
  height: 18px;
  background-size: contain;
}

.mobile-controls {
  display: flex;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  gap: 15px;
  flex-direction: row;
}

.mobile-button {
  background: white;
  color: #FF4136;
  border: none;
  padding: 12px;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.mobile-button:hover, .mobile-button:active {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  background: #FF4136;
  color: white;
}

.timeline-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0 0 20px 20px;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.timeline-container.active {
  transform: translateY(0);
}

.timeline-container .timeline-title,
.timeline-container .timeline,
.timeline-container .reset-button {
  display: none !important;
}

.timeline-container .year-filters {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 10px;
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin: 0;
  justify-content: center;
  border-bottom: 1px solid #eee;
  z-index: 1002;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.timeline-container.active .year-filters {
  transform: translateY(0);
}
.timeline-title {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  color: #ff4136;
  margin-bottom: 8px;
  text-align: center;
}


.year-filters {
  position: relative;
  margin-top: 10px;
  transform: none;
  left: 0;
  display: flex;
  overflow-x: auto;
  padding: 5px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.year-filters::-webkit-scrollbar {
  display: none;
}

.year-filter {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 6px 15px;
  margin-right: 8px;
  background: #f5f5f5;
  border: none;
  color: #666;
}

.year-filter.active {
  background: #FF4136;
  color: white;
  transform: none;
  box-shadow: none;
}

.timeline {
  display: block;
  height: 2px;
  margin: 15px 0;
}

.timeline-item {
  display: block;
  width: 6px;
  height: 6px;
}

.year-filters {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 10px 8px;
  display: flex;
  overflow-x: auto;
  gap: 8px;
  margin: 0;
  justify-content: start;
  border-bottom: 1px solid #eee;
  z-index: 1002;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.timeline-container.active .year-filters {
  transform: translateY(0);
}

.year-filter {
  flex: 0 0 auto;
  background: #f5f5f5;
  color: #333;
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 14px;
  border: 1px solid #aaa;
  white-space: nowrap;
}


.year-filter.active {
  background: #FF4136;
  color: white;
  border-color: #FF4136;
}

.heat-legend {
  position: fixed;
  bottom: -100%;
  left: 10px;
  transition: all 0.3s ease;
  z-index: 1000;
}

#mobileYearFilter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  backdrop-filter: blur(5px);
  display: flex;
  gap: 8px;
  padding: 10px 15px;
  overflow-x: auto;
  border-bottom: 1px solid #eee;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

#mobileYearFilter.active {
  transform: translateY(0);
}

.year-btn {
  flex: 0 0 auto;
  background: #f5f5f5;
  color: #333;
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 14px;
  border: 1px solid #aaa;
  white-space: nowrap;
}

.year-btn.active {
  background: #FF4136;
  color: white;
  border-color: #FF4136;
}





.heat-legend.active {
  bottom: 80px;
}

.leaflet-control-layers {
  position: fixed !important;
  right: -300px !important; /* gizli konumda */
  top: 80px !important;
  z-index: 1001;
  transition: right 0.3s ease;
  width: 240px;
}

.leaflet-control-layers.active {
  right: 1px !important; /* görünsün */
  width: 200px;
}



.year-filter {
  padding: 4px 12px;
  font-size: 12px;
}

.timeline {
  margin: 15px 0 25px;
}

.timeline-title {
  font-size: 14px;
  padding: 10px 15px;
}

.month-label {
  font-size: 10px;
  padding: 1px 4px;
  bottom: 12px;
}

.year-label {
  font-size: 10px;
  bottom: -20px;
  min-width: 30px;
}

.custom-popup {
  padding: 15px;
  min-width: 200px;
}

.custom-popup h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.info-row .label {
  font-size: 11px;
}

.info-row .value {
  font-size: 12px;
}

.leaflet-control-layers {
  padding: 8px;
  margin-right: 8px !important;
}

.heat-legend {
  font-size: 11px;
}

.legend-container {
  padding: 10px;
  min-width: 180px;
}

.gradient-bar {
  width: 15px;
  height: 100px;
}

.gradient-labels {
  height: 100px;
  font-size: 11px;
}
}

@media (max-width: 480px) {
.timeline-container {
  padding: 20px 8px;
}

.year-filter {
  padding: 3px 10px;
  font-size: 11px;
}

.reset-button {
  padding: 6px 12px;
  font-size: 12px;
}
}

.timeline-title {
position: absolute;
top: -15px;
left: 50%;
transform: translateX(-50%);
color: #FF4136;
padding: 15px 20px;
font-size: 16px;
font-weight: 500;
white-space: nowrap;
text-align: center;
}

.year-filters {
position: absolute;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 10px;
align-items: center;
justify-content: center;
margin: 35px 0 15px;
z-index: 2;
width: 100%;
}

.year-filter {
border: 2px solid #ff4136;
background: transparent;
padding: 6px 18px;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
color: #ff4136;
transition: all 0.3s ease;
font-weight: 500;
}

.year-filter:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 65, 54, 0.4);
}

.year-filter.active {
background: linear-gradient(145deg, #e02d23, #ff4136);
transform: translateY(1px);
box-shadow: 0 2px 4px rgba(255, 65, 54, 0.2);
}

.timeline-controls {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 15px;
}

.timeline {
flex: 1;
position: relative;
height: 4px;
background: #ddd;
border-radius: 2px;
margin: 25px 0 35px;
background-image: linear-gradient(90deg, #bbb 1px, transparent 1px);
background-size: 50px 100%;
}

.timeline::before {
content: '';
position: absolute;
top: -15px;
left: 0;
right: 0;
height: 35px;
background-image: repeating-linear-gradient(to right,
  transparent,
  transparent calc(50px - 1px),
  rgba(187, 187, 187, 0.3) calc(50px - 1px),
  rgba(187, 187, 187, 0.3) 50px
);
pointer-events: none;
}

.year-marker {
position: absolute;
width: 2px;
height: 16px;
background: rgba(0, 0, 0, 0.4);
bottom: -6px;
transform: translateX(-50%);
}

.year-label {
position: absolute;
font-size: 12px;
color: #444;
transform: translateX(-50%);
bottom: -25px;
font-weight: 500;
text-align: center;
padding: 2px 6px;
margin-bottom: 45px;
background: rgba(255, 255, 255, 0.9);
border-radius: 3px;
min-width: 40px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.month-label {
position: absolute;
font-size: 11px;
color: #666;
transform: translateX(-50%) rotate(-45deg);
bottom: 15px;
font-weight: 500;
padding: 2px 6px;
background: rgba(255, 255, 255, 0.9);
border-radius: 3px;
white-space: nowrap;
cursor: pointer;
transition: all 0.3s ease;
}

.month-label:hover {
color: #FF4136;
transform: translateX(-50%) rotate(-45deg) scale(1.1);
}


.year-marker {
position: absolute;
width: 2px;
height: 20px;
background: rgba(255, 65, 54, 0.4);
bottom: -10px;
transform: translateX(-50%);
}

.year-marker::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 6px;
height: 6px;
background: #FF4136;
border-radius: 50%;
}

.timeline-item {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #FF4136;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 4px rgba(255, 65, 54, 0.1);
  z-index: 1;
}

.timeline-item:hover {
  transform: translate(-50%, -50%) scale(1.5);
}

.timeline-item:before {
  content: attr(data-date);
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.timeline-item:hover:before {
  opacity: 1;
}

.timeline-item.active {
  background: #FF4136;
  transform: translate(-50%, -50%) scale(1.5);
}

.polygon-hover {
  transition: all 0.3s ease !important;
}

.polygon-hover:hover {
  fillOpacity: 0.6 !important;
  weight: 3 !important;
  filter: brightness(1.2);
}

.reset-button {
background: #FF4136;
color: white;
border: none;
padding: 8px 15px;
border-radius: 15px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s;
}

.reset-button:hover {
background: #ff6b63;
}

.leaflet-control-layers {
  padding: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  line-height: 1.5;
  transition: all 0.3s ease;
  margin-right: 15px !important;
}

.leaflet-control-layers:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-control-layers-list {
  margin-bottom: 0;
}

.heat-legend {
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.legend-container {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  min-width: 200px;
}

.legend-section {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

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

.viirs-legend {
  margin-top: 10px;
}

.viirs-item {
  display: flex;
  align-items: center;
  margin: 5px 0;
  font-size: 12px;
}

.viirs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.legend-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.legend-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.legend-gradient {
  display: flex;
  align-items: center;
  margin: 15px 0;
}

.gradient-bar {
  width: 20px;
  height: 120px;
  background: linear-gradient(to top, #4575b4, #ffffbf, #d73027);
  border-radius: 3px;
  margin-right: 15px;
}

.gradient-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px;
  color: #666;
}

.legend-footer {
  margin-top: 10px;
  font-size: 10px;
  color: #999;
  text-align: center;
}

.leaflet-control-layers label {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: block;
  cursor: pointer;
}

.leaflet-control-layers label:hover {
  background: rgba(255, 65, 54, 0.1);
}

.leaflet-control-layers-selector {
  margin-right: 8px;
}

.leaflet-control-layers-base label {
  position: relative;
  padding-left: 35px;
}

.leaflet-control-layers-base input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.leaflet-control-layers-base label:before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #FF4136;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.leaflet-control-layers-base input[type="radio"]:checked + span:after {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #FF4136;
  border-radius: 50%;
  animation: radioSelect 0.3s ease;
}

@keyframes radioSelect {
  0% {
      transform: translateY(-50%) scale(0);
      opacity: 0;
  }
  50% {
      transform: translateY(-50%) scale(1.2);
  }
  100% {
      transform: translateY(-50%) scale(1);
      opacity: 1;
  }
}