.slider-container {
    position: relative;
    display: inline-block;
}

canvas {
    margin-bottom: 20px;
    cursor: pointer;
}

#imageCanvas {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
}

/* モバイル向け：画面幅が480px以下 */
@media screen and (max-width: 480px) {
    canvas {
        margin-bottom: 20px;
        cursor: pointer;
        max-width: 100%;
    }
}

#slider {
    display: none;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-weight: bold;
    padding: unset;
}

/* モバイル向け：画面幅が480px以下 */
@media screen and (max-width: 480px) {
    .nav-button {
        display: none;
    }
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.5);
}

#prevButton {
    left: -65px;
}

#nextButton {
    right: -65px;
}

/* モーダル用 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 10%;
    width: 100%;
    height: 90%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
}

.modal-button {
    position: absolute;
    top: 85%;
    transform: translateY(-50%);
    width: 60px;
    height: 45px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    font-size: 24px;
    color: black;
    cursor: pointer;
    font-weight: bold;
    padding: unset;
}

.modal-button:hover {
    background: rgba(255, 255, 255, 0.6);
}

#modalPrev {
    left: 20px;
}

#modalNext {
    right: 20px;
}

#modalClose {
    position: absolute;
    top: 40px;
    right: 20px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 20px;
}

.counter {
    text-align: center;
    font-size: 18px;
    color: #333;
}

.centeritems{
    font-family: sans-serif;
    text-align: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}