/* ===============================
   WebRTC Chat 専用スタイル（追加）
   =============================== */

/* WebRTC Chat 全体を囲むラッパ */
.webrtc-container {
    max-width: 900px;
    margin: auto;
    text-align: left;      /* body の center を上書き */
}

/* 入力欄とボタン */
.webrtc-container input,
.webrtc-container button {
    padding: 8px;
    margin: 4px 0;
    font-size: 1rem;
}

/* メール入力欄 */
#myEmail,
#peerEmail {
    width: 260px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#msgInput {
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ボタン共通 */
.webrtc-container button {
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.webrtc-container button:hover {
    opacity: 0.85;
}

.webrtc-container button:active {
    transform: scale(0.98);
}

.webrtc-container button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* チャットログ */
#chatLog {
    height: 250px;
    border: 1px solid #ccc;
    padding: 8px;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* メッセージ色 */
.me {
    color: #0b6;
    font-weight: bold;
}

.other {
    color: #06c;
}

/* 入力エリアの配置 */
.webrtc-message-area {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 90vh;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 9999;
    border-radius: 8px;
}

.modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10000;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* スマホ対応 */
@media (max-width: 600px) {
    #myEmail,
    #peerEmail {
        width: 100%;
    }

    .webrtc-message-area {
        flex-direction: column;
    }

    .webrtc-container button {
        width: 100%;
    }
}