/* Chart Container Styles */
#core-v-acc-piechart-container {
  width: 100%;
  height: 70%;
  min-height: 250px;
}

#strain-v-gene-barchart-container {
  width: 100%;
  height: 100%;
  min-height: 350px;
  display: block;
}

#heaps-law-chart-container {
  width: 100%;
  height: 100%;
  min-height: 350px;
  display: block;
}

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

body, html {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
}

/* Page Layout */
#page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

#content-wrap {
  flex: 1 0 auto;
  width: 100%;
  padding: 40px; /* Reduced top padding */
}

/* Container Layout */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 0.07fr 2.93fr;
  gap: 12px;
  padding: 0;
  width: 98%;
  max-width: 98%;
  margin: 0 auto;
  grid-template-areas:
    "select_species_area species_name_area ."
    "charts_and_tables_area charts_and_tables_area charts_and_tables_area";
}

.species_name_area {
  grid-area: species_name_area;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 25px; /* Reduced from 65px */
}

/* UPDATED: New grid layout for charts_and_tables_area */
.charts_and_tables_area {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  grid-template-rows: 0.2fr 0.2fr 0.9fr auto;
  gap: 20px;
  padding-left: 1%;
  padding-right: 1%;
  grid-template-areas:
    "core_v_acc_area core_bgc_area"
    ". maximum_bgc_area"
    "charts_area charts_area"
    "gene_cluster_table_area gene_cluster_table_area";
  grid-area: charts_and_tables_area;
  width: 98%;
  max-width: 98%;
  margin: 0 auto;
}

/* Enhanced Container Styles */
.core_v_acc_area,
.core_bgc_area,
.maximum_bgc_area,
.gene_cluster_table_area,
#dc_trees,
#presence_absence_container,
#dc_meta_info,
.domain_vis_container,
#cluster_vis_container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 35px 28px 28px 28px; /* Increased top padding */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
  width: 98%;
  max-width: 98%;
  margin-left: auto;
  margin-right: auto;
}

/* Add this new style for the gene_cluster_table_area to create more explicit spacing */
.gene_cluster_table_area {
  margin-bottom: 50px !important; /* Force more space after the table */
  margin-top: -250px !important; /* Added top margin to create more space from charts above */
}

/* Fix for presence absence container to ensure it's properly separated */
#dc_trees {
  width: 92%;
  max-width: 92%; 
  overflow: visible !important; /* Changed from overflow-x: hidden */
  margin-top: 65px !important; /* Force more space before this element */
  padding-top: 50px !important; /* Add extra padding at the top */
  border-top: 3px solid #e0e5ec; /* More visible divider */
}

/* New specific selector for the presence/absence heatmap container */
#presence_absence_container {
  width: 92%;
  max-width: 92%; 
  overflow: visible !important; /* Changed from overflow-x: hidden to allow tooltips to display */
  margin-top: 150px !important; /* Increased from 115px to 150px for more space */
  padding-top: 50px !important;
  border-top: 3px solid #e0e5ec;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 35px 28px 28px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
}

#presence_absence_container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* Fix for tooltips in the presence/absence container */
#presence_absence_container .tooltip-container {
  position: relative;
}

#presence_absence_container .tooltip-text {
  position: absolute;
  z-index: 1050; /* Higher z-index to ensure visibility */
  bottom: 135%; /* Position further up from the icon */
  transform: translateY(-10px); /* Additional upward shift */
}

/* Additional styling for tooltip in these containers to ensure visibility */
#presence_absence_container .tooltip-container:hover .tooltip-text,
#dc_trees .tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
}

.core_v_acc_area:hover,
.core_bgc_area:hover,
.maximum_bgc_area:hover,
.gene_cluster_table_area:hover,
#dc_trees:hover,
#presence_absence_container:hover,
#dc_meta_info:hover,
.domain_vis_container:hover,
#cluster_vis_container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* Section Title Styles */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0 15px 0; /* Improved vertical padding */
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.section-title h3 {
  font-size: 18px;
  color: #2c3e50;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
}

.section-title h3 i {
  margin-right: 10px;
  color: #1abc9c;
}

/* Enhanced section title styling to match Query.html */
.alert.alert-info {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  padding: 12px 0;
  border-bottom: 2px solid #f0f0f0;
  font-family: 'Roboto', sans-serif;
}

