body {
    font-family: 'Noto Sans JP', 'Arial', 'Helvetica', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: white;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    color: #0275f8
}

/* 左側のスクエアとパラレログラム */
.square-left,
.square-right {
    width: 500px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    position: relative;
}

.square-left {
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    z-index: 10;
}

.square-right {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%);
}

.parallelogram-left {
    position: absolute;
    width: 100%;
    height: 100%;
    /* background-color: #15cd51; */
    clip-path: polygon(80% 0, 100% 0, 90% 100%, 70% 100%);
}

.parallelogram-right {
    position: absolute;
    width: 100%;
    height: 100%;
    /* background-color: #15cd51; */
    clip-path: polygon(0 0, 20% 0, 30% 100%, 0 100%);
}

.center-image {
    width: auto;
    height: 120px;
    padding: 10px;
}


header {
    display: block;
    /* フレックスを無効にして縦に配置 */
    margin-bottom: 30px;
    text-align: center;
    /* 中央寄せ */
}


#search {
    display: block;
    margin: 0 auto;
    text-align: center;
    padding: 10px 40px 10px 40px;
    /* 右にアイコン分の余白を確保 */
    font-size: 16px;
    width: 300px;
    margin-bottom: 20px;
    border-radius: 25px;
    border: 1px solid #ccc;
    background-image: url('img/smashball.gif');
    /* アイコンURL */
    background-size: 20px;
    /* アイコンのサイズ */
    background-position: 10px center;
    /* アイコンの位置を調整 */
    background-repeat: no-repeat;
    /* アイコンが繰り返されないように */
    box-sizing: border-box;
    border-color: #131313;
    border: solid 2px;
}

#sort {
    padding: 10px;
    font-size: 16px;
}

.index ul,
ol {
    padding: 0;
    position: relative;
}

.index ul li,
ol li {
    color: #131313;
    border-left: solid 6px #338ef7;
    /*左側の線*/
    background: #f1f8ff;
    /*背景色*/
    margin-bottom: 3px;
    /*下のバーとの余白*/
    line-height: 1.5;
    padding: 0.5em;
    list-style-type: none !important;
    /*ポチ消す*/
    font-weight: bold;
    cursor: pointer;
}

.index li:hover {
    background-color: #b2d9ff;
    transition: linear 0.5s;
}

#index-list {
    display: none;
    /* 初期状態では表示 */
}

#index-list.collapsed {
    display: block;
    /* 折りたたみ時は非表示 */
}

.index h2 {
    cursor: pointer;
    /* クリックできることを示すカーソル */
    user-select: none;
    /* テキスト選択を無効化 */
}


.nested-list {
    font-size: 14px;
    list-style-type: none;
    padding-left: 20px;
    /* インデントを追加 */

}

.nested-list li {
    border-left: solid 3px #0275f8;
    margin-left: 10px;
}

.nested-list li:hover {
    background-color: #83c1ff;
}

.has-sublist .toggle {
    cursor: pointer;
    /* クリック可能に */
}

/* 折り畳み状態を切り替えるスタイル */
.nested-list.active {
    display: block;
    /* アクティブ状態のサブリストは表示 */
}

.nested-list li {
    margin-bottom: 5px;
    /* 入れ子リストの項目間のスペースを小さく */
}

.unique-useful li:hover {
    border-left: solid 6px #c32c3f;
    background-color: #f8d6d6;
}

.unique-spells li:hover {
    border-left: solid 6px #a770ff;
    background: #ede3ff;
}

.button-container {
    display: flex;
    justify-content: center;
    /* X軸の中央に配置 */
    gap: 20px;
    /* ボタンの間にスペースを追加 */
    margin: 20px 0;
}

.button-container button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    background-color: #131313;
    color: white;
    border-top: 5px solid transparent;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    transition: background-color 0.5s ease, border-bottom 0.3s ease;
    /* トランジションをボタン全体に設定 */

}

.kana-button {
    border-bottom: 3px solid #ffa60a;

}

.kana-button:hover {
    background-color: #ffa60a;

}

.alpha-button {
    border-bottom: 3px solid #15cd51;
    /* 初期の下のボーダーの色 */
}

