@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

/* Base body style */
body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

html, body {
  min-height: 100vh;
  height: auto;
  width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}

.App {
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  padding: 40px 0;
  min-height: 100vh;
  height: auto;
  flex: 1;
  overflow: visible;
}

.map-page {
  padding: 0 !important;
}

/* Section styles */
.section {
  margin-bottom: 50px;
}

.section h2 {
  color: #1a73e8;
  font-size: 1.8em;
  margin-bottom: 20px;
  border-bottom: 2px solid #e8f0fe;
  padding-bottom: 10px;
}

.section p {
  margin-bottom: 15px;
  text-align: justify;
}

.section a {
  color: #1a73e8;
  text-decoration: none;
}

.section a:hover {
  text-decoration: underline;
}

/* Loading and error states */
.loading {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-size: 1.1em;
}

.error {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
}

/* Reset some default styles */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0 0 1rem 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

select, input, textarea {
  font-family: inherit;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Header Component Styles */
.header {
  background: #4285f4;
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.header-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
  margin: 0.5rem 0 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
}

/* Mobile responsive adjustments for header */
@media (max-width: 480px) {
  .header-title {
    font-size: 2rem;
  }
  
  .header-subtitle {
    font-size: 1rem;
  }
}

/* Navigation Component Styles - Clean and Modern */
.navigation {
  background-color: #ffffff;
  border-bottom: 1px solid #e8eaed;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.navigation .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navigation .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
}

.navigation .nav-item {
  margin: 0;
  position: relative;
}

.navigation .nav-link {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  color: #5f6368;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  background: none;
  border: none;
  position: relative;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  justify-content: center;
}

.navigation .nav-link:hover {
  color: #1a73e8;
  background-color: #f8f9fa;
  text-decoration: none;
  transform: translateY(-1px);
}

.navigation .nav-link.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  background-color: #f8f9fa;
  font-weight: 600;
}

.navigation .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #1a73e8;
  border-radius: 2px 2px 0 0;
}

.navigation .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 115, 232, 0.04);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 8px 8px 0 0;
}

.navigation .nav-link:hover::before {
  opacity: 1;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .navigation .nav-list {
    flex-direction: column;
    gap: 0;
    justify-content: center;
    align-items: center;
  }
  
  .navigation .nav-link {
    padding: 1rem 1.5rem;
    width: 100%;
    justify-content: center;
    border-radius: 0;
    white-space: normal;
  }
  
  .navigation .nav-link:hover {
    transform: none;
  }
  
  .navigation .nav-link.active::after {
    border-radius: 0;
  }
  
  .navigation .nav-link::before {
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .navigation .nav-link {
    padding: 0.875rem 1rem;
    font-size: 0.8rem;
  }
}

/* Modern Dropdown Styles */
select {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background-color: white;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 44px;
  font-weight: 400;
  font-family: Arial, sans-serif;
  margin: 0 8px 8px 0;
}

select:hover {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
}

select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

/* Style for labels that come before select elements */
label {
  font-weight: 500;
  color: #374151;
  margin-right: 8px;
  font-size: 14px;
}

/* Modern Table Styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.table th {
  background: #1a73e8;
  color: white;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #0d47a1;
  text-align: center;
  vertical-align: middle;
}

.table td {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  transition: all 0.2s ease;
  text-align: center;
  vertical-align: middle;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Specific styling for score table */
#score-table {
  table-layout: fixed;
  width: 100%;
  border: none;
}

#score-table th,
#score-table td {
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 16px 12px;
}

#score-table th {
  background: #1a73e8;
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid #0d47a1;
}

#score-table td {
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

#score-table tbody tr:hover {
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#score-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

#score-table tbody tr:last-child td {
  border-bottom: none;
}

/* Scores Page Styles */
.probabilistic-scores {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.probabilistic-scores .section-title {
    color: #1a73e8;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 10px;
}

.probabilistic-scores .widget-menu {
    margin: 30px 0;
}

.probabilistic-scores .widget-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.probabilistic-scores .widget-group {
    display: flex;
    flex-direction: column;
}

.probabilistic-scores .widget-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.probabilistic-scores .widget-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 44px;
    font-weight: 400;
    font-family: Arial, sans-serif;
}

.probabilistic-scores .widget-select:hover {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
}

.probabilistic-scores .widget-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.probabilistic-scores .chart-container {
    margin: 20px auto;
    width: 100%;
    max-width: 1400px;
}

.probabilistic-scores .chart-title {
    font-size: 1.4em;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Overview Section Styles */
.overview-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.overview-section .section-title {
    color: #1a73e8;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 10px;
}

.overview-section p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.6;
}

.overview-section a {
    color: #1a73e8;
    text-decoration: none;
}

.overview-section a:hover {
    text-decoration: underline;
}

/* Paleoclimate Section Styles */
.paleo-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.paleo-section .section-title {
    color: #1a73e8;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 10px;
}

.paleo-section p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.6;
}

.paleo-section a {
    color: #1a73e8;
    text-decoration: none;
}

.paleo-section a:hover {
    text-decoration: underline;
}

/* Input Section Styles */
.input-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.input-section .section-title {
    color: #1a73e8;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 10px;
}

.input-section .widget-menu {
    margin: 30px 0;
}

.input-section .widget-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-section .widget-group {
    display: flex;
    flex-direction: column;
}

.input-section .widget-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.input-section .widget-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 44px;
    font-weight: 400;
    font-family: Arial, sans-serif;
}

.input-section .widget-select:hover {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
}

.input-section .widget-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.input-section .chart-container {
    margin: 20px auto;
    width: 100%;
    max-width: 1400px;
}

.input-section .chart-title {
    font-size: 1.4em;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Enhanced Slider Styles */
.slider-container {
    margin-top: 2em;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

#timeSlider {
    width: 80%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

#timeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a73e8;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#timeSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a73e8;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#sliderLabel {
    font-weight: bold;
    display: block;
    margin-top: 0.5em;
    color: #374151;
}

#year-ticks {
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 10px;
}

#year-ticks span {
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .probabilistic-scores .widget-row,
    .input-section .widget-row {
        grid-template-columns: 1fr;
    }
    
    .slider-container {
        padding: 15px;
    }
    
    #timeSlider {
        width: 90%;
    }
    
    #year-ticks {
        width: 90%;
    }
}

/* Additional styles for existing elements */
main { padding: 2em; }
footer { background: #f2f2f2; text-align: center; padding: 1em; }
.chart { width: 100%; max-width: 800px; height: 400px; margin: 0 auto; }
.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}

#mae-heatmap {
    margin: 0 auto;
    width: 75%;
}