/* style.css */
:root {
  --bg: #0f172a;
  --panel-bg: rgba(255,255,255,0.12);
  --panel-border: rgba(255,255,255,0.25);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
}
* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  margin: 0; 
  padding: 0;
  overflow: hidden;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  position: relative;
}

/* MAP CONTAINER - PUN EKRAN */
#map-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#svg-host {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

#svg-host svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* KONTROLE */
.controls {
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 100;
}

.btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  font-weight: bold;
}

.btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.hud {
  position: fixed;
  bottom: 12px;
  left: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  font-size: 14px;
  color: var(--muted);
  backdrop-filter: blur(8px);
  z-index: 100;
}

/* MODAL OVERLAY */
#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

#country-modal {
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { 
    opacity: 0; 
    transform: scale(0.95) translateY(-10px); 
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 15px;
}

.modal-title {
  flex: 1;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.modal-close {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: #ffffff;
  font-weight: bold;
}

.modal-close:hover {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.4);
}

.modal-content {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.modal-flag {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.modal-details {
  flex: 1;
  min-width: 0;
}

.detail-row {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.4;
}

.detail-row strong {
  display: inline-block;
  min-width: 80px;
  color: var(--muted);
}

.detail-content {
  word-wrap: break-word;
  white-space: normal;
}

.modal-links {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  margin-right: 15px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-link:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.country {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.country:hover {
  opacity: 0.8;
}

/* Poboljšanja za mobilne uređaje */
@media (max-width: 768px) {
  .controls {
    top: 8px;
    right: 8px;
  }
  
  .btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .hud {
    bottom: 8px;
    left: 8px;
    padding: 6px 10px;
    font-size: 12px;
  }
  
  #country-modal {
    width: 95%;
    padding: 16px;
    max-height: 90vh;
    margin: 10px;
  }
  
  .modal-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-title {
    font-size: 18px;
  }
  
  .modal-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .modal-flag {
    align-self: center;
  }
  
  .detail-row {
    margin: 8px 0;
  }
  
  .detail-row strong {
    min-width: 70px;
    font-size: 13px;
  }
  
  .modal-link {
    display: block;
    margin-right: 0;
    text-align: center;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 36px;
    height: 36px;
  }
  
  #country-modal {
    padding: 12px;
  }
  
  .modal-title {
    font-size: 16px;
  }
  
  .detail-row {
    font-size: 13px;
  }
  
  .modal-link {
    padding: 6px 10px;
    font-size: 13px;
  }
}

body.modal-open {
  overflow: hidden;
}
