/* ロード画面のスタイル */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a2e; /* 深い夜空のような背景色 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 最前面に表示 */
    opacity: 1;
    transition: opacity 1s ease-out; /* フェードアウトのアニメーション */
}

/* ロード画面が非表示になる際のスタイル */
#loading-screen.fade-out {
    opacity: 0;
}
/* sessionStorageによって初期非表示にする場合 */
#loading-screen.hidden-by-session {
    display: none;
    opacity: 0; /*念のため*/
}


/* 3Dキューブのコンテナ */
.cube-container {
    width: 100px;
    height: 100px;
    perspective: 800px; /* 3D効果のための視点 */
    margin-bottom: 40px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 12s infinite linear; /* 回転アニメーション */
}

.cube-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: rgba(23, 190, 182, 0.8); /* 半透明のターコイズブルー */
    border: 1px solid #00c2cb; /* 明るいターコイズのボーダー */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 194, 203, 0.5);
}

/* キューブの各面の位置調整 */
.front  { transform: rotateY(  0deg) translateZ(50px); }
.back   { transform: rotateY(180deg) translateZ(50px); }
.right  { transform: rotateY( 90deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.top    { transform: rotateX( 90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }

/* サイコロの目のようなドット (簡易版) */
.dots {
    display: grid;
    width: 60%;
    height: 60%;
}
.dot {
    background-color: #fff;
    border-radius: 50%;
}

/* 各面のドット配置例 (CSS Gridを使用) */
.dots-1 { grid-template-areas: ". . ." ". c ." ". . ."; }
.dots-1 .dot { grid-area: c; }

.dots-2 { grid-template-areas: "a . ." ". . ." ". . b"; }
.dots-2 .dot:nth-child(1) { grid-area: a; }
.dots-2 .dot:nth-child(2) { grid-area: b; }

.dots-3 { grid-template-areas: "a . ." ". b ." ". . c"; }
.dots-3 .dot:nth-child(1) { grid-area: a; }
.dots-3 .dot:nth-child(2) { grid-area: b; }
.dots-3 .dot:nth-child(3) { grid-area: c; }

.dots-4 { grid-template-areas: "a . b" ". . ." "c . d"; }
.dots-4 .dot:nth-child(1) { grid-area: a; }
.dots-4 .dot:nth-child(2) { grid-area: b; }
.dots-4 .dot:nth-child(3) { grid-area: c; }
.dots-4 .dot:nth-child(4) { grid-area: d; }

.dots-5 { grid-template-areas: "a . b" ". c ." "d . e"; }
.dots-5 .dot:nth-child(1) { grid-area: a; }
.dots-5 .dot:nth-child(2) { grid-area: b; }
.dots-5 .dot:nth-child(3) { grid-area: c; }
.dots-5 .dot:nth-child(4) { grid-area: d; }
.dots-5 .dot:nth-child(5) { grid-area: e; }

.dots-6 { grid-template-areas: "a . b" "c . d" "e . f"; }
.dots-6 .dot:nth-child(1) { grid-area: a; }
.dots-6 .dot:nth-child(2) { grid-area: b; }
.dots-6 .dot:nth-child(3) { grid-area: c; }
.dots-6 .dot:nth-child(4) { grid-area: d; }
.dots-6 .dot:nth-child(5) { grid-area: e; }
.dots-6 .dot:nth-child(6) { grid-area: f; }


/* キューブの回転アニメーション */
@keyframes rotate-cube {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* ローディングメッセージのスタイル */
.loading-message {
    color: #e0e0e0; /* やや明るいグレー */
    font-size: 1.3em;
    font-family: 'Orbitron', sans-serif; /* テクノっぽいフォント */
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00c2cb;
    min-height: 2em; /* メッセージ切り替え時の高さ変動を防ぐ */
    text-align: center;
}

/* メインコンテンツのスタイル (初期状態は非表示) */
#main-content {
    display: none;
    padding: 30px;
    text-align: center;
}
#main-content h1 {
    color: #1a1a2e;
}