body {
    background-image: url('../images/index.png');
    background-size: cover;
    background-repeat: no-repeat;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
    color: white;
}


.bandeau {
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #000000b3;
    color: #fff;
    overflow: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: red;
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.texte-wrapper {
    display: inline-block;
    white-space: nowrap;
}

.texte {
    display: inline-block;
    white-space: nowrap;
    animation: defilement-dg 60s linear infinite;
}

@keyframes defilement-dg {
    from {
        transform: translateX(200%);
    }

    to {
        transform: translateX(-200%);
    }
}


@media (max-width: 768px) {

    .game,
    .shop,
    .click-shop,
    .trophies {
        width: 90%;
        margin: 8px auto;
    }

    .click-shop,
    .trophies {
        top: auto;
        transform: none;
    }
}

canvas {
    display: block;
}

#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 16px;
}

.game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #000000b3;
    border-radius: 10px;
    width: 400px;
    box-sizing: border-box;
    height: 860px;
    padding-left: 16px;
    padding-right: 16px;
    margin-top: 2px;
}

.menu-button {
    position: absolute;
    top: 55px;
    left: 24px;
    padding: 8px 15px;
    font-size: 14.4px;
    text-decoration: none;
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    border: 1px solid white;
    transition: background-color 0.3s ease;
}

.menu-button:hover {
    background-color: rgba(50, 50, 50, 0.9);
}


.volume-control {
    position: absolute;
    top: 100px;
    left: 110px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid white;
    padding: 5px;
    display: none;
    flex-direction: column;
    align-items: center;
}

.volume-control input[type="range"] {
    width: 150px;
}

.volume-control button {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.volume-control button:hover {
    background-color: #0056b3;
}

#volume-button {
    position: absolute;
    top: 55px;
    left: 170px;
    width: 38px;
    height: 38px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    border: 1px solid white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14.4px;

}

#volume-button:hover {
    background-color: rgba(50, 50, 50, 0.9);
}

#counter,
#cps {
    font-size: 32px;
    margin-bottom: 8px;
}

#compteur {
    padding: 0;
    padding-top: 80px;
    margin: 16px;
    border-radius: 8px;
    width: 220px;
    height: 220px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

#compteur:active {
    transform: scale(1.1);
    filter: brightness(1.4);
}


#reset {
    position: absolute;
    top: 55px;
    left: 292px;
    width: auto;
    height: 38px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 3px;
    border: 1px solid white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

#reset:hover {
    background-color: rgba(200, 200, 200, 0.9);
}

.conseil {
    position: absolute;
    top: 55px;
    left: 252px;
    width: 35px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}


button:disabled {
    background-color: lightgray;
    color: lightgray;
    cursor: not-allowed;
    opacity: 0.7;
}

button {
    padding: 8px 16px;
    font-size: 11.2px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-bottom: 4px;
}

button:hover {
    background-color: rgba(200, 200, 200, 0.9);
}

footer {
    text-align: center;
    padding: 8px;
    background-color: #444;
    color: white;
    font-size: 11.2px;
}

.shop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-left: auto;
    margin-top: 2px;
    padding: 8px;
    height: 860px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    width: 480px;
    box-sizing: border-box;
    text-align: center;
}

.building {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.building img {
    margin-right: 8px;
    width: 40px;
    height: 40px;
}

.tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    width: 100%;
}

.tab-button.active {
    background-color: rgba(50, 50, 50, 0.9);
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.hidden {
    display: none;
}

.tab-content:not(.hidden) {
    display: block;
}

.tab-content button {
    width: 100%;
}

.click-shop {
    display: flex;
    position: absolute;
    top: 52px;
    left: 47%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    width: 400px;
}

.click-shop button {
    margin: 8px;
    color: black;
}

.trophies {
    position: absolute;
    top: 260px;
    left: 47%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    width: 400px;
    box-shadow: 0px 3.2px 6.4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    max-height: 500px;
    overflow: auto;
    scrollbar-color: #b4c8ff #dce5ff;

}

.trophy {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 4px 0;
    font-size: 12.8px;
    text-align: center;
    transition: background-color 0.3s ease;
}

#trophy-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
