<!doctype html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- ビューポート設定 -->
  <script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
  
    body {
      font-family: sans-serif;
      background-color: #2f3136;
      color: #ffffff;
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .swal2-popup {
      background-color: #36393f !important; /* モーダル背景色 */
      color: #ffffff !important; /* テキスト色 */
      border-radius: 8px !important; /* 角を丸く */
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important; /* 影を付ける */
      width: 90% !important; /* モーダル幅を画面の90%に設定 */
      max-width: 500px !important; /* 最大幅を設定 */
      min-width: 300px !important; /* 最小幅を設定 */
    }

    .swal2-title {
      color: #ffffff !important; /* タイトル色 */
      font-size: 1.5em !important; /* タイトルフォントサイズ */
    }

    .swal2-html-container {
      color: #ffffff !important; /* テキスト色 */
      font-size: 1em !important; /* テキストフォントサイズ */
    }

    /* スマホ用レスポンシブ対応 */
    @media screen and (max-width: 480px) {
      .swal2-popup {
        width: 95% !important; /* スマホ画面で幅を95%に設定 */
        font-size: 0.9em !important; /* 全体のフォントサイズを少し小さく */
      }

      .swal2-title {
        font-size: 1.2em !important; /* タイトルフォントサイズを縮小 */
      }

      .swal2-html-container {
        font-size: 0.9em !important; /* テキストフォントサイズを縮小 */
      }
    }

    /* タブレット向けの調整 */
    @media screen and (min-width: 481px) and (max-width: 768px) {
      .swal2-popup {
        width: 85% !important; /* タブレット画面で幅を85%に設定 */
      }

      .swal2-title {
        font-size: 1.4em !important; /* タイトルフォントサイズを調整 */
      }

      .swal2-html-container {
        font-size: 1.1em !important; /* テキストフォントサイズを調整 */
      }
    }
  
</head>
<body>
  <script>
    window.onload = function() {
      Swal.fire({
        title: 'ロール作成完了！',
        text: 'この画面は閉じて構いません。',
        icon: 'success',
        showConfirmButton: false,  // OKボタンを非表示
        allowOutsideClick: false,  // 背景クリックで閉じない
        customClass: {
          popup: 'swal2-popup',
          title: 'swal2-title',
          htmlContainer: 'swal2-html-container',
        }
      });
    };
  </script>
</body>
</html>
