#hymnal-wrapper {
    display: flex;
    min-height: 100vh;
}
.hymnal h2 {
    margin-top: 40px;
}
header.hymnal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #990000;
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    z-index: 1000;
}
header.hymnal-header select,
header.hymnal-header input,
header.hymnal-header button {
    padding: 5px 8px;
    border-radius: 4px;
    border: none;
    font-size: 0.9em;
}
#sidebar {
    width: 220px;
    background: #f0f0f0;
    padding: 20px;
    height: calc(100vh - 60px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#sourceContainer,
#hymnsContainer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#sourceSelect,
#hymnSelect {
    width: 100%;
    padding: 6px 8px;
    font-size: 1em;
    cursor: pointer;
}
#historyContainer {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
#historyContainer h3 {
    font-size: 1.1rem;
    color: #990000;
    margin-bottom: 10px;
    flex-shrink: 0;
}
#historyList {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#historyList li {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
}
#historyList li a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    color: #3e3e3e;
    text-decoration: none;
    font-size: 0.95rem;
}
#historyList li:hover {
    background-color: #e25153;
}
#historyList li:hover a {
    color: #fff;
}
@media (min-width: 769px) {
    #historyList li a {
        -webkit-line-clamp: 1;
    }
}
@media (max-width: 768px) {
    #historyList li a {
        -webkit-line-clamp: 2;
    }
}
#hymnal-content {
    flex: 1;
    padding: 80px 20px 20px 20px;
}
#hymnal-content-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #353535;
    margin-bottom: 20px;
}
.chorus {
    text-align: center;
    font-style: italic;
    color: #990000;
    margin: 10px 0;
}
#versesContainer p {
    text-align: left;
    margin: 6px;
    padding: 6px 10px 6px 42px;
    border-radius: 6px;
    position: relative;
    font-size: var(--verse-font-size, 1.1rem);
    line-height: 1.7em;
    transition: font-size 0.2s ease;
}
#versesContainer p .number {
    position: absolute;
    left: 10px;
    top: 6px;
    font-weight: bold;
    color: #980000;
}
#versesContainer p:nth-child(even) {
    background: #f7f7f7;
}
#versesContainer p:nth-child(odd) {
    background: #ffffff;
}
#hymnal-search {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 10px auto 20px auto;
    z-index: 49;
}
#searchInput {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #9c9c9c;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
}
#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #9c9c9c;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}
#searchResults .result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}
#searchResults .result-item a {
    text-decoration: none;
    color: #333;
}
#searchResults .result-item a:hover {
    text-decoration: underline;
}
#toggleSidebar {
    display: none;
    position: fixed;
    top: 80px;
    left: 10px;
    z-index: 1100;
    background: #990000;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
}
#toggleSidebar.move {
    transform: translateX(155px);
    transition: transform 0.3s ease;
}
#hymn-toolbar {
    display: none;
    gap: 6px;
    position: fixed;
    top: 80px;
    right: 10px;
    z-index: 50;
}
#hymn-toolbar button {
    background: #007BFF;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}
#hymn-toolbar button:hover {
    background: #0056b3;
}
#cifraclub {
    display: flex;
    width: 105px;
    height: 50px;
    display: block;
    background: url(https://akamai.sscdn.co/cc/img/desktop/logos.svg?v=2) no-repeat 0 0;
}
#music-buttons {
    position: absolute;
    right: 10vw;
}
#playerContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 240px;
    background: #1c1c1c;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
    font-family: sans-serif;
    color: #fff;
}
#playerHeader {
    background: #111;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}
#playerHeader #playerTitle {
    font-size: 14px;
}
#playerHeader button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}
#lyricsButton {
    background: #f70;
    border: 1px solid rgb(230, 107, 0);
    border-radius: 5px;
    cursor: pointer;
    padding: 3px;
    height: 24px;
    margin-left: 5px;
    top: 3px;
    position: relative;
}
#lyricsButton i {
    margin-top: 5px;
    color: #fff;
    padding: 7px 10px;
}
#closePlayer {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
}
#youtubePlayer {
    width: 100%;
    height: calc(100% - 36px);
    border: none;
}
#playerButton {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
}
#playerButton img {
    display: inline-block;
    width: 20px;
    height: 20px;
}
@media (max-width: 768px) {
    #toggleSidebar,
    #hymn-toolbar {
        display: flex;
    }
    #hymnal-wrapper {
        flex-direction: column;
    }
    #sidebar {
        position: fixed;
        top: 72px;
        left: 0;
        width: 220px;
        height: calc(100% - 60px);
        transform: translateX(-250px);
        z-index: 1000;
    }
    #sidebar.show {
        transform: translateX(0);
    }
    #hymnal-content {
        padding: 20px 10px 20px 10px;
    }
}