* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "MS PGothic", "MS Gothic", sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* メインコンテンツ */
.container {
    position: relative;
    z-index: 10;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

.main-box {
    background: #1a1a2e;
    border: 3px double #ffd700;
    padding: 50px 40px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

h1 {
    font-size: 28px;
    color: #ffd700;
    text-shadow: 3px 3px #ff1493, 0 0 10px #ffd700;
    margin-bottom: 10px;
    animation: glow 2s infinite;
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 3px 3px #ff1493, 0 0 10px #ffd700;
    }

    50% {
        text-shadow: 3px 3px #ff1493, 0 0 25px #ffd700, 0 0 40px #ffd700;
    }
}

.subtitle {
    color: #ff69b4;
    font-size: 13px;
    margin-bottom: 30px;
}

.divider {
    border: none;
    border-top: 2px dotted #4a90e2;
    margin: 25px 0;
}

.description {
    color: #ddd;
    line-height: 2;
    font-size: 13px;
    margin-bottom: 25px;
}

.description strong {
    color: #4af;
}

/* 警告テキスト */
.warning {
    background: rgba(255, 20, 147, 0.1);
    border: 1px solid #ff1493;
    padding: 12px;
    font-size: 12px;
    color: #ff69b4;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* 入場ボタン周辺 */
.enter-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* 画像と作品ボックスの横並び */
.annai-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    align-self: flex-start;
    margin-left: calc(30% - 130px);
}

.annai-img {
    width: 200px;
    /* ← サイズはここで変更 */
    height: auto;
    flex-shrink: 0;
}

/* 作品リンクボックス */
.works-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid #4a90e2;
    padding: 10px 14px;
    min-width: 160px;
    text-align: left;
}

.works-box-title {
    color: #4af;
    font-size: 20px;
    margin-bottom: 4px;
    border-bottom: 1px dotted #4a90e2;
    padding-bottom: 4px;
}

.works-box-link {
    display: block;
    color: #ddd;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s;
}

.works-box-link:hover {
    color: #ff69b4;
}

.enter-btn {
    display: inline-block;
    padding: 18px 60px;
    background: #ff1493;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    border: 2px solid #ff69b4;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 20, 147, 0.9), 0 0 40px rgba(255, 20, 147, 0.4);
    }
}

.enter-btn:hover {
    background: #ff69b4;
    box-shadow: 0 0 30px #ff1493;
    transform: scale(1.03);
}

.enter-note {
    margin-top: 12px;
    font-size: 11px;
    color: #888;
}

/* DLSiteリンク */
.dlsite-link {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.dlsite-link a {
    color: #4af;
    font-size: 13px;
    text-decoration: none;
}

.dlsite-link a:hover {
    color: #ff69b4;
    text-decoration: underline;
}

footer {
    margin-top: 20px;
    font-size: 11px;
    color: #555;
}



/* スクロールフェードイン */
.fade-left,
.fade-right {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-left {
    transform: translateX(-60px);
}

.fade-right {
    transform: translateX(60px);
}

.fade-left.is-visible,
.fade-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* 左右画像の横並び */
.side-images {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 20px 0;
    gap: 10px;
}

.side-images img {
    width: 45%;
    height: auto;
}

.side-images .fade-right img,
.side-images img.fade-right {
    margin-right: -40px;
    width: 55%;
    /* ← この数値で調整 */
}

/* トップへ戻るボタン */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 100;
}

#backToTop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#backToTop.is-show {
    opacity: 1;
    pointer-events: auto;
}



/* メモ書きボックス */
.memo {
    width: 45%;
    background: #fffde7;
    border: 1px solid #ccc;
    padding: 16px;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.3);
    transform: rotate(-1.5deg);
    align-self: center;
    text-align: left;
}

.memo-right {
    transform: rotate(1.5deg);
}

.memo-left {
    transform: rotate(-1.5deg);
}

.memo-text {
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 13px;
    color: #333;
    line-height: 1.9;
    white-space: pre-wrap;
    min-height: 60px;
}

/* 中央ふわっと表示 */
.fade-in-center {
    text-align: center;
    margin: 20px 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-in-center.is-visible {
    opacity: 1;
}

.fade-in-center img {
    width: 100%; /* ← サイズはここで調整 */
    height: auto;
    z-index: 100;
    border: 2px solid #723aff;
}

@media screen and (max-width: 480px) {
    .main-box {
        padding: 35px 20px;
    }

    h1 {
        font-size: 22px;
    }

    .enter-btn {
        padding: 15px 40px;
        font-size: 14px;
    }

    .annai-row {
        margin-left: 0;
        margin-left: calc(40% - 130px);
    }

    .annai-img {
        width: 150px;
    }

    .works-box {
        display: none;
    }

    .side-images {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .side-images .memo {
        width: 90%;
        transform: rotate(-1deg);
    }

    /* 右画像のブロックはメモを下に */
    .side-images .memo-left {
        order: 2;
    }

    .side-images img.fade-right {
        margin-right: 10px;
        order: 1;
        width: 100%;
    }

    .side-images img.fade-left {
        width: 80%;
    }

}