/* Reset i osnovni stilovi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    transition: background-color 0.5s;
}

body.light-mode {
    background-color: #fff;
    color: #000;
}

/* Kontejner */
.container {
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding: 20px;
    overflow-y: auto;
}

/* Audio player */
.audio-player {
    width: 100%;
    text-align: center;
    margin: 10px 0;
}

/* Kontrole glazbe */
.music-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 0;
    max-width: 100%;
    overflow: hidden; /* Sprječava prelijevanje */
}

/* Gumbi */
.buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    position: relative; /* Referenca za apsolutno pozicioniranje ekvilajzera */
}

.play-button,
.stop-button {
    width: 150px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    background: #d81b60;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    border: none; /* Uklanja potencijalnu crtu */
}

.stop-button {
    margin-bottom: 0;
}

.play-button:hover,
.stop-button:hover {
    background: #ad1457;
    transform: scale(1.05);
    box-shadow: 0 0 10px #d81b60, 0 0 20px #d81b60;
}

.play-button:active,
.stop-button:active {
    box-shadow: 0 0 15px #d81b60, 0 0 30px #d81b60;
}

.play-button span,
.stop-button span {
    white-space: nowrap;
}

/* Kontejner za slike */
.image-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
    min-width: 150px;
    min-height: 60px;
    z-index: 10;
    flex-shrink: 0;
}

.croatia-link,
.gps-link {
    display: block;
    visibility: visible;
}

.croatia-link.hidden,
.gps-link.hidden {
    display: none;
}

.croatia-image,
.gps-image {
    width: 60px;
    height: 60px;
    display: block;
    object-fit: contain;
    z-index: 10;
}

.gps-link {
    margin-left: 20px;
}

/* Ekvilajzer */
.equalizer {
    display: flex;
    align-items: flex-end;
    height: 80px;
    z-index: 10;
    position: absolute;
    left: 100%; /* Pozicionira točno desno od gumbi */
    margin-left: 5px; /* Razmak na desktopu */
}

.equalizer.hidden {
    display: none;
}

.bar {
    width: 5px;
    min-height: 10px;
    margin: 0 2px;
    background-color: #fff;
    transition: height 0.2s ease;
}

.bar:nth-child(odd) {
    background-color: #fff;
}

.bar:nth-child(even) {
    background-color: #d81b60;
}

/* Audio i footer */
audio {
    display: none; /* Skriva audio element */
}

footer {
    margin: 0;
    padding: 0;
    height: 0;
}

/* Header */
header {
    margin: 20px 0;
}

.poveznica-link {
    display: block;
    margin-bottom: 20px;
}

.poveznica-image {
    width: 100%;
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

header h1 .version {
    font-size: 0.5em;
    vertical-align: top;
    line-height: 1;
    color: #ff0000;
}

.header-content {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-text p {
    font-size: 1.5em;
    margin-bottom: 8px;
}

.domovina {
    font-size: 1.2em;
    font-weight: bold;
    color: #ff0000;
}

.instagram-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #d81b60;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
    margin-top: 10px;
    transition: transform 0.3s ease, background 0.3s ease;
    user-select: none;
}

.instagram-button:hover {
    background: #ad1457;
    transform: scale(1.05);
}

.instagram-button:active {
    box-shadow: 0 0 10px #d81b60, 0 0 20px #d81b60;
}

.instagram-content {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.instagram-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/* Menu */
.menu {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: nowrap;
}

.menu-bottom {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.menu-item {
    width: 80px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    color: #fff;
    background: #263238;
    border-radius: 6px;
    transition: transform 0.3s ease, background 0.3s ease;
    user-select: none;
}

.menu-item:hover {
    background: #37474f;
    transform: scale(1.05);
}

/* Istaknuti tekst */
.highlight-text {
    width: 100%;
    max-width: 365px;
    margin: 20px auto;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #d81b60;
    text-shadow: 0 0 10px #d81b60, 0 0 20px #d81b60, 0 0 30px #d81b60;
}

/* Odbrojavanje */
#countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.countdown-item {
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #d81b60;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.countdown-item:hover {
    background: #ad1457;
}

.countdown-item span:first-child {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
}

.countdown-item span:last-child {
    font-size: 0.9em;
    color: #fff;
}

.countdown-item .blue {
    color: #0000ff;
}

/* SEO i pop-up */
.seo-hidden {
    display: none;
}

.hidden {
    display: none;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    padding: 15px;
    border: 2px solid #fff;
    text-align: left;
    color: #fff;
    width: 90%;
    max-width: 500px;
    z-index: 1000;
}

.popup h2 {
    margin-top: 0;
    font-size: 1.2em;
}

.popup ul {
    list-style-type: none;
    padding: 0;
}

.popup a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
}

.popup a:hover {
    text-decoration: underline;
}

.popup button {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    color: #000;
}

#garage-list {
    text-align: center;
}

#garage-list iframe {
    width: 100%;
    max-width: 100%;
}

#close-garage {
    background: #d81b60;
    color: #fff;
    transition: background 0.3s ease;
}

