:root {
    --bg: #121212;
    --text: #ffffff;
    --bg-secondary: #1e1e1e;
    --border: #333;
    --hover: #333;
    --input-bg: #1e1e1e;
    --input-text: #ffffff;
    --top-bar-height: 45px;
}

body.light-theme {
    --bg: #ffffff;
    --text: #000000;
    --bg-secondary: #f0f0f0;
    --border: #ccc;
    --hover: #e0e0e0;
    --input-bg: #ffffff;
    --input-text: #000000;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
    padding-top: 0;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin: 20px 0;
    color: var(--text);
}
#active-filters {
    margin: 10px 0;
    min-height: 20px;
}
#active-filters span {
    display: inline-block;
    background-color: #666;
    color: var(--text);
    padding: 4px 8px;
    margin: 2px;
    border-radius: 3px;
    cursor: pointer;
}

.chord-span {
    cursor: pointer;
    position: relative;
    border-bottom: 1px dotted currentColor;
}

.chord-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    pointer-events: none; /* Prevent tooltip from interfering with mouse events */
    white-space: nowrap;
}

.chord-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chord-diagram h4 {
    margin: 0 0 5px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text);
}
}
#toc-table th,
#toc-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid #555;
    cursor: pointer;
    transition: background-color 0.3s;
}
#toc-table th:last-child,
#toc-table td:last-child {
    border-right: none;
}
#toc-table th {
    background: var(--bg-secondary);
    font-weight: bold;
}
#toc-table tr:hover {
    background-color: var(--hover);
}
#content-area {
    margin: 0;
    padding-top: var(--top-bar-height);
}
#song {
    width: 100%;
    height: calc(100vh - var(--top-bar-height));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
}
#tabs {
    flex-shrink: 0;
    background: var(--bg-secondary);
    padding: 15px;
    font-weight: bold;
    font-size: 18px;
    margin: 0;
    color: var(--text);
    white-space: pre-wrap;
    border-bottom: 2px solid var(--border);
}
#lyrics {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    column-gap: 30px;
    column-rule: 1px solid #666;
    padding: 15px;
    display: block;
    white-space: pre-wrap;
    width: 100%;
    line-height: 1.6;
}
#lyrics h1 {
    column-span: all;
    text-align: left;
    margin: 0 0 16px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text);
    font-weight: bold;
}
button {
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: var(--hover);
}
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #333;
    padding: 10px;
    z-index: 11;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#center-bar h1 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}
/* TOC numbering column */
#toc-table td.toc-number {
    color: #888;
    width: 40px;
    text-align: right;
    padding-right: 10px;
    font-weight: normal;
}
#toc-table th.toc-number-header {
    color: #888;
    width: 40px;
    text-align: right;
    padding-right: 10px;
    background: var(--bg-secondary);
}

/* Prev/Next buttons spacing */
#left-bar button,
#right-bar button {
    margin: 0 6px;
}

/* Make theme-toggle stand out slightly smaller */
#left-bar #theme-toggle {
    font-size: 1em;
}

/* Search input styling */
#search {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

#search:focus {
    outline: none;
    border-color: #666;
}

/* Table of contents container */
#toc {
    padding: 15px;
}

#toc-table {
    width: 100%;
    border-collapse: collapse;
}