.alert i {
  margin-right: 10px;
  color: #1abc9c;
}

/* Hide collapse buttons but keep them in the DOM */
.alert-button-collapse {
  display: none !important;
}

/* Tooltip styling */
.tooltip-container {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

.tooltip-icon {
  font-size: 18px;
  color: #95a5a6;
  cursor: help;
  position: relative;
  transition: color 0.3s ease;
}

.tooltip-icon:hover {
  color: #1abc9c;
}

.tooltip-text {
  visibility: hidden;
  width: 250px;
  background-color: #34495e;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -125px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
  font-weight: normal;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #34495e transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Adjust alert container padding */
.alert_windowbar_container {
  padding: 0 28px;
  margin-top: 10px;
}

/* Area-specific layouts */
.core_v_acc_area {
  display: grid;
  grid-template-columns: 2.9fr;
  grid-template-rows: 0.1fr 2.7fr 0.1fr;
  gap: 12px;
  padding: 0;
  grid-template-areas:
    "core_v_acc_caption_area"
    "core_v_acc_data_area"
    ".";
  grid-area: core_v_acc_area;
}

.core_v_acc_caption_area {
  grid-area: core_v_acc_caption_area;
  padding: 5px 28px 0 28px; /* Added top padding */
}

.core_v_acc_data_area {
  grid-area: core_v_acc_data_area;
  min-height: 250px; /* Reduced from 400px since it's now smaller */
  height: 100%;
  padding: 0 28px;
}

/* NEW: Core BGC area styles */
.core_bgc_area {
  display: grid;
  grid-template-columns: 2.9fr;
  grid-template-rows: 0.05fr 2.7fr 0.05fr;
  gap: 12px;
  padding: 0;
  max-height: 300px;
  grid-template-areas:
    "core_bgc_caption_area"
    "core_bgc_data_area"
    ".";
  grid-area: core_bgc_area;
}

.core_bgc_caption_area {
  grid-area: core_bgc_caption_area;
  padding: 5px 28px 0 28px;
}

.core_bgc_data_area {
  grid-area: core_bgc_data_area;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  height: 150px;
  scrollbar-width: thin;
  scrollbar-color: #95a5a6 #f5f5f5;
  padding: 0 28px;
}

.core_bgc_data_area::-webkit-scrollbar {
  height: 8px;
}

.core_bgc_data_area::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}

.core_bgc_data_area::-webkit-scrollbar-thumb {
  background-color: #95a5a6;
  border-radius: 10px;
  border: 2px solid #f5f5f5;
}

/* NEW: Maximum BGC area styles */
.maximum_bgc_area {
  display: grid;
  grid-template-columns: 2.9fr;
  grid-template-rows: 0.05fr 0.35fr 1fr;
  margin-top: -390px;
  padding: 0px;
  max-height: 350px;
  grid-template-areas:
    "maximum_bgc_caption_area"
    "maximum_bgc_data_area"
    ".";
  grid-area: maximum_bgc_area;
}

.maximum_bgc_caption_area {
  grid-area: maximum_bgc_caption_area;
  padding: 5px 28px 0 28px;
}

.maximum_bgc_data_area {
  grid-area: maximum_bgc_data_area;
  overflow-x: scroll;
  white-space: nowrap;
  height: 220px; /* Further increased height to accommodate all content */
  overflow-y: visible; /* Allow content to be visible */
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #95a5a6 #f5f5f5;
  padding: 0 28px;
  margin-bottom: 20px; /* Maintain bottom margin */
}

.maximum_bgc_data_area::-webkit-scrollbar {
  height: 8px;
}

.maximum_bgc_data_area::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}

.maximum_bgc_data_area::-webkit-scrollbar-thumb {
  background-color: #95a5a6;
  border-radius: 10px;
  border: 2px solid #f5f5f5;
}

/* NEW: Charts area styles */
.charts_area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 20px;
  padding: 0;
  grid-template-areas:
    "pangenome_chart_area heaps_law_chart_area";
  grid-area: charts_area;
  min-height: 400px;
}

