body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 30px;
}

.main-content {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-top: 0;
}

textarea, input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box; /* 保证 padding 不会撑大宽度 */
}

textarea {
    resize: vertical;
}

.excel-format-info {
    margin-top: 20px;
    background-color: #e9f5ff;
    border: 1px solid #b3d7ff;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.excel-format-info table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.excel-format-info th, .excel-format-info td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.excel-format-info th {
    background-color: #f2f2f2;
}


.action-panel {
    text-align: center;
}

#generate-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generate-btn:hover {
    background-color: #0056b3;
}

#status-message {
    margin-top: 15px;
    font-weight: bold;
}

#download-link {
    display: inline-block;
    margin-top: 15px;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#download-link:hover {
    background-color: #218838;
}

.output-preview-panel {
    margin-top: 30px;
    background-color: #2b2b2b;
    color: #f1f1f1;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #444;
}

.output-preview-panel h2 {
    color: #fff;
    border-bottom-color: #555;
}

#output-preview {
    white-space: pre-wrap; /* 自动换行 */
    word-wrap: break-word; /* 单词内换行 */
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
}

.hidden {
    display: none;
}

/* 响应式布局：在小屏幕上，左右面板堆叠 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
}
