/* Core variables */
:root {
  --primary-bg: #050505;
  --secondary-bg: #0e0e12;
  --accent-color: #0466c8;
  --accent-gradient: linear-gradient(135deg, #0466c8, #0353a4);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a8;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(10, 10, 15, 0.7);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --animation-speed: 0.3s;
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
  height: 100%;
  width: 100%;
  background: var(--primary-bg);
  color: var(--text-primary);
}

/* Canvas styling */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

/* Main app container */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Map styling */
#map-container {
  position: relative;
  transition: transform var(--animation-speed) ease-out;
}

#map {
  background: var(--secondary-bg);
}

.map-overlay {
  background: radial-gradient(circle at center, transparent 30%, var(--primary-bg) 100%);
  z-index: 1;
  opacity: 0.2;
  mix-blend-mode: overlay;
}

/* Video player styling */
#video-container {
  position: relative;
  background: var(--secondary-bg);
  transition: transform var(--animation-speed) ease-out;
}

#videoPlayer {
  background: var(--secondary-bg);
  overflow: hidden;
}

#videoPlayer iframe {
  width: 100%;
  height: 100%;
  background: var(--secondary-bg);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#videoPlayer.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

#videoPlayer.loading iframe {
  opacity: 0.3;
}

.video-overlay {
  background: linear-gradient(to bottom, var(--primary-bg) 0%, transparent 5%, transparent 95%, var(--primary-bg) 100%);
  z-index: 1;
  opacity: 0.3;
  pointer-events: none;
}

/* Location info banner */
.location-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 5px 15px var(--shadow-color);
  z-index: 10;
  text-align: center;
  border: 1px solid var(--border-color);
  font-weight: 500;
  min-width: 240px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Action buttons */
.action-btn {
  position: absolute;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--shadow-color);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px var(--shadow-color);
}

.fullscreen-btn {
  top: 20px;
  right: 20px;
}

/* Custom Leaflet markers */
.custom-marker {
  width: 32px;
  height: 32px;
}

.marker-pin {
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 0 rgba(4, 102, 200, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(4, 102, 200, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(4, 102, 200, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(4, 102, 200, 0);
  }
}

.marker-pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  background: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
  animation: none;
}

/* Intro overlay */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.intro-content {
  text-align: center;
  padding: 2rem;
  max-width: 600px;
}

.logo-container {
  position: relative;
  margin-bottom: 2rem;
  display: inline-block;
}

.main-title {
  font-size: 4rem;
  font-weight: 800;
  margin: 0 0 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  letter-spacing: -1px;
}

.logo-outline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container:hover .logo-outline {
  opacity: 0.5;
  transform: scale(1.05);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 500;
}

.start-button {
  position: relative;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  overflow: hidden;
  outline: none;
  border-radius: 50px;
}

.btn-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 50px;
  z-index: -1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-button:hover .btn-backdrop {
  transform: scale(1.05);
}

.start-button:active .btn-backdrop {
  transform: scale(0.98);
}

.btn-text {
  position: relative;
  z-index: 1;
}

/* Credit tag */
.credit-tag {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: 100;
  border: 1px solid var(--border-color);
  transition: opacity 0.5s ease, transform 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.credit-tag.visible {
  opacity: 0.9;
  pointer-events: auto;
}

.credit-tag:hover {
  background: var(--secondary-bg);
  transform: translateY(-2px);
  opacity: 1;
}

.credit-tag a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.credit-tag a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Remove leaflet attribution */
.leaflet-control-attribution {
  display: none !important;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  /* Adjust font sizes */
  .main-title {
    font-size: 3rem;
  }
  
  .subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  /* Adjust button sizes */
  .action-btn {
    width: 40px;
    height: 40px;
  }
  
  .fullscreen-btn {
    top: 10px;
    right: 10px;
  }
  
  /* Adjust info banner */
  .location-info {
    bottom: 10px;
    padding: 8px 16px;
    min-width: 200px;
    font-size: 0.9rem;
  }
  
  /* Adjust credit position */
  .credit-tag {
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.7rem;
  }
}

/* Smaller screens */
@media (max-width: 480px) {
  .main-title {
    font-size: 2.5rem;
  }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .flex-col {
    flex-direction: row !important;
  }
  
  .w-full.md\:w-1\/2.h-1\/2.md\:h-full {
    width: 50% !important;
    height: 100% !important;
  }
}

/* Animation keyframes for transitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Animations for elements */
.app-container {
  animation: fadeIn 1s ease-out;
}

.location-info {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Leaflet map styles */
.leaflet-container {
  background: var(--secondary-bg) !important;
}

.leaflet-control-zoom {
  margin: 15px !important;
}

.leaflet-control-zoom a {
  background: var(--glass-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.leaflet-control-zoom a:hover {
  background: var(--secondary-bg) !important;
  color: var(--accent-color) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 5px 15px var(--shadow-color) !important;
}

.leaflet-popup-tip {
  background: var(--glass-bg) !important;
  border: 1px solid var(--border-color);
}

/* Loading indicator styles */
.loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  z-index: 100;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.loading .loading-bar {
  opacity: 1;
  animation: loading 2s infinite ease-in-out;
}

@keyframes loading {
  0% { transform: scaleX(0); }
  50% { transform: scaleX(0.5); }
  100% { transform: scaleX(1); }
}
  