:root {
  --text: #e0e6ed;
  --text-light: #a0aec0;
  --bg: #0a192f;
  --white: #112240;
  --primary: #ffffff;
  --accent: #cbd5e0;
  --border: #233554;
  --glow: rgba(255, 255, 255, 0.4);
  --sidebar-width: 40%;
  --header-height: 80px;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  font-family: 'Caveat', cursive;
  font-size: 6rem;
  font-weight: 700;
  color: #0a192f;
  letter-spacing: 2px;
  animation: pulse 1.5s infinite ease-in-out;
}

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

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  color: var(--text);
  background-color: var(--bg);
}

.app-header {
  height: var(--header-height);
  background-color: var(--white);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  box-shadow: 0 4px 20px var(--glow);
  
  background-image: url('nz-flag.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto 100%;
}

.header-logo-link {
  text-decoration: none;
  cursor: pointer;
  z-index: 2;
}

.app-header h1 {
  font-family: 'Caveat', cursive;
  font-size: 2.8rem;
  margin: 0 0 0 80px;
  color: var(--primary);
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.5);
  position: relative;
  font-weight: 700;
  letter-spacing: 2px;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(17, 34, 64, 0.1) 0%, rgba(17, 34, 64, 0.6) 120px, var(--white) 450px);
  z-index: 1;
}

.header-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.nav-btn {
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 1.2rem;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  box-shadow: 0 0 10px var(--glow);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px var(--glow);
  border-color: var(--primary);
  color: var(--primary);
}

.nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  box-shadow: none;
  border-color: var(--border);
  color: var(--text-light);
}

.main-content {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  flex: 1;
  height: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
}

.log-entries {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.log-entry {
  padding: 0;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.log-entry:hover, .log-entry.active {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 5px 15px var(--glow);
}

.log-entry-content {
  padding: 20px;
}

.log-entry h3 {
  font-size: 1.3rem;
  margin: 0 0 8px 0;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.7px;
}

.log-entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.type-icon {
  display: flex;
  align-items: center;
}

.log-entry .date {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.log-entry p {
  font-size: 1rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

.log-entry-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  filter: brightness(0.8);
  transition: filter 0.3s;
}

.log-entry:hover .log-entry-image {
  filter: brightness(1);
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
  
  #map {
    height: 40vh;
    flex: none;
  }
  
  .sidebar {
    width: 100%;
    height: 60vh;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 15px;
  }

  .app-header h1 {
    font-size: 1.8rem;
    margin-left: 60px;
    letter-spacing: 1px;
  }
  
  .header-controls {
    gap: 8px;
  }
  
  .nav-btn {
    padding: 5px 8px;
    min-width: 35px;
    height: 35px;
  }
}
