html,
body {
    background-color: #1f1f1f;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    margin: 0;
    flex-direction: row;
    /* 横長ディスプレイでは横並び */
    gap: 20px;
    /* 要素間のスペース */
}

#maru-png {
    max-width: 250px;
    height: auto;
    transition: transform 0.5s ease, top 0.5s ease;
    will-change: transform;
    position: relative;
}

h1,
h2 {
    color: whitesmoke;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        /* スマホでは縦並び */
        padding: 20px;
        /* コンテンツが端に寄りすぎないようにする */
    }

    h1,
    h2 {
        text-align: center;
        /* スマホ画面に適した中央揃え */
    }
}

/* QRコード生成モーダル */
#overlay-gen-qrcode {
    display: none;
    z-index: 1;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    ;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#content-gen-qrcode {
    z-index: 2;
    width: 45%;
    padding: 1em;
    background: whitesmoke;
    border-radius: 10px;
}

.qrcode {
    margin-bottom: 5%;
    display: grid;
    place-items: center;
}

.input-textbox {
    font-size: 24px;
    width: 90%;
    height: 40px;
    text-align: center;
    border-radius: 5px;
}

.btn-zone {
    margin-top: 10px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.btn-close {
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: center;
    align-items: center;
}

.setting-contents {
    text-align: center;
}

/* QR生成ボタンの間隔 */
.btn-zone {
    margin-top: 5%;
    display: flex;
    justify-content: space-between;
}

/* 最後のボタンの右側のマージンを0にする（オプショナル） */
.btn-zone button:last-child {
    margin-right: 0;
}

@keyframes moveAround {
    0% { top: 0; left: 0; }
    25% { top: 0; left: 100%; transform: translateX(-100%); }
    50% { top: 100%; left: 100%; transform: translate(-100%, -100%); }
    75% { top: 100%; left: 0; transform: translateY(-100%); }
    100% { top: 0; left: 0; }
}

/* 初期状態はアニメーションなし */
.animate {
    animation: moveAround 4s linear infinite;
}