body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%; // 修改: 移除固定宽度，使用百分比宽度
    max-width: 600px; // 添加: 限制最大宽度
    text-align: center;
}

h1 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.card {
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    flex: 1 1 calc(33.333% - 20px);
    box-sizing: border-box;
    text-align: center;
    width: 30%; // 修改: 使用百分比宽度
}

.card.selected {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

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

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; // 修改: 使用百分比宽度
    max-width: 500px; // 保持最大宽度不变
    text-align: center;
}

.modal-content p {
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
}

.modal button {
    margin: 5px;
}