.alpha-button:hover {
    background-color: #15cd51;
    /* ホバー時の背景色 */

}

.category-button {
    border-bottom: 3px solid #8bcbff;
}

.category-button:hover {
    background-color: #8bcbff;

}

.tournament-button {
    border-bottom: 3px solid #c32c3f;
}

.tournament-button:hover {
    background-color: #c32c3f;

}

main {
    width: 80%;
    /* 全体の80%の幅を指定 */
    max-width: 1200px;
    /* 最大幅を1200pxに制限 */
    margin: 0 auto;
    /* X軸の中央に揃える */
}

.table-title {
    background-color: #131313;
    color: white;
    display: flex;
    padding-left: 10px;
    align-items: center;
    /* 垂直方向に中央に配置 */
    height: 50px;
    margin: 20px 0;
    font-size: 20px;
    font-weight: bold;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 97% 100%, 0 100%);
    border-left: solid 5px #ebeb02;
}

.table-title:hover {
    background-color: #2b2b2b;
    transition: background-color 0.8s ease;
}

.table-title p {
    color: white;
    font-weight: bold;
    z-index: 1;
}

.right-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    /* 欠けている部分の幅 */
    height: 100%;
    background-color: #5c5c5c;
    /* 欠けている部分の色 */
    clip-path: polygon(80% 0, 100% 0, 97% 100%, 70% 100%);
    /* 平行四辺形にする */
    z-index: 0;
    /* 背面に配置 */
}

table {
    width: 100%;
    border-collapse: collapse;
    /* ボーダーの重なりを解消 */
    margin-top: 20px;
    /* テーブルの上にスペースを追加 */
}

th,
td {
    padding: 10px;
    border: 1px solid #bbbbbb;
    /* ボーダーのスタイル */
    text-align: left;
    /* テキストを左揃え */
}


th {
    background-color: #131313;
    /* ヘッダーの背景色 */
    color: white;
    width: 500px;
    padding: 15px;
    position: relative;
    text-align: center;
    /* border-bottom: 3px solid #2d8fdd; */
    overflow: hidden;
}

th ::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0;
    transition: opacity 0.8s ease, transform 1s ease;
    filter: blur(15px);
}

th:hover::after {
    opacity: 0.5;
    transform: scale(1.1);
}

th:hover {
    background-color: #2b2b2b;
    transition: background-color 0.8s ease;
}

.section-index {
    padding-left: 0px;
    border: none;
    cursor: pointer;
}

.sticky-row {
    position: -webkit-sticky;
    /* For Safari */
    position: sticky;
    top: 0;
    z-index: 12;
    /* Ensure it stays on top */
    background-color: #fff;
    /* Background to avoid transparency */
}

.ja-triangle {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    /* 左側の透明な部分 */
    border-bottom: 15px solid #ef1a28;
    /* 三角形の色 */
}

.en-triangle {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    /* 左側の透明な部分 */
    border-bottom: 15px solid #338ef7;
    /* 三角形の色 */
}

.roman-triangle {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    /* 左側の透明な部分 */
    border-bottom: 15px solid #9833f7;
}

.japanese {}

.english {}

.romaji {}

.sortable {
    cursor: pointer;
}

#terms-table tr:hover {
    background-color: #c4c4c4;
}

.top-btn {
    position: fixed;
    bottom: 20px;
    right: -100px;
    padding: 10px;
    /* 内側のパディング */
    background-color: #131313;
    /* ボタンの背景色（半透明） */
    border: none;
    border-radius: 40px;
    cursor: pointer;
    z-index: 100;
    display: none;
    transition: right 0.3s ease, opacity 0.3s ease;
    /* 右からぬるっと表示、消える際のアニメーション */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    /* 左上を欠けた形 */
    opacity: 0;
    /* 初期状態では非表示にするため */
}

.top-btn-image {
    width: 30px;
    /* 画像の幅 */
    height: 30px;
    /* 画像の高さ */
}

/* ボタンが表示される時のスタイル */
.show {
    right: 20px;
    /* 画面内の位置に移動 */
    opacity: 1;
    /* ボタンを表示 */
}

