body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

#topic-input textarea {
    width: calc(100% - 24px);
    padding: 12px;
    margin-bottom: 10px; /* Adjust margin */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#topic-input .options {
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center; /* Center options */
    gap: 5px;
    font-size: 0.9rem;
    color: #555;
}

#start-button {
    background-color: #5cb85c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

#start-button:hover {
    background-color: #4cae4c;
}

#story-area {
    margin-top: 20px;
    text-align: left;
}

#story-text {
    background-color: #e9e9e9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    white-space: pre-wrap; /* Preserve line breaks from AI */
}

#choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-button {
    background-color: #0275d8;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: background-color 0.3s ease;
}

.choice-button:hover {
    background-color: #025aa5;
}

.choice-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#loading {
    margin-top: 20px;
    font-style: italic;
    color: #777;
}

#story-end-message {
    margin-top: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.hidden {
    display: none;
}