body {
    margin: 0;
    font-family: "Yu Gothic", sans-serif;
    background: #0b0b0d url("assets/bg.jpg") center/cover fixed;
    color: #e0e0e0;
}

header {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #6a4dfc;
}

header h1 {
    color: #c8a8ff;
    text-shadow: 0 0 10px #6a4dfc;
}

.back-link {
    color: #c8a8ff;
}

.menu li {
    margin: 10px 0;
}

#search-section {
    padding: 15px;
    background: rgba(20, 20, 30, 0.8);
    border-bottom: 1px solid #444;
}

#search-box {
    width: 98%;
    padding: 12px;
    font-size: 18px;
    background: #1a1a1f;
    color: #fff;
    border: 1px solid #6a4dfc;
    border-radius: 6px;
}

/* タグフィルタ UI */
#tag-filter-area {
    margin: 10px 0;
}

.tag-filter-button {
    display: inline-block;
    padding: 6px 10px;
    margin: 4px;
    background: rgba(100, 100, 150, 0.3);
    border: 1px solid #6a4dfc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.tag-filter-button.active {
    background: rgba(150, 100, 255, 0.5);
    border-color: #c8a8ff;
}

/* テーブル内タグ */
.tag-group-box {
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #6a4dfc;
    border-radius: 6px;
    background: rgba(40, 40, 60, 0.4);
}

.tag-group-title {
    font-weight: bold;
    margin-bottom: 6px;
    color: #c8a8ff;
}

.tag-box {
    display: inline-block;
    padding: 3px 6px;
    margin: 2px;
    background: rgba(100, 100, 150, 0.3);
    border: 1px solid #6a4dfc;
    border-radius: 4px;
    font-size: 12px;
}

/* テーブルスクロール＋固定ヘッダー */
.table-wrapper {
    max-height: 950px;
    overflow-y: auto;
    border: 1px solid #6a4dfc;
}

.wiki-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 20, 30, 0.8);
    color: #e0e0e0;
}

.wiki-table thead th {
    position: sticky;
    top: 0;
    background: rgba(40, 40, 60, 0.95);
    z-index: 10;
    padding: 10px;
    border-bottom: 2px solid #6a4dfc;
    cursor: pointer;
}

/* 2段目ヘッダー */
.wiki-table thead tr:nth-child(2) th {
    top: 40px;
}

.wiki-table td {
    padding: 10px;
    border-bottom: 1px solid #444;
}

.wiki-table tr:nth-child(even) {
    background: rgba(30, 30, 45, 0.8);
}

/* 魔法陣風ハイライト */
.highlight {
    color: #fff;
    background: rgba(120, 60, 255, 0.35);
    padding: 2px 4px;
    border-radius: 4px;

    /* 外側グロー */
    box-shadow:
        0 0 6px rgba(180, 120, 255, 0.8),
        0 0 12px rgba(150, 80, 255, 0.6),
        0 0 20px rgba(120, 60, 255, 0.5);

    /* フェードイン・フェードアウト */
    animation: highlightPulse 1.8s ease-in-out infinite;
}

/* ゆらめく魔力のアニメーション */
@keyframes highlightPulse {
    0% {
        background: rgba(120, 60, 255, 0.25);
        box-shadow:
            0 0 4px rgba(180, 120, 255, 0.6),
            0 0 10px rgba(150, 80, 255, 0.4),
            0 0 16px rgba(120, 60, 255, 0.3);
    }
    50% {
        background: rgba(150, 80, 255, 0.45);
        box-shadow:
            0 0 8px rgba(200, 150, 255, 0.9),
            0 0 16px rgba(170, 120, 255, 0.7),
            0 0 26px rgba(150, 80, 255, 0.6);
    }
    100% {
        background: rgba(120, 60, 255, 0.25);
        box-shadow:
            0 0 4px rgba(180, 120, 255, 0.6),
            0 0 10px rgba(150, 80, 255, 0.4),
            0 0 16px rgba(120, 60, 255, 0.3);
    }
}

/* STATS色 */
.stats-S { color: #ffd700; font-weight: bold; }
.stats-A { color: #ff6347; font-weight: bold; }
.stats-B { color: #1e90ff; font-weight: bold; }
.stats-C { color: #00ff00; font-weight: bold; }
.stats-D { color: #32cd32; font-weight: bold; }
.stats-E { color: #a9a9a9; font-weight: bold; }
.stats-F { color: #696969; font-weight: bold; }