.pangenome_chart_area {
  display: grid;
  grid-template-columns: 2.9fr;
  grid-template-rows: 0.05fr 2.7fr 0.05fr;
  gap: 12px;
  margin-top: -170px;
  max-height: 500px;
  

  padding: 0;
  grid-template-areas:
    "pangenome_chart_caption_area"
    "pangenome_chart_data_area"
    ".";
  grid-area: pangenome_chart_area;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 35px 28px 28px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pangenome_chart_caption_area {
  grid-area: pangenome_chart_caption_area;
  padding: 5px 28px 0 28px;
}

.pangenome_chart_data_area {
  grid-area: pangenome_chart_data_area;
  padding: 0 28px;
  height: 100%;
  min-height: 300px;
}

.heaps_law_chart_area {
  display: grid;
  grid-template-columns: 2.9fr;
  grid-template-rows: 0.05fr 2.7fr 0.05fr;
  gap: 12px;
  margin-top: -170px;
  max-height: 500px;
  padding: 0;
  grid-template-areas:
    "heaps_law_chart_caption_area"
    "heaps_law_chart_data_area"
    ".";
  grid-area: heaps_law_chart_area;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 35px 28px 28px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.heaps_law_chart_caption_area {
  grid-area: heaps_law_chart_caption_area;
  padding: 5px 28px 0 28px;
}

.heaps_law_chart_data_area {
  grid-area: heaps_law_chart_data_area;
  padding: 0 28px;
  height: 100%;
  min-height: 300px;
}

.pangenome_chart_area:hover,
.heaps_law_chart_area:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

#strain-v-gene-barchart-container canvas {
  z-index: 1;
}

.gene_cluster_table_area {
  display: grid;
  grid-template-columns: 3fr;
  grid-template-rows: 1fr;
  gap: 12px;
  padding: 0;
  margin-top: -300px; /* Adjusted to prevent overlap with charts */
  justify-items: center;
  align-items: center;
  grid-template-areas:
    "gene_cluster_table_caption_area"
    "gene_cluster_table_data_area"
    ".";
  grid-area: gene_cluster_table_area;
  width: 100%;
  height: 600px;
}

.gene_cluster_table_caption_area {
  grid-area: gene_cluster_table_caption_area;
  width: 100%;
  padding: 5px 28px 0 28px;
}

.gene_cluster_table_data_area {
  grid-area: gene_cluster_table_data_area;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 28px;
}

/* Improved heatmap container styling */
.heatmap-container {
  overflow-x: scroll;
  scrollbar-width: thin;
  scrollbar-color: #95a5a6 #f5f5f5;
  border-radius: 8px;
}

.heatmap-container::-webkit-scrollbar {
  height: 8px;
}

.heatmap-container::-webkit-scrollbar-thumb {
  background-color: #95a5a6;
  border-radius: 10px;
}

.heatmap-container:hover::-webkit-scrollbar-thumb {
  background-color: #7f8c8d;
}

.charts_and_tables_area {
  height: auto;
}

/* Collapsed elements */
.collapsed {
  height: 0;
  padding: 0;
  overflow: hidden;
  transition: height 0.3s ease, padding 0.3s ease;
}

/* Elements for index.html */
.container_index {
  display: grid;
  grid-template-columns: 0.4fr 0.7fr 1.9fr;
  grid-template-rows: 0.07fr 1fr;
  gap: 12px;
  padding: 0 15px;
  max-width: 1400px;
  margin: 0 auto;
  grid-template-areas:
    "index_select_species_area index_species_name_area index_loading_bar_area"
    "logo_area logo_area logo_area";
}

.index_select_species_area {
  grid-area: index_select_species_area;
}

.index_species_name_area {
  grid-area: index_species_name_area;
}

.index_loading_bar_area {
  grid-area: index_loading_bar_area;
}

.logo_area {
  grid-area: logo_area;
}

/* Style for gene arrows - Enhanced */
.gene-arrow {
  cursor: pointer;
  transition: fill 0.3s ease, stroke 0.3s ease;
}

.gene-arrow:hover {
  fill: #f39c12;
}

.gene-arrow-selected {
  stroke: #3498db;
  stroke-width: 2;
}

/* Checkbox and label styling */
#singleBGCCheckbox {
  margin-right: 8px;
  cursor: pointer;
}

