:root {
  color-scheme: light;
  --bg: #f4f6fb;
  /* --bg: white; */
  --panel: #ffffff;
  --panel-strong: #1f2d44;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --text: #14213d;
  --muted: #64748b;
  --border: #dbe4f0;
  --text-light: #f8fafc;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, var(--bg) 100%);
  color: var(--text);
}

.container {
  display: grid;
  grid-template-columns: auto 1fr; 
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.container:has(.left-bar[style*="display: none"]) {
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.left-bar {
  grid-row: 1 / span 2;
  background: var(--panel-strong);
  color: #fff;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  /* gap: 3vh; */
  box-shadow: var(--shadow);
  z-index: 1;
  width: 320px;
  max-width: 320px;
  transition: width 180ms ease, max-width 180ms ease, padding 180ms ease, opacity 180ms ease;
  z-index: 10 !important;
}

.left-bar[style*="display: none"] {
  display: none !important;
  width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  
}

#set-selector {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2vh;
}

#set-selector option {
  color: var(--text);
  background: #ffffff;
}

#song-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  /* gap: 1vh; */
 
  overflow-y: auto;
  padding-right: 4px;
}

#song-list li {
  margin: 0;
  font-family: "overpass", sans-serif;
  margin-bottom: 1vh;
}

#song-list a {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background 160ms ease, transform 160ms ease;
}
#song-list a:hover,
#song-list a:focus-visible {
  background: rgba(255,255,255,0.28);
  transform: translateX(2px);
  outline: none;
}
.selected-song {
  background: rgba(255,255,255,0.35) !important;
  /* background: green !important; */
  transform: translateX(2px);
  outline: none;
}
.top-bar {
  /* grid-column: 2; */
  background: var(--panel-strong);
  /* padding: 16px 20px; */
  padding: 16px 0px;

  display: flex;
  align-items: center;
  /* gap: 12px; */
  border-bottom: 1px solid var(--border);
  min-width: 100vw;
  width: 100%;
}
#toggle-button{
  margin-left:2px;
}
.top-bar button,
#toggle-button,
#previous-button,
#next-button {
  border: none;
  /* border-radius: 999px; */
  background: var(--panel-strong);
  color: white;
  min-width: 46px;
  min-height: 46px;
  padding: 0 14px;
  font-size: 3.rem;
  font-weight: 700;
  cursor: pointer;
  /* box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2); */
  /* transition: transform 160ms ease, background 160ms ease; */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-bar button:hover,
.top-bar button:focus-visible,
#toggle-button:hover,
#toggle-button:focus-visible,
#previous-button:hover,
#previous-button:focus-visible,
#next-button:hover,
#next-button:focus-visible {
  /* background: var(--accent-strong); */
  transform: translateY(-1px);
  outline: none;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-size: 1.45rem;
  line-height: 1;
}

#song-title {
  /* flex: 1; */
  font-family: "overpass", sans-serif;
  font-weight: 800;
  margin: 0;
  padding: 0;
  color: var(--text-light);
  /* font-size: clamp(1.15rem, 1vw, 1.45rem); */
  /* text-align: center; */
  /* color: var(--text); */
  min-width: 35vw;
  font-optical-sizing: auto;
  font-style: normal;
  text-align: center;
  line-height: 0;
}
.middle-section {
  display: flex;
  align-items: center;
  /* gap: 6vw; */
  flex: 1;
  height: 100%;
  justify-content: center;
}
#main-content {
  /* grid-column: 2; */
  padding: 24px;
  /* overflow: auto; */
  /* background: var(--bg); */
  /* background: white; */
  max-width: 100vw !important;
  /* width: 100%; */
  /* height: 100%; */
  /* white-space: pre-wrap; Forces the browser to respect tabs, spaces, and line breaks */
  /* tab-size: 4;           Defines how wide a tab should be */
}

#main-content > *:first-child {
  margin-top: 0;
}

#main-content h1,
#main-content h2,
#main-content h3 {
  color: var(--panel-strong);
}

#main-content p,
#main-content li,
#main-content td,
#main-content th {
  font-size: 1rem;
  line-height: 1.55;
}

#main-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

#main-content pre,
#main-content code {
  background: #eef2ff;
  border-radius: 10px;
  padding: 10px 12px;
  overflow-x: auto;
}
#main-content tr {
  /* display: block !important; 
  width: 100% !important;
  max-width: 100vw !important; */
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr; /* Stack everything in a single track */
  grid-template-rows: auto;
  /* position: relative; */
  /* width: 100% !important; */
  max-width: 96vw !important;
}
#main-content td,
#main-content td p,
#main-content td span,
#main-content td div,
#main-content td mark,
#main-content td font {
  background: transparent !important;
  background-color: transparent !important;
}
#main-content td:first-child {
  grid-column: 1 !important;
  grid-row: 1 !important;
  z-index: 2;
  
  /* CRITICAL: A solid background stops the text underneath from showing through */
  /* background: var(--bg, white) !important;  */
  
  /* Restrict its width so it doesn't completely block Column 2 */
  /* width: 40% !important;  */
  /* padding-right: 12px; */
}
#main-content td:nth-child(2):nth-last-child(2) {
  /* Your special handling for Column 2 goes here */
  /* background-color: #f0fdf4; /* Example: light green tint */
  /*z-index: 3; */
  grid-column: 1 !important;
  grid-row: 1 !important;
  z-index: 1;
  width: 100% !important;
  
  /* Push Column 2's text to the right so Column 1 doesn't cover up its words */
  padding-left: 42% !important; 
  /* background:green !important; */
}
/* Force Column 2 to be 100% width, sitting underneath Column 1 */
#main-content td:last-child {
  grid-column: 1 !important;
  grid-row: 1 !important;
  z-index: 1;
  width: 100% !important;
  background:none !important;
  /* Push Column 2's text to the right so Column 1 doesn't cover up its words */
  /* padding-left: 42% !important;  */
}
/* @media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }

  .left-bar {
    grid-row: auto;
    grid-column: 1;
    max-height: 42vh;
    overflow: hidden;
  }

  /* .top-bar {
    grid-column: 1;
  } */

  /* #main-content {
    grid-column: 1;
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .left-bar {
    padding: 14px;
  }

  .top-bar {
    padding: 12px 14px;
    gap: 8px;
  }

  .top-bar button,
  #toggle-button,
  #previous-button,
  #next-button {
    min-width: 50px;
    min-height: 50px;
    font-size: 1.1rem;
    padding: 0 12px;
  }
} */ 
