body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    text-align: center;
}

h1 {
    color: #007bff;
    margin-bottom: 30px;
    font-size: 2em;
}

.input-section, .output-section {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

textarea {
    width: calc(100% - 20px); /* 减去内边距 */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    resize: vertical; /* 允许垂直拖动大小 */
    min-height: 80px; /* 最小高度 */
    box-sizing: border-box; /* 边框和内边距包含在宽度内 */
}

.format-select {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px; /* 元素之间的间距 */
}

.format-select label {
    margin-bottom: 0; /* 调整标签边距 */
    white-space: nowrap; /* 防止标签换行 */
}

select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    appearance: none; /* 移除默认下拉箭头 */
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Csvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    margin-bottom: 20px;
}

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

#copyButton {
    background-color: #28a745; /* 绿色 */
    margin-left: 15px;
    padding: 10px 20px; /* 稍微小一点 */
    font-size: 1em;
}

#copyButton:hover {
    background-color: #218838;
}

.footer {
    margin-top: 30px;
    font-size: 0.85em;
    color: #777;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.8em;
    }
    button {
        padding: 10px 20px;
        font-size: 1em;
    }
    #copyButton {
        margin-left: 0; /* 在小屏幕上取消左边距 */
        margin-top: 15px; /* 在小屏幕上独立一行 */
        display: block; /* 独立一行 */
        width: 100%; /* 宽度占满 */
    }
    .format-select {
        flex-direction: column; /* 垂直排列 */
        align-items: flex-start; /* 左对齐 */
    }
    .format-select label {
        margin-bottom: 5px;
    }
    select {
        width: 100%; /* 宽度占满 */
    }
}