/* Starscape Guide Custom Premium Tutorial Tour Styles */

/* 1. 全体暗転マスクとスポットライト効果 */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none; /* 下の要素の操作防止はJSで特定エリア外のみ制限 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tutorial-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* スポットライト（ターゲット要素を浮き上がらせる巨大シャドウ） */
.tutorial-spotlight {
    position: absolute;
    box-shadow: 0 0 0 9999px rgba(5, 7, 10, 0.75);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
    pointer-events: auto; /* スポットライト内のみクリック・操作可能 */
}

/* 2. グラスモーフィズム・ツールチップ */
.tutorial-tooltip {
    position: absolute;
    width: 320px;
    background: linear-gradient(135deg, rgba(15, 20, 30, 0.9) 0%, rgba(8, 10, 15, 0.95) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 202, 40, 0.25); /* 星座を思わせる繊細なゴールド枠 */
    border-radius: 16px;
    padding: 20px;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 202, 40, 0.05);
    z-index: 10001;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.tutorial-tooltip.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.tutorial-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tutorial-tooltip-step {
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffca28;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tutorial-tooltip-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
}

.tutorial-tooltip-close:hover {
    color: #ffffff;
}

.tutorial-tooltip-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.tutorial-tooltip-body {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.tutorial-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* チュートリアル用のボタン */
.btn-tutorial-next {
    background: #ffca28;
    color: #0b0e14;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tutorial-next:hover {
    background: #ffe082;
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(255, 202, 40, 0.2);
}

.btn-tutorial-prev {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tutorial-prev:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ツールチップの三角矢印（上下左右に対応） */
.tutorial-tooltip::after {
    content: "";
    position: absolute;
    border-width: 8px;
    border-style: solid;
    display: block;
    width: 0;
    height: 0;
}

.tutorial-tooltip.arrow-bottom::after {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-color: rgba(255, 202, 40, 0.25) transparent transparent transparent;
}

.tutorial-tooltip.arrow-top::after {
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-color: transparent transparent rgba(255, 202, 40, 0.25) transparent;
}

.tutorial-tooltip.arrow-left::after {
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-color: transparent rgba(255, 202, 40, 0.25) transparent transparent;
}

.tutorial-tooltip.arrow-right::after {
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-color: transparent transparent transparent rgba(255, 202, 40, 0.25);
}

/* 3. モバイル表示用スマホサイズ調整 */
@media (max-width: 768px) {
    .tutorial-tooltip {
        width: 280px;
        padding: 16px;
    }
}
