/* Responsive Column Layout */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column; /* Stack columns vertically */
  }
  .column1, .column2 {
    width: 100%; /* Make columns full width */
  }
}
/* Scoreboard Table Adjustments */
@media (max-width: 768px) {
  #scoreBoard table {
    font-size: 0.7rem; /* Adjust font size */
  }
  #scoreBoard td {
    padding: 4px; /* Adjust padding */
  }
  #scoreBoard table {
    overflow-x: auto;  /* Enable horizontal scrolling */
  }
}
/* Chart Responsiveness (Adjust as needed) */
@media (max-width: 768px) {
  #scoreChartContainer {
    width: 100%; /* Make chart container full width */
  }
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-size: 16px; /* Base font size */
}

.layout-container {
  display: flex;
  height: 100vh;
}

.persistent-section {
  width: 100%;
  height: 55vh;
  padding: 1rem;
  box-sizing: border-box;
}

.snap-container {
  width: 100%;
  height: 45vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  display: flex;
  flex-direction: column;
}

.snap-page {
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  box-sizing: border-box;
}

#scoreChartContainer, #scoreBoard, #scoreInput {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

#scoreChart {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
  }

  .persistent-section {
    width: 100%;
    height: 55vh;
    padding: 1rem;
    box-sizing: border-box;
  }

  .snap-container {
    width: 100%;
    height: 45vh;
  }
}

.nav-tile, .info-tile {
  padding: 1rem;
}

/* Round info styling */
#roundInfo {
}

#roundName {
  font-size: 1.2rem;
  margin-bottom: 0px;
  padding-bottom: 0px;
}

#roundDescriptor {
  margin-top: -10px;
  padding-top: 0px;
  font-weight: bold;
  color: var(--primary);
  font-size: 3rem; /* Smaller base size for mobile */
}

/* Vertical centering for score input and scoreboard */
#scoreInput, #scoreBoard {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Adjusting input field sizes */
#playerNames input, #scoreInput input, #playerSetup input {
  width: 100%;
  max-width: 200px;
  margin: .5rem;
  margin-left: 0px;
}

#playerNames button, #scoreInput button, #playerSetup button {
  width: 100%;
  max-width: 200px;
  margin: .5rem;
  margin-left: 0px;
}

#scoreInput {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: .5rem;
  padding-left: 0px;
  justify-content: center;
}

#scoreInput input {
  width: 100%;
  max-width: none;
  margin: 0;
}

#scoreInput button {
  grid-column: 1 / -1;
  margin-top: 1rem;
  max-width: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #scoreInput {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
  }
}

@media (min-width: 769px) {
  #scoreInput {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (min-width: 1024px) {
  #scoreInput {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive adjustments */
@media (min-width: 769px) {
  #roundDescriptor {
    font-size: 6rem; /* Larger font size for desktop/tablet */
  }
}

@media (max-width: 768px) {
  #roundDescriptor {
    font-size: 4rem; /* Slightly smaller for mobile */
  }
}

#scoreInput {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  justify-content: center;
}

#scoreInput input {
  width: 100%;
  max-width: none;
  margin: .5rem;
}

#scoreInput button {
  grid-column: 1 / -1;
  margin: .5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #scoreInput {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
  }
}

/* Tablet and larger screens */
@media (min-width: 48em) { /* This is equivalent to 768px */
  .layout-container {
    flex-direction: row;
  }

  .persistent-section {
    width: 33.33%;
    height: 100vh;
  }

  .snap-container {
    width: 66.67%;
    height: 100vh;
  }

  #roundDescriptor {
    font-size: 4rem;
  }

  #scoreInput {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Larger desktop screens */
@media (min-width: 64em) { /* This is equivalent to 1024px */
  #scoreInput {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 48em) {
  #roundDescriptor {
    font-size: 4rem;
  }
}

@media (min-width: 64em) {
  #roundDescriptor {
    font-size: 6rem;
  }
}