html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.topnav {
  background-color: #ffffff;
  padding: 10px 0px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1001;
  height: 60px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-center {
  flex-grow: 1;
  display: flex;
  align-items: left;
  justify-content: left;
  width: 100%;
}

.nav-title {
  margin: 10px;
  font-size: 30px;
  color: #000000;
  font-weight: normal;
  text-align: left;
  padding-left: 15px;
}

.line {
  width: 100%;
  height: 4px;
  background-color: #ff0055;
}

.container {
  padding-top: 0;
  height: auto;
  flex-grow: 1;
  margin: 0;
  display: flex;
  flex-direction: row;
  position: relative;
}

.sidebar {
  border-radius: 25px;
  max-width: 300px;
  background-color: #ffffff;
  overflow-y: auto;
  position: absolute;
  top: 80px;
  left: 20px;
  bottom: 20px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  padding: 20px;
}



.sidebar::-webkit-scrollbar {
  width: 10px;
}

.map {
  flex-grow: 1;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}



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

/* Earthquake Prediction Section Styling */
.prediction-section {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 25px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.prediction-section h2 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-top: 0;
  text-align: center;
}

.prediction-controls {
  background: rgba(255,255,255,0.9);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  gap: 8px;
  align-items: center; 
  flex-wrap: wrap;
}

.button-group-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.year-input {
  width: 80px;
  padding: 8px;
  border: 2px solid #f5576c;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

.predict-btn {
  background: linear-gradient(45deg, #f5576c, #f093fb);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  width: auto;
}


.predict-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(245,87,108,0.4);
}



.prediction-results {
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  padding: 15px;
  min-height: 100px;
}

.prediction-result {
  text-align: center;
}

.prediction-number {
  font-size: 36px;
  font-weight: bold;
  color: #f5576c;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  margin: 10px 0;
}

.prediction-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.prediction-trend {
  margin: 15px 0;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-weight: bold;
  color: #495057;
}

.trend-section {
  margin-top: 20px;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 6px;
  border-left: 4px solid #2196f3;
}

.trend-section h4 {
  margin-top: 0;
  color: #1976d2;
}

.trend-section ul {
  margin: 10px 0;
  padding-left: 20px;
}

.trend-section li {
  margin: 5px 0;
  font-family: monospace;
}

.model-info {
  background: #f1f3f4;
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: #5f6368;
}

/* ------------------
   Design system
   ------------------ */
:root{
  --bg: #f7fafb;
  --surface: #ffffff;
  --muted: #6b7280;
  --primary: #0ea5a4; /* teal */
  --accent: #f5576c; /* coral */
  --card-radius: 12px;
  --shadow: 0 6px 18px rgba(15,23,42,0.08);
  --gap: 14px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: var(--bg);
  color: #111827;
}

/* Sidebar card layout */
.sidebar-inner{
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card{
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15,23,42,0.04);
}
.card-title{
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.search-form{
  display:flex; gap:8px; align-items:center;
}
.search-form input[type="search"]{
  flex:1; padding:10px 12px; border-radius:8px; border:1px solid #e6eef0; background:#fbfeff;
}
.search-btn{ background:var(--primary); color:white; border:none; padding:10px 12px; border-radius:8px; cursor:pointer;}
.search-btn:hover{opacity:0.95}

.prediction-controls{ display:flex; gap:8px; align-items:center; }
.year-input{ padding:8px; border-radius:8px; border:1px solid #e6eef0; width:90px;}
.predict-btn{ background: transparent; color: var(--accent); border: 1px solid rgba(245,87,108,0.15); }
.predict-btn.secondary{ background: transparent; color: var(--accent); border: 1px solid rgba(245,87,108,0.15); }

.legend-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.chip{ display:inline-block; width:14px; height:14px; border-radius:4px; margin-right:8px; vertical-align:middle; }
.quake-chip{ background:#008000; }
.heat-chip{ background:#ff4500; }
.fire-chip{ background:#800080; }
.flood-chip{ background:#0000ff; }

.filter-card .filter-row{ margin:8px 0; }
.filter-row input[type='checkbox']{ margin-right:8px; }
.cluster-k-row input{ width:60px; padding:6px; border-radius:6px; border:1px solid #e6eef0; }

/* Responsive: collapse sidebar under map on small screens */
@media (max-width: 900px){
  .container{ flex-direction: column; }
  .sidebar{ width:100%; max-height: 45vh; overflow:auto; }
  .map{ height: 55vh; }
}

/* Spinner styles */
.spinner{ width:40px; height:40px; border-radius:50%; border:4px solid rgba(0,0,0,0.08); border-top-color:var(--primary); animation:spin 1s linear infinite; margin-top:8px; }
.spinner.small{ width:24px; height:24px; border-width:3px; }
.hidden{ display:none; }
@keyframes spin{ from{transform:rotate(0deg)} to{transform:rotate(360deg)} }