#close-garage:hover {
    background: #ad1457;
}

#close-garage:active {
    box-shadow: 0 0 10px #d81b60, 0 0 20px #d81b60;
}

#playlist-list {
    background: #d81b60;
    text-align: center;
}

#playlist-list h2,
#playlist-list p,
#playlist-list a {
    text-align: center;
}

#playlist-list a {
    display: block;
    margin: 10px 0;
}

#contact-list {
    background: #d81b60;
    text-align: center;
}

#contact-list h2,
#contact-list p {
    text-align: center;
}

#whatsapp-link {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #fff;
    border-radius: 4px;
    text-decoration: underline;
    margin: 10px 0;
    transition: background 0.3s ease;
}

#whatsapp-link:hover {
    background: #ad1457;
}

/* Instalacijski prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #d81b60;
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.install-prompt p {
    margin-bottom: 10px;
    font-size: 1em;
}

.install-prompt .mobile-only {
    margin-bottom: 10px;
    font-size: 0.9em;
    font-style: italic;
    text-align: center;
}

.install-prompt button {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 8px 15px;
    margin: 5px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.install-prompt button:hover {
    background-color: #e0e0e0;
}

#install-cancel {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

#install-cancel:hover {
    background: #ad1457;
}

/* Responzivnost */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .poveznica-image {
        max-width: 80px;
    }

    header h1 {
        font-size: 2em;
    }

    .header-text p {
        font-size: 1em;
        margin-bottom: 6px;
    }

    .domovina {
        font-size: 0.9em;
    }

    .instagram-button {
        font-size: 1em;
        padding: 8px 12px;
        width: 100%;
        max-width: 325px;
        margin: 15px auto;
    }

    .instagram-content {
        margin-top: 4px;
    }

    .instagram-icon {
        width: 20px;
        height: 20px;
    }

    #countdown, .menu {
        margin: 15px auto;
        padding: 0 10px;
        justify-content: center;
        width: 100%;
        max-width: 325px;
        gap: 15px;
        flex-wrap: nowrap;
    }

    .menu-bottom {
        margin: 15px auto;
        padding: 0 10px;
        width: 100%;
        max-width: 325px;
        gap: 15px;
    }

    .menu-item {
        width: 70px;
        height: 60px;
        font-size: 0.9em;
    }

    .menu-bottom .menu-item {
        width: 155px;
        flex: 0 0 calc(50% - 7.5px);
    }

    .countdown-item {
        width: 70px;
        height: 60px;
    }

    .countdown-item span:first-child {
        font-size: 1.3em;
    }

    .countdown-item span:last-child {
        font-size: 0.8em;
    }

    .highlight-text {
        max-width: 325px;
        font-size: 1.2em;
    }

    .music-controls {
        margin-bottom: 0;
    }

    .play-button,
    .stop-button {
        width: 130px;
        height: 45px;
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .image-container {
        margin-left: 25px;
        min-width: 180px;
        min-height: 80px;
    }

    .croatia-image,
    .gps-image {
        width: 80px;
        height: 80px;
    }

    .gps-link {
        margin-left: 20px;
    }

    .equalizer {
        height: 60px;
        max-width: 120px;
        margin-left: 30px; /* Povećan razmak od gumbi */
    }

    .popup {
        max-width: 325px;
    }

    .install-prompt {
        max-width: 325px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .poveznica-image {
        max-width: 60px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .header-text p {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    .domovina {
        font-size: 0.8em;
    }

    .instagram-button {
        font-size: 0.9em;
        padding: 6px 10px;
        max-width: 285px;
    }

    .instagram-icon {
        width: 18px;
        height: 18px;
    }

    #countdown, .menu {
        max-width: 285px;
    }

    .menu-bottom {
        max-width: 285px;
    }

    .menu-item {
        width: 60px;
        height: 50px;
        font-size: 0.8em;
    }

    .menu-bottom .menu-item {
        width: 135px;
        flex: 0 0 calc(50% - 7.5px);
    }

    .countdown-item {
        width: 60px;
        height: 50px;
    }

    .countdown-item span:first-child {
        font-size: 1.1em;
    }

    .countdown-item span:last-child {
        font-size: 0.7em;
    }

    .highlight-text {
        max-width: 285px;
        font-size: 1em;
    }

    .music-controls {
        margin-bottom: 0;
    }

    .play-button,
    .stop-button {
        width: 110px;
        height: 40px;
        font-size: 0.8em;
        margin-bottom: 6px;
    }

    .image-container {
        margin-left: 20px;
        min-width: 147px;
        min-height: 66px;
    }

    .croatia-image,
    .gps-image {
        width: 66px;
        height: 66px;
    }

    .gps-link {
        margin-left: 15px;
    }

    .equalizer {
        height: 50px;
        max-width: 100px;
        margin-left: 30px; /* Povećan razmak od gumbi */
    }

    .bar {
        width: 4px;
        margin: 0 1px;
    }

    .popup {
        max-width: 285px;
    }

    .install-prompt {
        max-width: 285px;
    }
}