.maximum_bgc_data_area label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 5px; /* Reduced from 15px to 5px */
  padding: 6px 10px; /* Reduced padding from 8px 12px to 6px 10px */
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e5ec;
  font-size: 14px;
  color: #2c3e50;
  transition: all 0.2s ease;
}

.maximum_bgc_data_area label:hover {
  background-color: #e8f6f3;
  border-color: #1abc9c;
}

.checkbox-container {
  position: sticky;
  top: 0;
  left: 0;
  background-color: white;
  overflow-x: auto;
  padding: 5px 0; /* Reduced padding from 10px to 5px */
  margin-bottom: 5px; /* Reduced margin from 10px to 5px */
  z-index: 10;
  display: block;
  width: 100%;
  clear: both;
}

#gene-cluster-svg {
  display: block; /* Changed from inline-block to block for better spacing */
  margin-top: 0; /* Removed margin-top to reduce spacing */
  max-height: 250px; /* Increased height to show all content */
  width: auto;
}

/* Species selection area styling */
.select_species_area {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.select_species_area .dropdown {
  display: inline-block;
  margin-bottom: 15px;
}

.annotation-library-dropdown {
  display: flex;
  align-items: center;
  margin-left: 0;
  width: fit-content;
  margin-top: 25px; /* Reduced from 65px */
}

.annotation-library-dropdown select {
  padding: 12px 15px;
  font-size: 14px;
  width: 250px;
  margin-right: 10px;
  border: 1px solid #e0e5ec;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  color: #2c3e50;
}

.annotation-library-dropdown select:hover {
  border-color: #1abc9c;
}

.annotation-library-dropdown select:focus {
  outline: none;
  border-color: #1abc9c;
  box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.15);
}

.annotation-library-dropdown span {
  white-space: nowrap;
  display: inline-block;
}

/* Enhanced dropdown button */
#annotation-library-dropdown {
  background: linear-gradient(135deg, #5470c6, #3d58a8);
  color: white;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(84, 112, 198, 0.3);
}

#annotation-library-dropdown:hover {
  background: linear-gradient(135deg, #3d58a8, #304786);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(84, 112, 198, 0.4);
}

#annotation-library-dropdown:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(84, 112, 198, 0.3);
}

#annotation-library-dropdown option {
  background-color: white;
  color: #2c3e50;
  padding: 10px;
}

.dropdown {
  padding-left: 9%;
  padding-top: 15px;
}

/* Tutorial section styling */
#tutorial-section {
  background-color: #f9f9f9;
  padding: 28px;
  border-radius: 12px;
  margin: 30px auto;
  width: 80%;
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#tutorial-section:hover {
  transform: translateY(-5px);
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.12);
}

#tutorial-section h2 {
  color: #2c3e50;
  font-size: 28px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

#tutorial-section h3 {
  color: #34495e;
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 15px;
}

#tutorial-section p {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 20px;
}

#tutorial-section a {
  color: #307f5a;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

#tutorial-section a:hover {
  color: #2c3e50;
  text-decoration: underline;
}

/* Main Content Wrapper - Enhanced */
#main-content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  height: calc(100vh - 65px);
  padding-top: 30px;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar Navigation - Enhanced */
#sidebar {
  position: fixed;
  top: 80px;
  left: 5%;
  width: 250px;
  height: calc(100vh - 145px);
  overflow-y: auto;
  background-color: #ffffff;
  padding: 28px;
  border-radius: 12px;
  border: 1px solid #e0e5ec;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: all 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: #95a5a6 #f5f5f5;
}

#sidebar:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}

#sidebar::-webkit-scrollbar-thumb {
  background-color: #95a5a6;
  border-radius: 10px;
  border: 2px solid #f5f5f5;
}

/* Sidebar List Styles - Enhanced */
#sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar ul li {
  margin-bottom: 20px;
}

#sidebar ul li a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  transition: all 0.3s ease;
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
}

#sidebar ul li a:hover {
  color: #307f5a;
  background-color: rgba(48, 127, 90, 0.05);
  padding-left: 15px;
}

/* Sidebar Title Style */
#sidebar ul > li > a {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
}

