body {
    background-color: #000000;
    color: #FFD700;
    font-family: 'Noto Serif JP', serif;
    margin: 0;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 上揃えに変更 */
    text-align: center;
}

.container {
    max-width: 800px;
    width: 90%;
    margin: auto;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.book-list-link {
    color: #FFD700;
    text-decoration: none;
    margin-bottom: 10px; /* 10pxに設定 */
    display: inline-block;
}

.top-page-rune {
    max-width: 150px;
    margin-bottom: 30px;
}

#top-page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

hr {
    border: none;
    height: 1px;
    background-color: #FFD700;
    width: 100%;
    margin: 10px 0; /* 10pxに設定 */
}

.btn {
    background-color: #FFD700;
    color: #000000;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: #DAA520;
    border-color: #FFD700;
}

#result-page {
    margin-top: 40px;
}

.rune-display {
    margin-bottom: 20px;
}

#rune-image {
    max-width: 200px;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#rune-image.fade-in {
    opacity: 1;
}

#rune-meaning {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    white-space: pre-wrap; /* 改行を有効にする */
}

#rune-meaning.fade-in {
    opacity: 1;
}

.rune-name-header {
    font-size: 1.3em;
    font-weight: bold;
}

footer {
    margin-top: 60px;
    color: #A9A9A9;
    font-size: 0.9em;
}

/* Scroll to Top Button */
#scroll-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #FFD700;
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

#scroll-to-top-btn.show {
    opacity: 1;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    #rune-image {
        max-width: 150px;
    }

    #scroll-to-top-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        bottom: 15px;
        right: 15px;
    }
}