/* モーダル背景 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out forwards;
    /* このモーダル自体をスクロール可能にする */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* iOSでのスムーズなスクロール */
}

/* モーダルコンテンツ */
.modal-content {
    background-color: #ffffff;
    padding: 24px;
    border: none;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    box-sizing: border-box;
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    margin: auto;
    /* ここを追加して中央寄せを確実に */
}

/* 閉じるボタン */
.close {
    color: #999;
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 32px;
    font-weight: normal;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* メンバーボタン */
.member-img button {
    font-size: 16px;
    padding: 12px 24px;
    border: none;
    background-color: #ff7f00;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.member-img button:hover {
    background-color: #e67300;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* モバイル向けスタイル調整 */
@media (max-width: 600px) {
    .modal-content {
        margin: 15px;
        padding: 20px;
        max-width: 95%;
    }

    #profile-name {
        margin-top: 25px;
        font-size: 2.0em;
    }

    .profile-content {
        font-size: 20px;
    }

    .close{
        font-size: 64px;
    }
}