/* Sidebar Subtitle Style */
#sidebar ul ul {
  padding-left: 15px;
  margin-top: 10px;
  margin-bottom: 10px;
  display: block;
  list-style: none;
}

#sidebar ul ul li {
  margin-bottom: 8px;
}

#sidebar ul ul li a {
  font-size: 15px;
  font-weight: 500;
  color: #34495e;
  padding-left: 15px;
  line-height: 1.4;
  transition: all 0.3s ease;
  border-left: 2px solid transparent;
}

#sidebar ul ul li a:hover {
  color: #307f5a;
  border-left: 2px solid #307f5a;
}

/* Active style */
#sidebar a.active {
  font-weight: bold;
  color: #307f5a;
  background-color: rgba(48, 127, 90, 0.1);
  border-left: 4px solid #307f5a;
  padding-left: 15px;
}

/* Show subtitles */
#sidebar ul ul.show {
  display: block;
}

/* Video Container */
.tutorial-video-container {
  width: 100%;
  max-width: calc(100% - 40px);
  margin: 30px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.tutorial-video-container video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
}

/* Tutorial Content Area - Enhanced */
#tutorial-content {
  position: fixed;
  top: 80px;
  left: calc(5% + 280px);
  width: calc(90% - 330px);
  height: calc(100vh - 145px);
  padding: 30px;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid #e0e5ec;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  z-index: 999;
  transition: all 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: #95a5a6 #f5f5f5;
}

#tutorial-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

#tutorial-content::-webkit-scrollbar {
  width: 8px;
}

#tutorial-content::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 10px;
}

#tutorial-content::-webkit-scrollbar-thumb {
  background-color: #95a5a6;
  border-radius: 10px;
  border: 2px solid #f5f5f5;
}

/* Tutorial Content Headings */
#tutorial-content h2 {
  font-size: 26px;
  color: #2c3e50;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

#tutorial-content p {
  font-size: 17px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 25px;
}

/* Animations and Smooth Scrolling */
html {
  scroll-behavior: smooth;
  overflow-y: hidden;
}

html, body {
  height: 100%;
}

/* Button Styles */
.copy-btn {
  cursor: pointer;
  background: linear-gradient(135deg, #307f5a, #2ecc71);
  color: white;
  border: none;
  padding: 10px 16px;
  margin-left: 10px;
  font-size: 14px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(46, 204, 113, 0.2);
}

.copy-btn:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(46, 204, 113, 0.3);
}

.copy-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.inline-code {
  background: #f4f4f4;
  padding: 15px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  white-space: pre-wrap;
  color: #34495e;
  border: 1px solid #e0e5ec;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

th {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 15px 18px;
  text-align: left;
  font-weight: 600;
  border: none;
}

td {
  background-color: #ffffff;
  padding: 14px 18px;
  border-bottom: 1px solid #ecf0f1;
  transition: background-color 0.2s ease;
}

tr:nth-child(even) td {
  background-color: #f9fafb;
}

tr:hover td {
  background-color: #e8f6f3;
}

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

tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}

tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}

/* Media Queries for Responsiveness */
@media (max-width: 991px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "select_species_area"
      "species_name_area"
      "charts_and_tables_area";
  }
  
  .charts_and_tables_area {
    grid-template-columns: 1fr;
    grid-template-areas:
      "core_v_acc_area"
      "core_bgc_area"
      "maximum_bgc_area"
      "charts_area"
      "gene_cluster_table_area";
  }
  
  
  #sidebar, #tutorial-content {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }
  
  #main-content {
    flex-direction: column;
  }
}

/* Animation for loading and transitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

.fadeInUp {
  animation: fadeInUp 0.5s ease forwards;
}

#strain-v-gene-barchart-container {
  width: 100% !important;
  height: 350px !important;
  min-height: 350px !important;
  display: block !important;
  overflow: visible !important;
  position: relative !important;
}

#dc_trees {
  width: 92%;
  max-width: 92%; 
  overflow: visible !important;
  margin-top: 65px !important;
  padding-top: 50px !important;
  border-top: 3px solid #e0e5ec;
}

#dc_meta_info {
width: 92%;
max-width: 92%;
}
.domain_vis_container {
  width: 92%;
  max-width: 92%;
}
#cluster_vis_container {
  width: 92%;
  max-width: 92%;
}