/* Custom styles básicos */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.song-number-btn {
    transition: all 0.2s ease;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar,
#menuPopup .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track,
#menuPopup .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb,
#menuPopup .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover,
#menuPopup .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Esconder scrollbar no carrossel de navegação rápida */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-item {
    scroll-snap-align: center;
    flex: 0 0 auto;
}

/* SEPARAÇÃO SEMÂNTICA: Linha abaixo do título */
.title-separator {
    border-bottom: 2px solid #e5e7eb; 
}

/* Etiquetas dos Números já Existentes (Modo Claro) */
.existing-number-badge {
    background-color: #e0e7ff; 
    color: #3730a3; 
    border-color: #c7d2fe; 
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .song-number-btn:hover { transform: none; }
    .song-number-btn:active { transform: scale(0.95); }
    .history-item:hover { background-color: transparent; }
    .history-item:active { background-color: #f3f4f6; }
}

body.touch-device .song-number-btn {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(79, 70, 229, 0.3);
}
body.touch-device .song-number-btn:active {
    transform: scale(0.95);
    background-color: #4f46e5;
    color: white;
}
body.mouse-device .song-number-btn {
    cursor: pointer;
}
body.mouse-device .song-number-btn:hover {
    transform: scale(1.1);
}

/* =========================================
   TIPOGRAFIA DO HINO (NOVO ANALISADOR)
   ========================================= */

#songDetailLyrics {
    font-family: inherit;
}

.chord-line {
    font-family: 'Arial', 'Helvetica', sans-serif !important;
    color: #f97316 !important; 
    font-weight: 700;
    white-space: pre !important; 
    line-height: 1.2;
}

.lyric-line {
    font-family: 'Georgia', 'Merriweather', 'Times New Roman', serif !important;
    white-space: pre-wrap !important;
    line-height: 1.6;
}

/* =========================================
   DARK MODE OVERRIDES
   ========================================= */

