body {
    font-family: "SimSun", "宋体", serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
}

.container {
    width: 90%;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #8b4513;
    font-size: 2.5em;
    margin-bottom: 20px;
}

textarea {
    width: 80%;
    height: 200px;
    padding: 10px;
    margin: 0 auto 20px;
    display: block;
    border: 1px solid #8b4513;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
}

button {
    padding: 10px 20px;
    background-color: #8b4513;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a0522d;
}

.notice {
    margin-top: 20px;
    padding: 10px;
    background-color: #fff8f0;
    border: 1px solid #8b4513;
    border-radius: 5px;
    text-align: left;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    text-align: center;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #8b4513;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#dreamResult {
    text-align: justify;
    padding: 25px;
    background-color: #fff8f0;
    border: 2px solid #8b4513;
    border-radius: 8px;
    min-height: 50px;
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.2;
    color: #333;
    text-indent: 2em;
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
    margin-top: 15px;
}

#dreamResult p {
    margin-bottom: 1em;
    text-indent: 2em;
}

#closeBtn {
    padding: 12px 24px;
    background-color: #8b4513;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    display: none;
    margin: 20px auto 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

#closeBtn:hover {
    background-color: #a0522d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#closeBtn:hover {
    background-color: #a0522d;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "黑体", sans-serif;
}