/* ボタンが表示される時のスタイル */
.show {
    right: 20px;
    /* 画面内の位置に移動 */
}


footer {
    background-color: #f0f0f0;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #333;
    margin-top: 30px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;

}

/* ロゴスタイル */
.footer-logo {
    width: 200px;
    /* ロゴのサイズを調整 */
    margin: 0 auto;
    margin-bottom: 10px;
}

/* Twitterリンクスタイル */
.social {
    margin-top: 20px;
    text-align: center;
}

.social p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #2b2b2b;
    font-weight: bold;
}


.twitter-link {
    display: inline-block;
    /* インラインブロックで改行せずに並べる */
    text-decoration: none;
    /* 下線を消す */
    color: #131313;
    /* テキストの色 */
    margin: 10px;
    /* アイコンの間隔を調整 */
}

.twitter-icon {
    width: 50px;
    /* アイコンのサイズを調整 */
    height: 50px;
    /* 高さを設定して正方形に */
    border-radius: 50%;
    /* 丸くマスク */
    overflow: hidden;
    /* はみ出た部分を隠す */
    display: block;
    /* ブロック要素にして、余白を確保 */
    margin: 0 auto;
    /* 中央揃え */
}

.twitter-name {
    display: block;
    /* ブロック要素にして、アイコンの下に配置 */
    margin-top: 5px;
    /* アイコンとの間隔を調整 */
    font-size: 14px;
    /* テキストサイズを調整 */
}

/* その他のスタイル */
.social a:hover {
    color: #0d8fe3;
    /* ホバー時の色 */
}

/* フッター内の文章の間隔やスタイル */
.disclaimer {
    margin-top: 20px;
    line-height: 1.6;
}

.disclaimer p {
    margin-bottom: 10px;
}

/* 文字を少し小さくする */
footer p {
    font-size: 12px;
    color: #555;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {

    /* フッターのロゴサイズを小さくする */
    .footer-logo {
        width: 120px;
    }

    /* Twitterアイコンとテキストの間隔を調整 */
    .social a {
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    #search {
        display: block;
        margin: 0 auto;
        padding: 10px;
        font-size: 16px;
        width: 268px;
        margin-bottom: 20px;
        /* ボタンと検索ボックスの間に余白 */
        border-radius: 25px;
    }

    /* Twitterアカウントの表示を縦方向に */
    .social a {
        display: block;
        margin: 10px auto;
    }

    /* ロゴをさらに小さく */
    .footer-logo {
        width: 180px;
    }

    /* フッター内のフォントサイズを調整 */
    footer p {
        font-size: 10px;
    }

    /* フッター全体のパディングを縮小 */
    footer {
        padding: 10px;
    }

    .social p {
        font-size: 12px;
    }

    .twitter-name {
        font-size: 12px;
    }
}


@media (max-width: 768px) {

    .square-left,
    .square-right {
        height: 80px;

    }

    /* Adjust image size */
    .center-image {
        height: 80px;
    }

    .button-container {
        flex-direction: column;
        /* 縦方向にボタンを並べる */
        align-items: center;
        /* 縦方向で中央揃えにする */
    }

    .button-container button {
        width: 100%;
        /* ボタンを親コンテナの幅に合わせる */
        max-width: 300px;
        /* 最大幅を設定してボタンの横幅を制限 */
    }

    .right-bg {
        position: absolute;
        top: 0;
        right: 0;
        width: 30%;
        /* 欠けている部分の幅 */
        height: 100%;
        background-color: #5c5c5c;
        /* 欠けている部分の色 */
        clip-path: polygon(60% 0, 100% 0, 97% 100%, 50% 100%);
        /* 平行四辺形にする */
        z-index: 0;
        /* 背面に配置 */
    }
}

@media (max-width: 480px) {
    main {
        width: 95%;
        /* 全体の80%の幅を指定 */
        margin: 0 auto;
        font-size: 15px;
    }

    .square-left,
    .square-right {
        width: 150px;
        height: 60px;
    }

    .button-container {
        margin-left: 60px;
        margin-right: 60px;
    }

    .center-image {
        height: 60px;
    }
}