/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;900&family=Space+Mono:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, #0a1128 0%, #001f54 50%, #034078 100%);
  color: #e8f4f8;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.08;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 50px,
    rgba(136, 196, 215, 0.4) 50px,
    rgba(136, 196, 215, 0.4) 51px
  );
  animation: wave 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes wave {
  0% { transform: translateX(0); }
  100% { transform: translateX(100px); }
}

/* Header */
.header {
  padding: 32px 48px;
  border-bottom: 1px solid rgba(232, 244, 248, 0.1);
  backdrop-filter: blur(10px);
  background: rgba(10, 17, 40, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #06d6a0 0%, #1b9aaa 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

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

.logo h1 {
  font-size: 32px;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #06d6a0 0%, #88c4d7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo p {
  font-size: 13px;
  margin: 0;
  opacity: 0.7;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-container {
  position: relative;
}

.search-input {
  padding: 12px 40px 12px 16px;
  background: rgba(232, 244, 248, 0.05);
  border: 1px solid rgba(232, 244, 248, 0.1);
  border-radius: 10px;
  color: #e8f4f8;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  width: 250px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #06d6a0;
  background: rgba(232, 244, 248, 0.08);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}

.btn {
  padding: 12px 24px;
  background: rgba(6, 214, 160, 0.2);
  border: 1px solid #06d6a0;
  border-radius: 10px;
  color: #e8f4f8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

.btn:hover {
  background: rgba(6, 214, 160, 0.3);
}

/* Footer */
.footer {
  background: rgba(10, 17, 40, 0.8);
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid rgba(232, 244, 248, 0.1);
  margin-top: 60px;
}

.footer p {
  margin: 0 0 8px 0;
  font-size: 14px;
  opacity: 0.7;
}

.footer a {
  color: #06d6a0;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
  flex-wrap: wrap;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(6, 214, 160, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(6, 214, 160, 0.3);
  transition: all 0.2s;
}

.linkedin-link:hover {
  background: rgba(6, 214, 160, 0.2);
  transform: translateY(-2px);
  text-decoration: none;
}

.linkedin-logo {
  width: 20px;
  height: 20px;
}

/* Main Content */
.main-content {
  padding: 48px 48px 120px;
  position: relative;
  z-index: 1;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
  animation: fadeIn 0.6s ease-out;
}

.stat-card {
  padding: 24px;
  border-radius: 16px;
  animation: fadeIn 0.7s ease-out;
}

/* Island Filter */
.island-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.island-btn {
  padding: 10px 20px;
  background: rgba(232, 244, 248, 0.05);
  border: 1px solid rgba(232, 244, 248, 0.1);
  border-radius: 20px;
  color: #e8f4f8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.island-btn.active {
  background: rgba(6, 214, 160, 0.2);
  border-color: #06d6a0;
}

/* Score Filter Buttons */
.score-filter-btn {
  padding: 14px 24px;
  background: rgba(232, 244, 248, 0.05);
  border: 1px solid rgba(232, 244, 248, 0.1);
  border-radius: 12px;
  color: #e8f4f8;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.score-filter-btn:hover {
  background: rgba(232, 244, 248, 0.1);
  border-color: rgba(232, 244, 248, 0.2);
  transform: translateY(-2px);
}

.score-filter-btn.active {
  background: rgba(6, 214, 160, 0.2);
  border-color: #06d6a0;
}

/* Map View */
.map-view {
  display: flex;
  gap: 24px;
  height: 600px;
  margin-bottom: 48px;
}

.google-map {
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(232, 244, 248, 0.1);
}

.map-sidebar {
  width: 350px;
  background: rgba(232, 244, 248, 0.04);
  border: 1px solid rgba(232, 244, 248, 0.1);
  border-radius: 16px;
  padding: 24px;
  overflow-y: auto;
}

.site-list {
  margin-top: 16px;
}

.site-list-item {
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(232, 244, 248, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.site-list-item:hover {
  background: rgba(6, 214, 160, 0.1);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
}

.dive-card {
  background: rgba(232, 244, 248, 0.04);
  border: 1px solid rgba(232, 244, 248, 0.1);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s ease-out;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dive-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 80px 20px;
  animation: fadeIn 0.5s ease-out;
}

.loading-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #06d6a0 0%, #1b9aaa 100%);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  animation: fadeIn 0.4s ease-out;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 17, 40, 0.95);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(1, 31, 84, 0.95) 0%, rgba(3, 64, 120, 0.95) 100%);
  border: 1px solid rgba(232, 244, 248, 0.15);
  border-radius: 24px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  padding: 40px;
  margin: 5vh auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(232, 244, 248, 0.1);
  border: 1px solid rgba(232, 244, 248, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: #e8f4f8;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(232, 244, 248, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 20px 24px;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .main-content {
    padding: 32px 24px 80px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .map-view {
    flex-direction: column;
    height: auto;
  }
  
  .map-sidebar {
    width: 100%;
    max-height: 300px;
  }
  
  .search-input {
    width: 100%;
  }
}

/* Leaflet Map Customization */
.leaflet-container {
  font-family: 'Outfit', sans-serif;
  background: #001f54 !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(10, 17, 40, 0.98);
  color: #e8f4f8;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content {
  margin: 16px;
  color: #e8f4f8;
}

.leaflet-popup-tip {
  background: rgba(10, 17, 40, 0.98);
}

.leaflet-control-attribution {
  background: rgba(10, 17, 40, 0.7) !important;
  color: #e8f4f8 !important;
  font-size: 10px;
}

.leaflet-control-attribution a {
  color: #06d6a0 !important;
}

.leaflet-control-zoom {
  border: 1px solid rgba(232, 244, 248, 0.1) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: rgba(10, 17, 40, 0.9) !important;
  color: #e8f4f8 !important;
  border-bottom: 1px solid rgba(232, 244, 248, 0.1) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(6, 214, 160, 0.2) !important;
}

/* Animated marker hover */
.leaflet-marker-icon {
  transition: all 0.2s ease;
}

.leaflet-marker-icon:hover {
  transform: scale(1.3);
  z-index: 1000 !important;
}

/* Site list item hover effect */
.site-list-item {
  transition: all 0.2s ease;
}

.site-list-item:hover {
  transform: translateX(4px);
  background: rgba(6, 214, 160, 0.1) !important;
}
