/* Genel Sıfırlamalar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Sayfa Temel Stil */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Giriş Ekranı */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 400px;
  max-width: 90%;
  text-align: center;
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-header h1 {
  color: #333;
  font-size: 28px;
  margin-bottom: 10px;
}

.login-header p {
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.remember-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-group input[type='checkbox'] {
  width: auto;
}

.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-register {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-register:hover {
  background: #667eea;
  color: white;
}

.login-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.login-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.login-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Ana Uygulama Konteyner */
.app-container {
  display: none;
  width: 100%;
  height: 100vh;
}

#map {
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  touch-action: manipulation;
}

/* Hamburger Menü */
.menu-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #667eea;
  border-radius: 12px;
  cursor: pointer;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: #667eea;
}

.hamburger-line {
  width: 20px;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Panel Overlay */
.panel-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1499;
  backdrop-filter: blur(2px);
}

.panel-overlay.active {
  display: block;
}

/* Kontrol Paneli */
.control-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 350px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: slideIn 0.5s ease-out;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.panel-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 15px 15px 0 0;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  position: relative;
}

.logout-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.panel-content {
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Hayvan Bilgileri */
.animal-info {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.animal-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.animal-icon {
  font-size: 24px;
  animation: animalBounce 2s infinite ease-in-out;
}

@keyframes animalBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.animal-name {
  font-size: 18px;
  font-weight: bold;
}

.animal-type {
  font-size: 12px;
  opacity: 0.9;
}

.edit-animal-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.edit-animal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Çizim Kontrolleri */
.drawing-controls {
  margin-bottom: 20px;
}

.control-group {
  margin-bottom: 15px;
}

.control-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-secondary:first-child {
  background: #17a2b8;
}

.btn-secondary:first-child:hover {
  background: #138496;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
  transform: translateY(-2px);
}

/* Canlı Takip Butonu */
.btn-live {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-live:hover {
  background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-live.active {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-live.active:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

.btn-live::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.btn-live.active::before {
  background: rgba(255, 255, 255, 0.8);
  animation: pulse-fast 1s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
}

@keyframes pulse-fast {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.btn:active {
  transform: translateY(0);
}

.input-field {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-field {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: border-color 0.3s ease;
}

.select-field:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Alan Listesi */
.area-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 20px;
}

.area-item {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.area-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.area-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.area-info {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 10px;
}

.area-actions {
  display: flex;
  gap: 5px;
}

.btn-small {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
}

/* Canlı Takip Durum Paneli */
.live-status {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid #28a745;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  display: none;
}

.live-status.active {
  display: block;
}

.live-status.error {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
}

.live-status h4 {
  color: #28a745;
  margin: 0 0 8px 0;
  font-size: 14px;
}

.live-status.error h4 {
  color: #dc3545;
}

.live-info {
  font-size: 12px;
  color: #6c757d;
}

.live-coordinates {
  font-family: monospace;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 5px;
}

/* Hayvan İkonları */
.animal-marker {
  position: relative;
}

.animal-marker::after {
  content: attr(data-name);
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  animation: nameFloat 2s infinite ease-in-out;
  z-index: 1000;
}

@keyframes nameFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  }
  50% {
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
  }
}

/* Hayvan İz Çizgisi */
.animal-trail {
  animation: trailPulse 2s infinite ease-in-out;
}

@keyframes trailPulse {
  0%,
  100% {
    stroke-width: 3;
    opacity: 0.7;
  }
  50% {
    stroke-width: 5;
    opacity: 0.9;
  }
}

/* Alan Güncelleme Bildirimi */
.area-update-notification {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  color: #212529;
  padding: 15px 25px;
  border-radius: 30px;
  font-weight: bold;
  box-shadow: 0 5px 20px rgba(255, 193, 7, 0.4);
  z-index: 3000;
  animation: alertPulse 1s infinite ease-in-out;
  border: 2px solid white;
  display: none;
}

.area-update-notification.show {
  display: block;
}

@keyframes alertPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
}

.instructions {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Leaflet Çizim Araçları – Mobil Düzenlemeleri */
.leaflet-draw-toolbar {
  margin-left: 10px !important;
  margin-top: 80px !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

.leaflet-draw-toolbar a {
  width: 45px !important;
  height: 45px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 2px solid #667eea !important;
  border-radius: 10px !important;
  margin: 0 !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  float: none !important;
  flex-shrink: 0 !important;
}

.leaflet-draw-toolbar a:hover {
  background: #667eea !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}
/* Buzzer Kontrol Butonları */
.buzzer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.btn-buzzer {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 80px;
}

.btn-buzzer-on {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: 2px solid transparent;
}

.btn-buzzer-on:hover:not(:disabled) {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-buzzer-off {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: 2px solid transparent;
}

.btn-buzzer-off:hover:not(:disabled) {
  background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-buzzer:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: #6c757d !important;
}

.buzzer-status {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  opacity: 0.9;
  color: white;
}

.buzzer-status.buzzer-active {
  color: #ff6b6b;
  font-weight: bold;
  animation: buzzerPulse 1s infinite ease-in-out;
}

.buzzer-status.buzzer-inactive {
  color: #20c997;
}

@keyframes buzzerPulse {
  0%, 100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}