/* Import a beautiful font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    font-family: 'Poppins', Arial, sans-serif; /* Update font to Poppins */
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9eadb; /* Slightly whiter champagne-like color */
}

/* Update font styles for headings and text */
h1, h2 {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    font-size: 1.8rem; /* Adjust heading size */
}

p, label, select, button {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 300;
    font-size: 0.9rem; /* Adjust text size */
}

h1 {
    color: #333;
    margin-bottom: 30px;
}

.visualization-section {
    width: 95%;
    margin-bottom: 40px;
    padding: 15px; /* Adjust padding */
    background-color: #f0f0f0; /* Slightly darker shade */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.visualization-section h2 {
    color: #333; /* Match text color to the background */
    margin-top: 0;
}

/* Scatter Plot Styles */
.main-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    height: auto;
    margin: 20px auto;
    gap: 10px; /* Adjust gap */
}

#scatter-legend-container {
    flex: 0 0 16%; /* Reduce width */
    background-color: #f9f9f9;
    border: 4px solid #ccc;
    border-radius: 10px;
    padding: 10px; /* Adjust padding */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    font-size: 12px; /* Reduce font size */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    height: auto;
    margin-left: 5px;
    max-height: 78vh; /* Reduce height */
}

.scatter-container {
    flex: 0 0 50%; /* Reduce width */
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    max-height: 78vh; /* Reduce height */
}

#scatter-plot {
    width: 100%;
    height: 65vh; /* Reduce height */
    border: 7px solid #ccc;
    border-radius: 10px;
}

.club-info {
    flex: 0 0 16%; /* Reduce width */
    padding: 10px; /* Adjust padding */
    border: 4px solid #ccc;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    color: #333;
    text-align: center;
    height: auto;
    margin-right: 20px;
    max-height: 78vh; /* Reduce height */
    font-size: 12px; /* Reduce font size */
}

.club-info img {
    width: 70%;
    height: auto;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.club-info h3 {
    font-size: 20px;
    margin: 10px 0;
    color: #333; /* Update color to #333 */
}

.club-info p {
    font-size: 14px;
    margin: 5px 0;
    color: #555;
}

.club-info p span {
    font-weight: bold;
    color: #333;
}

/* Heatmap Styles */
.map-container {
    display: flex;
    width: 100%;
    height: 600px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    position: relative;
}

#map {
    flex: 3;
    width: 100%;
    height: 100%;
    position: relative;
}

.country-info {
    flex: 1;
    padding: 15px;
    border-left: 1px solid #ddd;
    overflow-y: auto;
    font-size: 14px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.country-info h1 {
    margin: 0 0 10px 0;
    color: #333;
}

.country-info p {
    margin: 5px 0;
    line-height: 1.5;
}

.country-info h1 {
    color: #333;
}

.legend {
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0.9;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button {
    background-color: #f9eadb; /* Replace button background color */
    color: #333; /* Match text color */
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #e6d3c5; /* Slightly darker shade for hover */
}

.controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 20px 0;
    align-items: center;
}

.zoom-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Common timeline styles */
.timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f9eadb, #e6d3c5); /* Gradient in the same color palette */
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.timeline-btn {
    background: white;
    color: #333; /* Match text color to the background */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timeline-btn:hover {
    background-color: #e0f7ff;
}

.timeline-years {
    display: flex;
    gap: 15px;
    margin: 0 20px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #666; /* Slightly grayish color */
}

.timeline-years span {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    transition: background 0.3s, color 0.3s;
}

.timeline-years span.active {
    background: #f9eadb; /* Replace active background color */
    color: #333; /* Match text color */
    font-weight: bold;
}

.timeline-years span:hover {
    background: #f9eadb; /* Replace hover background color */
    color: #333; /* Match text color */
}

.toggle-container {
    display: flex;
    align-items: center;
    margin: 10px 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #333;
}

.toggle-container input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f9eadb; /* Set checkbox color */
}

.toggle-label {
    cursor: pointer;
}

.axis-selectors {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.axis-selectors label {
    font-weight: bold;
    font-size: 14px;
}

.axis-selectors select {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

/* Map specific styles */
.country {
    stroke: rgb(79, 96, 102);
    stroke-width: 0.75px;
}

.selectedCountry {
    stroke: #f07004;
    stroke-width: 1.8px;
}

#country-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#country-info-table th, #country-info-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#country-info-table th {
    background-color: #f4f4f9;
    font-weight: bold;
}

/* Timeline buttons for Heatmap */
#heatmap-section .timeline button {
    background-color: #f9eadb; /* Replace button background color */
    color: #333; /* Match text color */
    border: 1px solid #333; /* Update border color to #333 */
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s, color 0.3s;
}

#heatmap-section .timeline button:hover {
    background-color: #e6d3c5; /* Slightly darker shade for hover */
    color: #0056b3;
}

#heatmap-section #current-year {
    color: #333; /* Match text color */
}

#heatmap-section .timeline > * {
    margin: 0 10px;
}

/* Title Segment Styles */
.title-segment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh; /* Full viewport height */
    color: #333; /* Dark text color */
    padding: 20px;
    box-shadow: none; /* Remove shadow */
}

.title-segment h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.title-segment p {
    font-size: 1.5rem;
    line-height: 1.8;
    max-width: 800px;
}

.title-segment button {
    background-color: #6c757d; /* Less bright grayish color */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.title-segment button:hover {
    background-color: #5a6268; /* Slightly darker on hover */
}

/* Add smooth scrolling for better transition to visualizations */
html {
    scroll-behavior: smooth;
}