body.dark-mode { background: #111827 !important; color: #f3f4f6; }
body.dark-mode.bg-gradient-to-br { background-image: none !important; }
body.dark-mode .bg-white { background-color: #1f2937 !important; }

body.dark-mode .text-gray-800, 
body.dark-mode .text-gray-700, 
body.dark-mode .text-gray-600 { color: #f3f4f6 !important; }
body.dark-mode .text-gray-500, 
body.dark-mode .text-gray-400 { color: #9ca3af !important; }

body.dark-mode .lyric-line { color: #e5e7eb !important; } 

body.dark-mode .bg-indigo-50, body.dark-mode .bg-gray-50 { background-color: #374151 !important; }
body.dark-mode input, body.dark-mode textarea, body.dark-mode select { background-color: #111827 !important; color: #f3f4f6 !important; }

body.dark-mode .border-gray-200, body.dark-mode .border-gray-300, body.dark-mode .border-b, body.dark-mode .border-t, body.dark-mode .border-gray-100 { border-color: #4b5563 !important; }
body.dark-mode .title-separator { border-bottom-color: #374151 !important; }

body.dark-mode .nav-btn { background-color: #374151 !important; color: #818cf8 !important; }
body.dark-mode .nav-btn:hover { background-color: #4b5563 !important; }
body.dark-mode .nav-btn:disabled { background-color: #1f2937 !important; color: #4b5563 !important; }

body.dark-mode .bg-indigo-100 { background-color: #3730a3 !important; }
body.dark-mode .text-indigo-700 { color: #e0e7ff !important; }
body.dark-mode .text-indigo-800 { color: #c7d2fe !important; }
body.dark-mode .text-indigo-600 { color: #818cf8 !important; }

body.dark-mode .bg-green-50 { background-color: rgba(16, 185, 129, 0.15) !important; }
body.dark-mode .bg-blue-50 { background-color: rgba(59, 130, 246, 0.15) !important; }
body.dark-mode .bg-red-50 { background-color: rgba(239, 68, 68, 0.15) !important; }

body.dark-mode .bg-yellow-50 { background-color: rgba(234, 179, 8, 0.1) !important; }
body.dark-mode .border-yellow-100 { border-color: rgba(234, 179, 8, 0.25) !important; }
body.dark-mode .bg-yellow-200 { background-color: #eab308 !important; }
body.dark-mode .text-yellow-800 { color: #422006 !important; font-weight: 800 !important; }

body.dark-mode .quick-nav-btn { background-color: #374151 !important; border-color: #4b5563 !important; }
body.dark-mode .quick-nav-btn:hover { background-color: #4b5563 !important; }
body.dark-mode .quick-nav-btn.active { background-color: #3730a3 !important; border-color: #6366f1 !important; }
body.dark-mode .quick-nav-btn span:last-child { color: #d1d5db !important; }
body.dark-mode .quick-nav-btn span.text-indigo-600 { color: #818cf8 !important; }
body.dark-mode .quick-nav-btn span.text-yellow-600 { color: #eab308 !important; }

body.dark-mode .existing-number-badge { background-color: #3730a3 !important; color: #c7d2fe !important; border-color: #4338ca !important; }

body.dark-mode .bg-gray-100 { background-color: #4b5563 !important; color: #f3f4f6 !important; }
body.dark-mode .song-tooltip { background-color: #f3f4f6 !important; color: #111827 !important; }
body.dark-mode .custom-scrollbar::-webkit-scrollbar-track, body.dark-mode #menuPopup .overflow-y-auto::-webkit-scrollbar-track { background: #1f2937; }
body.dark-mode .custom-scrollbar::-webkit-scrollbar-thumb, body.dark-mode #menuPopup .overflow-y-auto::-webkit-scrollbar-thumb { background: #4b5563; }

#searchContainer input { transition: all 0.3s ease; }
body.dark-mode #searchContainer input { background-color: #1f2937 !important; border-color: #374151 !important; }
body.dark-mode #searchContainer input::placeholder { color: #9ca3af !important; }
body.dark-mode #searchContainer svg { color: #9ca3af !important; }

/* =========================================
   MODO APRESENTAÇÃO (TELA CHEIA)
   ========================================= */

body.presentation-mode header,
body.presentation-mode #searchContainer {
    display: none !important;
}

body.presentation-mode #backBtn,
body.presentation-mode #favoriteBtn,
body.presentation-mode #quickIncludeBtn,
body.presentation-mode #quickEditBtn,
body.presentation-mode #quickDeleteBtn {
    display: none !important;
}

body.presentation-mode .title-separator {
    border-bottom: none !important; 
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important; 
}

body.presentation-mode #prevSongBtn,
body.presentation-mode #nextSongBtn,
body.presentation-mode #songDetailNumberBtn {
    display: none !important; 
}

/* OVERRIDES PARA O NOVO TÍTULO EM BOTÃO NA TELA CHEIA */
body.presentation-mode #quickNavTitleBtn {
    pointer-events: none !important;
    overflow: visible !important;
}

body.presentation-mode #songDetailTitle {
    position: absolute !important;
    top: 24px !important;
    right: 32px !important;
    margin: 0 !important;
    font-size: 1.2rem !important;
    opacity: 0.25 !important;
    z-index: 9998 !important;
    pointer-events: none !important;
    text-align: right !important;
    max-width: 60vw !important;
    overflow: visible !important;
    white-space: normal !important;
}

body.presentation-mode #songDetail > div.mb-4 {
    margin: 0 !important;
}

body.presentation-mode #fullscreenBtn {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    background-color: rgba(31, 41, 55, 0.7) !important;
    color: white !important;
    border-radius: 50%;
    padding: 12px;
    z-index: 99999 !important;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); 
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.presentation-mode #fullscreenBtn:hover {
    background-color: rgba(31, 41, 55, 0.9) !important; 
    transform: scale(1.1);
}

body.presentation-mode #app {
    padding: 0 !important;
    max-width: 100% !important;
}

body.presentation-mode #songDetail {
    border-radius: 0 !important;
    min-height: 100vh !important;
    box-shadow: none !important;
    padding: 2rem 1rem 6rem 1rem !important;
    margin: 0 !important;
    border: none !important;
}

#hinariosListContainer > div.relative {
    margin-top: 8px;   
    margin-right: 8px; 
    overflow: visible !important;
}

#hinariosListContainer button {
    outline: none !important;
}

/* =========================================
   GAVETA (DRAWER) - DICIONÁRIO DE ACORDES
   ========================================= */
.drawer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 300ms ease-in-out, opacity 300ms ease-in-out, margin 300ms ease-in-out;
}

.drawer-wrapper.open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.drawer-inner {
    overflow: hidden;
}
