/* ========================= */
/* WYŚRODKOWANIE CAŁEJ STRONY GRY */
/* ========================= */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========================= */
/* PANEL STEROWANIA */
/* ========================= */
.controls {
    margin-top: 15px;
    background-color: rgba(255,255,255,0.1);
    display: inline-block;
    padding: 15px 25px;
    border-radius: 12px;
}

select {
    padding: 8px 15px;
    margin: 5px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
}

/* ========================= */
/* INFORMACJE O RUCHACH */
/* ========================= */
.info {
    margin-top: 15px;
    font-size: 18px;
}

/* ========================= */
/* GRA */
/* ========================= */
.game-container {
    display: inline-block;
    background-color: rgba(255,255,255,0.05);
    padding: 20px;
    margin-top: 30px;
    border-radius: 15px;
    overflow-x: auto; /* scroll ukryty jeśli za szeroko */
}

.game {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px;
    height: 520px;
    margin-top: 40px;
    min-width: 540px; /* minimalna szerokość dla 3 wież */
}

.tower {
    width: 160px;
    height: 440px;
    margin: 0 15px;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    padding-bottom: 10px;
    cursor: pointer;
    border-radius: 12px;
}

.tower.highlight {
    box-shadow: inset 0 0 8px rgba(255,152,0,0.3);
}

.tower::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 18px;
    background: #444;
    border-radius: 8px;
}

.rod {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 380px;
    background: #ddd;
    border-radius: 6px;
    z-index: 0;
}

/* ========================= */
/* KRĄŻKI */
/* ========================= */
.disk {
    height: 30px;
    margin: 4px 0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    z-index: 1;
    transition: transform 0.2s ease, box-shadow 0.2s;
}

.selected {
    outline: 3px solid rgb(143, 0, 0);
    transform: translateY(-20px);
    box-shadow: 0 0 15px #ff0000;
}

/* ========================= */
/* RESPONSYWNOŚĆ */
/* ========================= */
@media (max-width: 1024px) {
    .game {
        gap: 20px;
        height: 400px;
    }
    .tower {
        width: 130px;
        height: 380px;
    }
    .rod {
        height: 320px;
    }
    .disk {
        height: 24px;
    }
}

@media (max-width: 768px) {
    .game {
        gap: 15px;
        height: auto;
        flex-direction: row; /* trzy wieże w jednej linii, przewijanie jeśli za szeroko */
    }
    .tower {
        width: 100px;
        height: 300px;
    }
    .rod {
        height: 250px;
    }
    .disk {
        height: 20px;
    }
}

@media (max-width: 480px) {
    .tower {
        width: 80px;
        height: 240px;
    }
    .rod {
        height: 200px;
    }
    .disk {
        height: 16px;
        font-size: 12px;
    }
}