/* Google FontsのMedievalSharpを読み込む */
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');

body {
    margin: 0;
    padding: 20px;
    font-family: 'MedievalSharp', cursive;
    color: #f5deb3;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    
    background-image: url('../img/background-map.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #6a4f31;
    overflow-y: auto;
}

.prompt-container {
    background-color: rgba(43, 35, 29, 0.9);
    border: 3px solid #d2b48c;
    border-radius: 15px;
    padding: 30px 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    max-width: 700px;
    width: 90%;
    margin-top: 30px;
    margin-bottom: 30px;
}

.prompt-title {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    text-align: center;
    color: #f5deb3;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);
}

.back-to-top-link {
    display: block;
    margin-bottom: 25px;
    color: #d2b48c;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s ease;
    text-align: center;
}

.back-to-top-link:hover {
    color: #f0e68c;
}

.separator {
    border: none;
    border-top: 1px solid #7a6a5d;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.2em;
    color: #d2b48c;
}

input[type="text"], textarea {
    width: calc(100% - 24px);
    padding: 10px;
    border: 1px solid #7a6a5d;
    border-radius: 5px;
    background-color: #3b2f21;
    color: #f5deb3;
    font-size: 1em;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-family: 'MedievalSharp', cursive;
}

textarea {
    resize: vertical;
    line-height: 1.6;
}

.submit-button {
    font-family: 'MedievalSharp', cursive;
    font-size: 1.5em;
    /* 創造性をイメージさせる紫系のグラデーション */
    background: linear-gradient(#5d3d9c, #4c2c80);
    color: #fff;
    border: 2px solid #a388d1;
    border-radius: 10px;
    padding: 12px 25px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    background: linear-gradient(#6e4ab5, #5a3aa1);
    transform: translateY(-2px);
}

/* --- モーダル共通スタイル (他のCSSファイルと共通) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; justify-content: center; align-items: center;
    z-index: 1000; backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #2b231d; color: #f5deb3; padding: 30px;
    border: 3px solid #d2b48c; border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
    text-align: center; width: 90%; max-width: 400px;
    position: relative; animation: fadeInModal 0.5s ease-out forwards;
}
@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.modal-close {
    position: absolute; top: 10px; right: 15px;
    font-size: 2em; color: #d2b48c; cursor: pointer;
    transition: color 0.2s ease;
}
.modal-close:hover { color: #fff; }
.modal-icon { width: 80px; height: 80px; margin-bottom: 20px; }
.modal-content h2 { font-size: 2.5em; margin: 0 0 15px 0; color: #fff; }
.modal-content p { font-size: 1.1em; line-height: 1.6; margin-bottom: 30px; }
.modal-button {
    font-family: 'MedievalSharp', cursive; font-size: 1.3em;
    color: #fff; border: 2px solid; border-radius: 10px;
    padding: 10px 30px; cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}
.modal-button.failure {
    background: linear-gradient(#8b0000, #5c0000); border-color: #d2b48c;
}
.modal-button.failure:hover {
    background: linear-gradient(#a30000, #7a0000); transform: translateY(-2px);
}

/* ===== 一覧ページへのリンク ===== */
.link-to-list {
    text-align: center;
    margin-top: 30px;
}

.link-to-list a {
    font-size: 1.2em;
    color: #f0e68c;
    text-decoration: none;
    padding: 10px 15px;
    border: 1px solid #d2b48c;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.link-to-list a:hover {
    background-color: rgba(240, 230, 140, 0.1);
    color: #fff;
    border-color: #f0e68c;
}

/* ===== 確認モーダル用の追加スタイル ===== */

.confirm-details {
    text-align: left;
    background-color: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
    max-height: 250px; /* 高さが250pxを超えたらスクロール */
    overflow-y: auto;
}
.confirm-details p {
    font-size: 1.1em;
    margin: 0 0 10px 0;
}
.confirm-details p strong {
    color: #d2b48c;
}

#confirmText {
    font-family: 'MedievalSharp', cursive;
    font-size: 1em;
    color: #f5deb3;
    white-space: pre-wrap; /* 自動で改行 */
    word-break: break-word; /* 長い単語でも折り返す */
    background-color: #3b2f21;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #7a6a5d;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal-button.success {
    background: linear-gradient(#4b6928, #3a521e);
    border-color: #a3c182;
}

.modal-button.success:hover {
    background: linear-gradient(#5a7e30, #4c6628);
    transform: translateY(-2px);
}




/* =================================================== */
/* レスポンシブデザイン (タブレット以上) */
/* =================================================== */
@media (min-width: 768px) {
    .main-logo {
        width: 180px; /* ロゴを少し大きく */
    }

    .game-title {
        font-size: 4.5em;
    }

    .tagline {
        font-size: 1.5em;
    }

    .nav-button-text {
        font-size: 1.1em; /* ボタンテキストのサイズ */
    }

    .section-title {
        font-size: 2.5em;
    }

    .preview-icon {
        width: 150px; /* プレビューアイコンを少し大きく */
        height: 150px;
    }
}

/* =================================================== */
/* レスポンシブデザイン (PCサイズ以上) */
/* =================================================== */
@media (min-width: 1024px) {
    .main-logo {
        width: 200px; /* ロゴをさらに大きく */
    }

    .game-title {
        font-size: 5.5em;
    }

    .tagline {
        font-size: 1.8em;
    }

    .nav-button-text {
        font-size: 1.2em;
    }

    .section-title {
        font-size: 3em;
    }

    .preview-icon {
        width: 180px; /* プレビューアイコンをさらに大きく */
        height: 180px;
    }
}