.reserve-event {
    position: relative;
    min-height: 500px;
}
form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

form input[type="text"],
form input[type="email"]
 {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

form button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
#tickets {
    width: 100px;
    padding: 5px;
    margin-bottom: 10px;
}
#comment,
#message{
    width: 100%;
    height: 100px;
    padding: 5px;
    margin-bottom: 10px;
}

#resultbox {
    position: relative;
    padding: 0;
    margin: 0;
}

/* --- 水晶玉・アニメーション関連 --- */

#loading-container {
    display: none;
    position: relative;
    margin-top: 20px;
    text-align: center;
}

/* 水晶玉自体 */
.crystal-ball {
    width: 240px;
    height: 240px;
    margin: 0 auto;
    opacity: 1; /* フェードアウト時に変更 */
    transition: opacity 1s ease-in-out;
}

/* あらかじめ用意したダミーテキスト */
#floating-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.2);
    font-size: 14px;
    color: #555;
    white-space: pre-wrap;
    width: calc(100% - 40px);
    max-width: 390px;
    text-align: left;
    filter: blur(10px);
    opacity: 0.9;
    animation: floatingLoop 1s infinite ease-in-out;
}

@keyframes floatingLoop {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.2);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.25);
    }
}

/* テキストをぼかし解除・拡大表示するアニメ */
#floating-text.revealed {
    animation: reveal-text 1.2s ease-in-out forwards;
}

@keyframes reveal-text {
    0% {
        filter: blur(10px);
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.2);
    }
    100% {
        filter: blur(0);
        opacity: 1;
        transform: translate(-50%, -40%) scale(1);
    }
}

/* 水晶玉が消える時 */
.crystal-ball.hidden {
    opacity: 0; /* フェードアウト */
}

/* #loading-containerをフェードアウトさせるクラス */
#loading-container.fade-out {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* --- 結果表示欄 --- */
#result {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: left;
    width: calc(100% - 30px);
    max-width: 380px;
    margin: 0;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    color: #555;
    display: none; /* 最初は非表示 */
}

/* ▼ フェードインを“上から”動かすアニメ */
#result.fade-in {
    animation: fadeIn 2s ease-in-out forwards;
}

#result h3 {
    margin: 0;
    text-align: center;
    font-size: 15px;
    color:#555
}
#result h4 {
    margin: 10px 0 5px;
    font-size: 18px;
    text-align: center;
    color: #b87cb5;
}
/*
  変更点：fadeInを「上から下へ」(translateY(-30px) → 0) に
  （値は好みで調整）
*/
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
