@font-face {
  font-family: Monument;
  src: url(Assets/Font/PPMonumentExtended-Black.otf);
}
@font-face {
  font-family: GeistMono;
  src: url(Assets/Font/GeistMono-Medium.otf);
}

:root {
  --bg-color: #17171b;
  --text-color: #ffffff;
  --accent-color: #ff0000; /* For the 'History' highlights */
  --active-color: #f0f0f0;
  --inactive-color: #c56a2a;
  --font-main: GeistMono;
  --font-title: Monument;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  justify-content: center;
}

canvas {
  transition: opacity 0.3s ease;
}

.main-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  gap: 3px;
  width: 100%;
  overflow: hidden;
}

/* LEFT COLUMN*/
.left-column {
  flex: 2;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.main-title {
  font-family: var(--font-title);
  font-size: 55px;
  line-height: 1.2;
  margin-top: 0;
  margin-left: 25px;
  margin-bottom: 10vh;
  text-transform: uppercase;
}

/* Tri-State Toggle Switch */
.map-controls {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 25px;
  margin-bottom: 20px;
}

.tri-state-toggle {
  display: flex;
  background: #222;
  border-radius: 10px;
  padding: 4px;
  position: relative;
  border: 1px solid #444;
}

.tri-state-toggle input {
  display: none;
}

.tri-state-toggle label {
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 1;
  text-transform: uppercase;
  color: #888;
  transition: color 0.3s;
}
.tri-state-toggle input:checked + label {
  color: white;
}
.legend-item.disabled {
  opacity: 0.2;
  pointer-events: none;
  text-decoration: none !important;
  cursor: default;
}
/* Legend Styling */
.legend {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  color: #bbb;
  z-index: 1005;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}
.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
}
.legend-item:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 5px;
  transition: color 0.3s;
}
.dot.active {
  background-color: var(--active-color);
}
.dot.inactive {
  background-color: var(--inactive-color);
}
.dot.famous {
  border: 2px solid var(--accent-color);
  background: transparent;
}

.legend-item.oactive.selected {
  color: #ffffff;
  text-decoration: underline;
  font-weight: bold;
}
.legend-item.oinactive.selected {
  color: #ffffff;
  text-decoration: underline;
  font-weight: bold;
}
.legend-item.ofamous.selected {
  color: #ffffff;
  text-decoration: underline;
  font-weight: bold;
}
/* Scatterplot */
#scatterplot-container {
  width: 100%;
  flex-grow: 1;
  min-height: 400px; 
  margin-top: -30px;
  margin-left: 10px;
  padding-bottom: 20px; 
}
/* RIGHT COLUMN */
.right-column {
  display: flex;
  flex: 0 0 30vw;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
}
.narration-panel {
  flex: 0 1 auto;
}

.main-title {
  font-family: var(--font-title);
  font-size: clamp(40px, 4vw, 80px);
  line-height: 1.2;
  margin-top: 0;
  margin-left: 25px;
  margin-bottom: clamp(40px, 8vh, 100px);
  text-transform: uppercase;
}

.intro-text {
  font-size: clamp(14px, 1vw, 24px);
  margin-bottom: clamp(30px, 4vh, 70px);
}

.filter-sentence {
  font-size: clamp(18px, 1.4vw, 32px);
  line-height: 1.5;
  margin-bottom: clamp(30px, 4vh, 70px);
}

select {
  background-color: transparent;
  border: 1.5px solid var(--accent-color);
  border-right: 15px solid transparent;
  outline: 1.5px solid var(--accent-color);
  outline-offset: -1.5px;
  text-align: center;
  border-radius: 10px;
  color: var(--accent-color);
  font-family: inherit;
  font-size: clamp(18px, 1.4vw, 32px);
  cursor: pointer;
  margin: 0 6px;
  padding: 0 4px;
}

select:hover {
  background-color: var(--accent-color);
  color: white;
}

#orbits-container {
  width: 100%;
  height: clamp(200px, 28vh, 450px);
  margin-bottom: 5px;
}

.stats-panel {
  margin-top: auto;
  font-size: clamp(14px, 1vw, 24px);
  padding-bottom: clamp(15px, 2vh, 35px);
  padding-top: clamp(15px, 2vh, 35px);
}

.highlight-count {
  color: var(--accent-color);
}



/* LABELS OBJECTS */
.label {
  position: absolute;
  padding: 8px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  border: 1px solid #fff;
  opacity: 0;
  z-index: 2;
}

/* AXIS */
.axis path,
.axis line {
  stroke: #ffffff00;
}

.axis text {
  font-family: var(--font-main);
  font-size: 10px;
  fill: #888888;
}

.x-axis path {
  display: none;
}

.y-axis line {
  stroke: var(--accent-color);
}

.orbit-axis .tick text {
  font-family: var(--font-main);
  font-size: 11px;
  letter-spacing: 1px;
}

#scatterplot-container svg {
  overflow: hidden;
}

/* CREDITS */
 h5 {
  font-size: 12px;
  text-transform: uppercase;
}
.footer {
  display: flex;
  color: var(--bg-color);
  background: #e2e2e2;
  padding: 30px;
}
.footer-section {
  width: 45vw;
}
.footer-section-a {
  width: 15vw;
}

.zoom-hint {
  font-size: 10px;
  color: #888;
  letter-spacing: 2px;
  pointer-events: none;
  margin-left: 25px; 
  padding-bottom: 40px; 
  padding-top: 10px;
}

/* FOOTER OVERLAY */
#main-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  box-sizing: border-box;
  height: auto;
  min-height: 400px;
  background-color: #e2e2e2 !important;
  color: #17171b !important;
  padding: 60px 25px;
  z-index: 9998;
  
  transform: translateY(100%); 
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

#main-footer.open {
  transform: translateY(0); 
}

/* BOTTONE RIGHT COLUMN */
#btn-footer-toggle {
  display: block;
  width: 100%;
  margin-top: 20px;
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 10px 15px;
  cursor: pointer;
  font-family: var(--font-main);
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-align: center;
}

#btn-footer-toggle:hover {
  background: var(--accent-color);
  color: white;
}

/* BOTTONE FOOTER */
#btn-close-footer {
  position: absolute;
  top: 25px;
  right: 25px;
  background: transparent;
  border: 1px solid #17171b;
  color: #17171b;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font-main);
  text-transform: uppercase;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

#btn-close-footer:hover {
  background: #17171b;
  color: #e2e2e2;
}


/* =========================================
   MOBILE / SMALL SCREEN BLOCKER
========================================= */

#mobile-blocker {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  box-sizing: border-box;
}

.blocker-content h2 {
  font-family: var(--font-title);
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.blocker-content p {
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  color: #bbb;
  max-width: 400px;
  margin: 0 auto 10px auto;
}

/* MEDIA QUERY */
@media screen and (max-width: 1024px), screen and (max-height: 650px) {
  #mobile-blocker {
    display: flex;
  }

  .main-layout, 
  #main-footer, 
  .label {
    display: none !important;
  }
}
