/* ============================== */
/* 全体設定                        */
/* ============================== */
* {
    margin: 0;
    padding: 0;
}

/* ボディ */
body {
    display: flex;
    overflow: hidden;
    background: linear-gradient(to bottom, #0b0b30, rgba(11, 11, 48, 0));
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "游ゴシック", "Yu Gothic", "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, "Noto Sans JP", sans-serif;
}

/* ============================== */
/* レイアウト設定                    */
/* ============================== */
nav {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: inline-block; /* 横並び */
}

nav ul li {
    position: absolute;
    top: 0;
    left: calc(50vw - 30px);
    list-style: none; /* リストのデフォルトのマーカーを消す */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
}

button {
    all: unset;
    position: absolute;
    top: 0;
    right: 10vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    cursor: pointer;
}

/* ============================== */
/* 振り子の月（メニューボタン）      */
/* ============================== */
.string {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, #0b0b30, #ab9c6f);
}

.moon {
    position: relative;
    width: 40px;
    height: 40px;
    background-color: #ab9c6f;
    border-radius: 50%;
}

.moon::before {
    content: "";
    position: absolute;
    width: 75%;
    height: 75%;
    top: 3px;
    right: 12px;
    background-color: #0b0b30;
    border-radius: 50%;
}

/* ============================== */
/* 星のアニメーション                 */
/* ============================== */
.star-string {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, #0b0b30, #ab9c6f, #ab9c6f);
}

.star {
    width: 20px;
    height: 20px;
    background-color: #ab9c6f;
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 
        68% 57%, 79% 91%, 50% 70%, 
        21% 91%, 32% 57%, 2% 35%, 39% 35%
    );
}

/* ============================== */
/* 星の文字                          */
/* ============================== */
.star-text {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: #ab9c6f;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* ============================== */
/* アニメーション設定                 */
/* ============================== */
@keyframes swing {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(10deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(6deg); }
    80% { transform: rotate(-4deg); }
    100% { transform: rotate(0deg); }
}

.swinging {
    animation: swing 1.5s ease-out;
}

@keyframes moon-swing {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(5deg); }
    40% { transform: rotate(-4deg); }
    60% { transform: rotate(3deg); }
    80% { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

.moon-swinging {
    animation: moon-swing 0.8s ease-out;
}