:root {
  /* 🔽 smaller card */
  --card-width: 400px;
  --card-height: 520px;
  --transition-duration: 500ms;
  --accent: #2b88c6;
}


html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  font-family: "Poppins", sans-serif;
  /* 🔒 Prevent page from scrolling – globe is full-screen */
  overflow: hidden !important;
}

.app {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  transition: all var(--transition-duration) ease;
}

.app.split {
  grid-template-columns: 1fr var(--card-width);
}

#map {
  width: 100%;
  height: 100%;
}

/* 🌍 Weather Card */
.card {
  position: absolute;
  width: var(--card-width);
  height: var(--card-height);
  left: 50%;
  top: 50%;
  height: 70%
  transform: translate(-50%, -50%) scale(0.95);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: all var(--transition-duration) ease;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.card.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.app.split .card {
  position: relative;
  left: auto;
  top: 70px;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  width: 100%;
  height: 88%;
  border-radius: 0;
  box-shadow: none;
}

.weather-bg {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.topbar {
  position: absolute;
  top: 12px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 3;
  box-sizing: border-box;
}

.topbar button {
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  color: #222;
  transition: background 0.2s;
}

.topbar button:hover {
  background: rgba(255, 255, 255, 0.9);
}

.info-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.4),
    transparent
  );
  padding: 20px 20px 30px;
  box-sizing: border-box;
  text-align: center;
  z-index: 2;
  color: #111;
  perspective: 800px;
}

.info-content {
  position: relative;
  will-change: transform, opacity;
}

.info-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-sub {
  font-size: 1em;
  opacity: 0.8;
  margin-bottom: 14px;
}

.metrics {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1em;
}

.metric {
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 16px;
  border-radius: 12px;
  min-width: 120px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.day-label {
  margin-top: 10px;
  font-size: 1em;
  font-weight: 700;
  color: #333;
}

/* Hide header when embedded inside intro iframe */
body.embedded header {
  display: none;
}

/* 🔍 Search UI (floating, top-left) */
.search-container {
  position: absolute;
  /* leave space for navbar */
  top: 110px;
  left: 18px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(320px, 60vw);
  font-family: inherit;
}

/* When globe is embedded inside intro iframe, header is hidden,
   so we pull the search back up a bit */
body.embedded .search-container {
  top: 24px;
}

.search-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  outline: none;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* 🔍 Results dropdown (Glass style) */
.search-results {
  max-height: 260px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: none;
  animation: fadeIn 0.22s ease-out;
}

.search-results.visible {
  display: block;
}

/* Each result row */
.search-item {
  padding: 10px 14px;
  font-size: 0.92rem;
  color: #e2e8f0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s ease;
}

/* No border on last item */
.search-item:last-child {
  border-bottom: none;
}

/* Hover */
.search-item:hover {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* "No results" style */
.search-item.empty {
  text-align: center;
  color: #cbd5e1;
  cursor: default;
}

/* Fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    translate: 0 4px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* 🧭 NEW: scroll hint for days */
.scroll-day-hint {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #374151;
  opacity: 0.85;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 4px 10px rgba(148, 163, 184, 0.35);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.scroll-day-hint.hidden {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}
