/* ▼ 全体（魔法一覧と統一） */
body {
    margin: 0;
    font-family: "Yu Gothic", sans-serif;
    background: #0b0b0d url("assets/bg.jpg") center/cover fixed;
    color: #e0e0e0;
    display: flex;
    height: 100vh;
}

/* ▼ 左メニュー */
#sidebar {
    width: 260px;
    background: rgba(20, 20, 30, 0.95);
    border-right: 2px solid #6a4dfc;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    transition: transform 0.3s ease;
}

#sidebar h2 {
    margin-top: 0;
    color: #c8a8ff;
    text-shadow: 0 0 10px #6a4dfc;
}

#sidebar ul {
    list-style: none;
    padding: 0;
}

#sidebar li {
    margin: 12px 0;
}

#sidebar a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 18px;
}

#sidebar a:hover {
    color: #c8a8ff;
}

/* ▼ トグルボタン */
#menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(40, 40, 60, 0.9);
    border: 1px solid #6a4dfc;
    padding: 10px 14px;
    font-size: 22px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 6px;
    color: #e0e0e0;
}

/* ▼ 右コンテンツ */
#content {
    flex: 1;
    height: 100vh;
    background: rgba(20, 20, 30, 0.8);
}

#content iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
}

/* ▼ フェードイン・フェードアウト */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ▼ 魔法陣ローディング */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* 魔法陣の円 */
.magic-circle {
    width: 120px;
    height: 120px;
    border: 4px solid #6a4dfc;
    border-radius: 50%;
    position: relative;
    animation: rotateCircle 2.5s linear infinite;
    box-shadow: 0 0 20px #6a4dfc;
}

/* 内側の紋章 */
.magic-circle::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    width: 84px;
    height: 84px;
    border: 3px dashed #c8a8ff;
    border-radius: 50%;
    animation: rotateCircleReverse 3s linear infinite;
}

/* 外側の紋章 */
.magic-circle::after {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    width: 140px;
    height: 140px;
    border: 2px dotted #6a4dfc;
    border-radius: 50%;
    animation: rotateCircle 4s linear infinite;
    opacity: 0.6;
}

/* ▼ 公式リンクブロック */
.official-links {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #6a4dfc;
}

.official-links h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #c8a8ff;
    text-shadow: 0 0 6px #6a4dfc;
}

.official-links a {
    display: block;
    margin: 6px 0;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
}

.official-links a:hover {
    color: #c8a8ff;
}

@keyframes rotateCircle {
    to { transform: rotate(360deg); }
}

@keyframes rotateCircleReverse {
    to { transform: rotate(-360deg); }
}

/* ▼ スマホ表示時の挙動 */
@media (max-width: 900px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 999;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #content {
        flex: 1;
        margin-left: 0;
    }
}
