/* Gemini Modernization & Theming */
/* Based on the Next Level Entertainment Logo */

:root {
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --primary-gold: #FFD700; /* Brighter gold for highlights */
    --secondary-gold: #D4AF37; /* A more muted, classier gold */
    --text-primary: #FFFFFF;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
    --font-logo: 'Great Vibes', cursive;
    --font-body: 'Roboto', sans-serif;
}

/* Modern CSS Reset & Box Sizing */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* General Body Styles */
body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-primary);
    margin: 0;
    padding: 20px 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    margin-bottom: 0;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3)); /* Subtle glow for the logo */
}

.subtitle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.subtitle {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.5em;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: 1px;
}

.share-button {
    background: transparent;
    border: 1px solid var(--secondary-gold);
    color: var(--secondary-gold);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.share-button:hover {
    background: var(--secondary-gold);
    color: var(--background-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

/* View Toggle */
.view-toggle {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}
.btn-view {
    margin: 0 8px;
    background-color: transparent;
    border: 1px solid var(--secondary-gold);
    color: var(--secondary-gold);
    transition: all 0.3s ease;
    font-weight: 500;
}
.btn-view:hover {
    background-color: var(--secondary-gold);
    color: var(--background-color);
}
.btn-view.active {
    background-color: var(--primary-gold);
    border-color: var(--primary-gold);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Back Button */
#back-button-container .btn {
    color: var(--secondary-gold);
    border-color: var(--secondary-gold);
}
#back-button-container .btn:hover {
    background-color: var(--secondary-gold);
    color: var(--background-color);
}


/* Search Area */
.search-container {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
}
#search-input {
    flex-grow: 1;
    border: none;
    padding: 15px;
    font-size: 1em;
    background-color: transparent;
    color: var(--text-primary);
}
#search-input::placeholder {
    color: var(--text-secondary);
}
#search-input:focus {
    outline: none;
    box-shadow: none;
    background-color: #252525;
}
#search-button {
    border: none;
    background-color: var(--secondary-gold);
    color: var(--background-color);
    padding: 0 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#search-button:hover {
    background-color: var(--primary-gold);
}

/* Results */
.results-container {
    margin-top: 20px;
}
.result-item {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Changed to flex-start for better alignment */
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative; /* Make this a positioning context */
    padding-bottom: 60px; /* Add padding to prevent overlap */
}
.result-item:hover {
    border-color: var(--secondary-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}
.song-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--primary-gold);
}
.song-info p {
    margin: 0;
    color: var(--text-secondary);
}

.details-button {
    background: transparent;
    border: 1px solid var(--secondary-gold);
    color: var(--secondary-gold);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute; /* Position absolutely */
    bottom: 15px;       /* In the bottom */
    right: 15px;        /* In the right corner */
}

.details-button:hover {
    background: var(--secondary-gold);
    color: var(--background-color);
}

/* Artist & Genre Browse */
.artist-index-letter, .artist-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 4px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--secondary-gold);
    font-weight: 500;
    transition: all 0.2s;
}
.artist-index-letter:hover, .artist-link:hover {
    background-color: var(--secondary-gold);
    color: var(--background-color);
    text-decoration: none;
    border-color: var(--secondary-gold);
}
.artist-list-container, .genre-buttons-container {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
.artist-link {
    display: block;
    text-align: left;
    border-radius: 8px;
}
.btn-genre {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--secondary-gold);
    margin: 5px;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}
.btn-genre:hover {
    background-color: var(--secondary-gold);
    color: var(--background-color);
    border-color: var(--secondary-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

/* Tags */
.tags {
    margin-top: 10px;
}
.tag {
    display: inline-block;
    background-color: #333;
    color: var(--secondary-gold);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 1px solid #444;
}
.tag.decade-tag {
    color: #a0d3a3;
    background-color: #2a3b2a;
    border-color: #3c503c;
}

.tag.genre-tag {
    color: #ffd700;
    background-color: #3b3600;
    border-color: #4d4600;
}

/* Loading & Mobile */
.loading-indicator {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: var(--text-secondary);
    display: none;
}
@media (max-width: 600px) {
    body {
        padding: 0;
    }
    .container {
        padding: 15px;
    }
    .subtitle-container {
        flex-direction: column;
        gap: 10px;
    }
    .subtitle {
        font-size: 1.2em;
    }
    .share-button {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }
    .view-toggle {
        display: flex;
        flex-direction: column;
    }
    .btn-view {
        width: 100%;
        margin: 5px 0;
        padding: 12px;
    }
    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .song-location {
        margin-top: 15px;
        align-self: flex-start;
        background-color: var(--background-color);
        width: 100%;
        padding: 10px;
        border-radius: 5px;
        text-align: left;
    }
    .btn-genre {
        display: block;
        width: calc(50% - 10px);
        margin: 5px;
        text-align: center;
    }
    .genre-buttons-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

/* Jump to Top Button */
#jump-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2em;
    background-color: var(--secondary-gold);
    border: none;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
#jump-to-top:hover {
    background-color: var(--primary-gold);
    transform: translateY(-3px);
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 500px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: var(--primary-gold);
}

.close-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    font-size: 1em;
    color: var(--text-primary);
    word-wrap: break-word;
}

/* Share Modal Styles */
.share-modal {
    max-width: 400px;
}

.qr-container {
    text-align: center;
    padding: 10px;
}

#qr-code {
    margin: 0 auto 20px auto;
    max-width: 200px;
}

#qr-code canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.share-url {
    font-family: monospace;
    font-size: 0.9em;
    color: var(--primary-gold);
    font-weight: bold;
    margin: 15px 0;
    padding: 8px;
    background-color: var(--background-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.share-instructions {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 10px 0;
    line-height: 1.4;
}

    #jump-to-top {
        width: 40px;
        height: 40px;
        right: 15px;
        bottom: 15px;
        font-size: 1em;
    }
}

/* Jump to Top Button */
#jump-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2em;
    background-color: var(--secondary-gold);
    border: none;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
#jump-to-top:hover {
    background-color: var(--primary-gold);
    transform: translateY(-3px);
}

/* Scrollbar styling for a more modern look */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--background-color);
}
::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gold);
}
