:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #ccc;
    --hover-bg: #f0f0f0;
    --chord-color: #0675bc;
    --heading-bg: #fd8000;
    --heading-color: #ffffff;
}

.dark-mode {
    /* --bg-color: #1a1a1a; */
    /* --text-color: #ffffff; */
    --border-color: #444;
    --hover-bg: #2a2a2a;
    --chord-color: #42b983;
    --heading-bg: #fd8000;
    --heading-color: #ffffff;
}

.dark-mode .chords {
    color: #0000ff !important;
}

.dark-mode .heading {
    background-color: #007bff !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    /* background-color: var(--bg-color); */
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    background-color: var(--hover-bg);
}

.theme-toggle i {
    font-size: 20px;
    color: var(--text-color);
}

h1 {
    font-size: 24px;
    line-height: 2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}
.nav-controls {
    display: flex;
    justify-content: start;
    align-items: left;
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
    padding-left: 5px;
}

.song-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem 0;
    padding-bottom: 0.5rem;
}

.song-navigation button {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.song-navigation button:hover:not([disabled]) {
    background-color: #f0f0f0;
    border-color: #999;
}

.song-navigation button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.song-navigation span {
    font-size: 0.9rem;
    color: #666;
}

.table-container {
    font-size: 0.9em;
}

.chords {
    -webkit-text-size-adjust: 100%;
    --highlight-bg-color: #42b983;
    --rem: 16;
    cursor: pointer;
    word-break: break-all;
    background-color: transparent;
    border: none;
    border-radius: 0;
    display: block;
    margin: 0;
    padding: 0;
    white-space: pre;
    word-wrap: inherit;
    font-family: "Martian Mono", "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 700;
    color: #0675bc !important;
    margin-left: 25px;
    font-size: 21px;
    line-height: 16.5px;
    letter-spacing: -2px;
    margin-top: 2px;
}

.chordchart {
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: visible;
    padding: 10px;
}

pre {
    margin: 0;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: visible;
    white-space: pre !important;
}

.chordchart .lyrics {
    font-size: 1rem !important;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    margin-left: 0px !important;
    letter-spacing: -0.13rem;
    margin-bottom: -5px !important;
}

.chordchart .compact-lyrics {
    white-space: normal !important;
    font-size: 13px;
    line-height: 1.5;
}

.chordchart .chords {
    color: #2c5282;
    font-weight: bold;
    font-size: 1rem !important;
    line-height: 0.9rem;
    margin-left: 0px !important;
    letter-spacing: -0.13rem;
}

.chordchart .heading {
    /* font-weight: bold; */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    background-color: var(--heading-bg);
    color: var(--heading-color);
    border-left-width: 3px;
    border-left-style: solid;
}

.chordchart .empty-line {
    height: 1rem;
}

p {
    line-height: normal !important;
}

@media screen and (max-width: 768px) {
    .chordchart {
        font-size: 0.9rem;
        padding: 5px;
    }

    .chordchart .lyrics {
        font-size: 0.9rem;
    }

    .chordchart .chords {
        font-size: 0.9rem;
    }
    .table-container {
        font-size: 0.8em;
    }

}

.toggle-chords, .toggle-share, .toggle-youtube, .toggle-print {
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin: 3px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-chords {
    background-color: #b9b9b9;
}

.transpose-btn {
    background-color: #e0b337;
}

.toggle-chords:hover {
    background-color: #a0a0a0;
}

.toggle-share {
    background-color: #4CAF50;
}

.toggle-share:hover {
    background-color: #45a049;
}

.toggle-youtube {
    background-color: #FF0000;
}

.toggle-youtube:hover {
    background-color: #cc0000;
}

.toggle-print {
    background-color: #007bff;
}

.toggle-print:hover {
    background-color: #0056b3;
}

.toggle-chords i, .toggle-share i, .toggle-youtube i, .toggle-print i {
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 30px;
    top: 27px;
    width: auto;
    height: auto;
    background-color: transparent;
}

.modal-content {
    background-color: transparent;
    margin: 0;
    padding: 0;
    border: none;
    width: 320px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-button {
    color: white;
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: -19px;
    top: -19px;
    background: rgba(0, 0, 0, 0.7);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-button:hover {
    color: white;
    background: rgba(0, 0, 0, 0.9);
}

#youtube-container {
    margin: 0;
    display: flex;
    justify-content: flex-end;
}

#youtube-container iframe {
    width: 320px;
    height: 180px;
    border-radius: 8px;
}
/* Related Songs Styles */
.related-songs {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.related-songs h3 {
    margin-top: 0;
    margin-bottom: -12px;
    font-size: 12px;
    color: #495057;
}

.related-songs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-song-button {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.related-song-button:hover {
    background-color: #dee2e6;
    transform: translateY(-1px);
}

.related-song-button:active {
    background-color: #ced4da;
    transform: translateY(0);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #0675bc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 1rem;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: #055a8e;
}

.back-button i {
    font-size: 12px;
}

/* Print styles */
@media print {
    @page {
        margin: 1cm;
        size: auto;
    }
    
    html, body {
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
    }
    
    body {
        margin: 0;
        padding: 0;
        background: white;
        transform-origin: top left;
        position: relative;
        background-color: white;
        /* page-break-before: avoid; */
        /* page-break-after: avoid; */
    }
    
    /* body::after {
        content: "";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        background-image: url('../images/logo.png');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 30%;
        opacity: 0.1;
        z-index: -1;
        pointer-events: none;
    } */
    
    #landingPage, .search-container, #searchInput, #searchResults, 
    .toggle-chords, .toggle-share, .toggle-youtube, .toggle-print, 
    .song-navigation, .modal, .close-button, .back-button, .related-songs, .theme-toggle {
        display: none !important;
    }

    .author {
        color: rgb(51, 51, 51) !important;
    }

    .link {
        padding-top: 6px;
        color: rgb(51, 51, 51) !important;
    }
    
    #songContent {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        /* page-break-before: avoid; */
        /* page-break-after: avoid; */
        overflow: visible;
    }
    
    .chordchart {
        /* page-break-inside: avoid; */
        /* page-break-before: avoid; */
        /* page-break-after: avoid; */
        font-size: 12pt;
        margin: 0;
        padding-top: 0;
    }
    
    h1 {
        font-size: 22pt;
        line-height: 1.5;
        margin-top: 0;
        padding-top: 0;
    }
    
    .author, .time-sig, .key {
        font-size: 12pt; /* 12pt * 1.8 */
        margin: 7px 0; /* 5px * 1.8 */
    }
    
    .chordchart .lyrics {
        font-size: 1.6rem !important;
        /* line-height: 2.7; */
        page-break-inside: avoid;
        page-break-before: avoid;
        page-break-after: avoid;
    }
    
    .chordchart .chords {
        font-size: 1.6rem !important;
        page-break-inside: avoid;
        page-break-before: avoid;
        page-break-after: avoid;
        /* line-height: 1.62rem; */
    }
    
    .chordchart .heading {
        /* font-size: 1.8rem !important; */
        background-color: #fd8000 !important;
        color: #ffffff !important;
        border-left-width: 3px !important;
        border-left-style: solid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


/* Loading Indicator Styles */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message Styles */
.error-message {
    text-align: center;
    padding: 20px;
    background-color: #ffebee;
    border-radius: 4px;
    margin: 20px;
}

.error-message p {
    color: #c62828;
    margin-bottom: 15px;
}

.error-message button {
    background-color: #c62828;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.error-message button:hover {
    background-color: #b71c1c;
}

.set-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0;
}

.load-set-button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.load-set-button:hover {
    background-color: #2980b9;
}

.load-set-button i {
    margin-right: 5px;
}

body {
    font-family: "Martian Mono", "Roboto Mono", monospace;
    margin: 0;
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: white;
}

#landingPage {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.logo-container {
    text-align: center;
}

.logo {
    max-width: 250px;
    height: auto;
}
#pdfContainer {
    width: 100%;
    max-width: 800px;
    height: 800px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: white;
    margin-top: 20px;
}
#songContent {
    width: 100%;
    max-width: 800px;
    min-height: 500px;
    background: white;
    padding: 5px;
    box-sizing: border-box;
    margin-bottom: 20px;
}
.chord-chart {
    margin-top: 20px;
    white-space: pre-wrap;
    font-family: "Roboto Mono", monospace;
}
.section-header {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 5px;
}
.chord-line {
    color: #2c5282;
    font-weight: bold;
}
.lyric-line {
    margin-bottom: 10px;
}
.empty-line {
    height: 1em;
}
.search-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
}
#searchInput {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}
.search-results {
    margin-top: 10px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.search-result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.search-result-item:hover {
    background-color: #f0f0f0;
}
.search-result-item:last-child {
    border-bottom: none;
}

/* Estilos para a tabela de músicas */
#songsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

#songsTable th, #songsTable td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#songsTable th {
    background-color: #0675bc;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

#songsTable tr:hover {
    background-color: #f5f5f5;
    cursor: pointer;
}

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

.table-container {
    width: 100%;
    max-width: 800px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Navigation styles */
.nav-menu {
    display: flex;
    width: 100%;
    max-width: 800px;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.nav-item {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

.nav-item.active {
    color: #0675bc;
    border-bottom: 2px solid #0675bc;
}

/* Sets page styles */
#setsPage {
    width: 100%;
    max-width: 800px;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.set-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.set-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.set-title {
    font-size: 18px;
    font-weight: bold;
    color: #0675bc;
}

.set-date {
    color: #666;
}

.set-info {
    margin-bottom: 15px;
}

.set-songs {
    width: 100%;
}

.set-song {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.set-song:last-child {
    border-bottom: none;
}

.set-song-info {
    flex-grow: 1;
}

.song-link {
    text-decoration: none;
    color: #000000;
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -1px;
}

.set-song-notes {
    color: #666;
    font-style: italic;
    margin-left: 10px;
}

.set-draft-badge {
    background-color: #f8d7da;
    color: #721c24;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}