body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
    text-align: center;
    color: #1e88e5;
    margin-bottom: 20px;
}
h2 {
    color: #0d47a1;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
}
.section {
    margin-bottom: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #1e88e5;
}
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
input[type="text"], textarea, select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box; /* Makes width calculation include padding and border */
}
textarea {
    min-height: 100px;
    resize: vertical;
}
.section-container { /* Renamed from variable-container for clarity */
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    margin-top: 15px;
}
.element-container, .item-container { /* element-container for new types */
    background: #f0f8ff;
    border: 1px solid #b3e5fc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}
.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}
button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: background 0.3s;
}
.btn-primary {
    background: #1e88e5;
    color: white;
}
.btn-primary:hover {
    background: #1565c0;
}
.btn-danger {
    background: #f44336;
    color: white;
}
.btn-danger:hover {
    background: #d32f2f;
}
.btn-success {
    background: #43a047;
    color: white;
}
.btn-success:hover {
    background: #2e7d32;
}
.btn-secondary {
    background: #78909c;
    color: white;
}
.btn-secondary:hover {
    background: #546e7a;
}
.btn-large {
    font-size: 16px;
    padding: 12px 20px;
    width: 100%;
    margin-top: 20px;
}
.preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}
.instructions {
    background: #e8f5e9;
    border-left: 4px solid #43a047;
    padding: 10px 15px;
    margin-bottom: 20px;
}
.scale-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.scale-option {
    flex: 1;
    min-width: 150px;
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.tab-container {
    margin-top: 20px;
}
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}
.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    position: relative;
}
.tab.active {
    background: white;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    z-index: 1;
}
.tab-content {
    display: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}
.tab-content.active {
    display: block;
}
.status {
    padding: 10px;
    margin-top: 20px;
    border-radius: 4px;
    text-align: center;
}
.status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}
.loading {
    text-align: center;
    padding: 20px;
    display: none; /* Initially hidden */
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.section-container h3, .section-container h4 { margin-top: 0; }
.element-container button, .item-container button { margin-top: 10px; }