/* 基础样式重置与变量定义 */
:root {
    --primary-color: #3b7ad9;
    --primary-light: #e6edf9;
    --secondary-color: #f5a623;
    --text-dark: #333;
    --text-gray: #666;
    --text-light: #999;
    --border-color: #ddd;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 容器样式 */
.qmt-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 头部样式 */
.qmt-container header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.qmt-container header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.qmt-container header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}


.qmt-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 0;
    opacity: 0.9;
}

/* 表单样式美化 */
.qmt-form {
    margin-bottom: 35px;
    background-color: #fafafa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.qmt-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.qmt-form-group {
    margin-bottom: 25px;
    width: 100%;
}

.qmt-form-group-half {
    flex: 1;
    min-width: 250px;
}

.qmt-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
    transition: color 0.3s;
}

.qmt-input:focus + .qmt-label,
.qmt-select:focus + .qmt-label {
    color: #3498db;
}

.qmt-input,
.qmt-select {
    padding: 14px 18px;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.qmt-input:focus,
.qmt-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.qmt-form-checkboxes {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #f0f0f0;
}

.qmt-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-weight: normal;
    transition: color 0.2s;
    padding: 5px 0;
}

.qmt-checkbox-label:hover {
    color: #3498db;
}

.qmt-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #3498db;
}

.qmt-form-actions {
    margin-top: 35px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.qmt-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.qmt-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.25);
}

.qmt-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.qmt-button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 结果样式增强 */
.qmt-results {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.qmt-results h2 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5f5f5;
}

.qmt-results h3 {
    color: #34495e;
    font-size: 19px;
    margin-bottom: 20px;
    font-weight: 600;
}

.qmt-result-item {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    position: relative;
}

.qmt-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
    border-color: #e8e8e8;
}

.qmt-result-item h4 {
    color: #2c3e50;
    font-size: 17px;
    margin-bottom: 20px;
    cursor: pointer;
    display: inline-block;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.qmt-result-item h4:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

.qmt-characters-group {
    margin-top: 20px;
    margin-bottom: 20px;
}

.qmt-characters-group p {
    margin-bottom: 12px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.qmt-characters-list {
    background-color: white;
    padding: 18px;
    border: 1px solid #eee;
    border-radius: 6px;
    line-height: 2.2;
    word-wrap: break-word;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* 其他样式优化 */
.qmt-error {
    color: #e74c3c;
    background-color: #fdecea;
    padding: 18px;
    border-radius: 6px;
    margin-bottom: 25px;
    border: 1px solid #fcd5cf;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.qmt-error:before {
    content: "⚠️";
    margin-right: 10px;
    font-size: 18px;
}

.qmt-hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 25px 0;
}

.qmt-stats {
    font-size: 14px;
    color: #666;
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.qmt-stats h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #555;
}

.qmt-footer {
    margin-top: 60px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* 加载指示器动画 */
.qmt-loading {
    color: #666;
    font-style: italic;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.qmt-loading:after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #3498db;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .qmt-container {
        padding: 25px 15px;
        margin: 15px;
    }
    
    .qmt-form {
        padding: 20px 15px;
    }
    
    .qmt-form-row {
        gap: 15px;
    }
    
    .qmt-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qmt-button {
        width: 100%;
        padding: 14px;
    }
    
    .qmt-result-item {
        padding: 20px 15px;
    }
}