body {
    background-color: #e0f7fa;
    /* 明るい水色 */
    color: #333;
    /* 濃い灰色 */
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* `height`を`min-height`に変更 */
    margin: 0;
}

#title-screen,
#online-screen {
    text-align: center;
    background-color: #fff;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 3em;
    color: #4db6ac;
    /* 少し濃い目の緑 */
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.controls,
.online-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#start-button,
#online-button,
#connect-button,
#copy-id-button,
#show-host-ui-button,
#show-client-ui-button,
#copy-id-button-client,
#connect-button-host,
#online-party-go-button,
#back-to-title-button {
    background-color: #81c784;
    /* 明るい緑 */
    color: white;
    font-size: 1.5em;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#start-button:hover,
#online-button:hover,
#connect-button:hover,
#copy-id-button:hover,
#show-host-ui-button:hover,
#show-client-ui-button:hover,
#copy-id-button-client:hover,
#connect-button-host:hover,
#back-to-title-button:hover {
    background-color: #66bb6a;
}

#connect-button:disabled,
#copy-id-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

#volume-slider {
    width: 200px;
    cursor: pointer;
    accent-color: #66bb6a;
    /* スライダーの色 */
}

.hidden {
    display: none !important;
}

/* オンライン対戦画面のスタイル */
.peer-info,
.connection-controls,
.connection-status {
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 10px;
}

#my-peer-id {
    font-weight: bold;
    color: #4db6ac;
    font-family: monospace;
}

#peer-id-input {
    padding: 10px;
    font-size: 1.2em;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    width: 200px;
}

#connection-status {
    font-weight: bold;
    margin: 0;
}


/* パーティー編成ボタンのアニメーション */
@keyframes pulse {
    0% {
        box-shadow: 0 8px 16px rgba(255, 107, 53, 0.3);
    }

    50% {
        box-shadow: 0 8px 16px rgba(255, 107, 53, 0.6);
    }

    100% {
        box-shadow: 0 8px 16px rgba(255, 107, 53, 0.3);
    }
}

/* パーティー編成ボタンの追加スタイル */
.proceed-button {
    display: block !important;
    margin: 30px auto !important;
    position: relative;
    overflow: hidden;
}

.proceed-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.proceed-button:hover::before {
    left: 100%;
}

#online-screen .online-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

#connection-mode-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#host-info,
#client-controls {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#host-info .peer-info {
    background-color: #f0f8ff;
    border: 1px solid #add8e6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

#my-peer-id {
    font-family: monospace;
    font-size: 1.2em;
    color: #0056b3;
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    word-break: break-all;
    margin: 10px 0;
}

#host-connection-status,
#client-connection-status {
    font-weight: bold;
    min-height: 24px;
    /* メッセージの有無でレイアウトが崩れないように */
}

#online-party-go-button {
    margin-top: 20px !important;
    background-color: #ff6347;
    /* トマト色 */
    animation: pulse 1.5s infinite;
}

#online-party-go-button:hover {
    background-color: #e55337;
}

#mobile-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 半透明の黒で背後のUIを暗くする */
    z-index: 1000; /* 最前面に表示 */
    display: flex;
    justify-content: center;
    align-items: center;
}

#mobile-warning-overlay.hidden {
    display: none;
}

.warning-box {
    background-color: #f8d7da; /* 警告色 */
    color: #721c24; /* 文字色 */
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.warning-box h3 {
    margin-top: 0;
}

.warning-box button {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #dc3545; /* 閉じるボタンの色 */
    color: white;
    cursor: pointer;
    font-weight: bold;
}