/* ▼ 全体（魔法一覧と統一） */
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 {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: rgba(20, 20, 30, 0.95);
    border-right: 2px solid #6a4dfc;
    padding: 20px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* ▼ 初期状態は閉じる */
#sidebar.closed {
    transform: translateX(-100%);
}

/* ▼ 開いた状態 */
#sidebar {
    transform: translateX(0);
}

#sidebar h2 {
    margin-top: 0;
    color: #c8a8ff;
    text-shadow: 0 0 10px #6a4dfc;
}

#sidebar h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #c8a8ff;
    text-shadow: 0 0 6px #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 {
    position: absolute;
    top: 1%;
    right: -32px; /* サイドバーの外側にぶら下げる */
    width: 28px;
    height: 90px;

    /* 革の質感 */
    background: linear-gradient(180deg, #6a4dfc, #3a2a7a);
    background-size: cover;

    /* 革の縁の金装飾 */
    border-right: 3px solid gold;
    border-radius: 0 8px 8px 0;

    /* 革の質感を強調する影 */
    box-shadow:
        inset 0 0 6px rgba(255, 255, 255, 0.15),
        0 0 12px #6a4dfc;

    cursor: pointer;
    z-index: 1200;


}

/* ▼ 栞の揺れアニメーション */
@keyframes bookmarkFloat {
    0%   { transform: translateX(0); }
    50%  { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

/* ▼ 右コンテンツ（PC時はサイドバー閉じているので全幅） */
#content {
    flex: 1;
    height: 100vh;
    margin-left: 0; /* 初期状態は全幅 */
    background: rgba(20, 20, 30, 0.8);
}

#content iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
}

#content.closed {
    flex: 1;
    margin-left: -260px;
}

/* ▼ フェードイン・フェードアウト */
.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;
}

.contents {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #6a4dfc;
}

/* ▼ 公式リンクブロック */
.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;
}

.welcome {
  padding: 40px;
  color: #e0e0e0;
  font-family: "Yu Gothic", sans-serif;
}
.welcome h1 {
  color: #c8a8ff;
  text-shadow: 0 0 10px #6a4dfc;
  border-bottom: 1px solid #6a4dfc;
  padding-bottom: 10px;
}
.welcome section {
  margin-top: 30px;
}
.welcome h2 {
  color: #c8a8ff;
  text-shadow: 0 0 6px #6a4dfc;
  font-size: 22px;
  margin-bottom: 10px;
}
.welcome ul {
  list-style: none;
  padding-left: 0;
}
.welcome li {
  margin: 6px 0;
}
.welcome a {
  color: #e0e0e0;
  text-decoration: none;
}
.welcome a:hover {
  color: #c8a8ff;
}

@keyframes rotateCircle {
    to { transform: rotate(360deg); }
}

@keyframes rotateCircleReverse {
    to { transform: rotate(-360deg); }
}

/* ▼ スマホ時も同じ挙動でOK */
@media (max-width: 900px) {
    #content {
        margin-left: 0;
    }
}
