/* 汉信码生成器样式 - 美观现代 */

/* 主容器 - 强制100%宽度 */
.hanxinma-generator-container {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 输入区域 */
.hanxinma-input-section {
    margin-bottom: 20px;
}

/* 表单组 */
.hanxinma-form-group {
    margin-bottom: 12px;
}

.hanxinma-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.hanxinma-form-group textarea {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #333;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hanxinma-form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 文本框容器 */
.hanxinma-textarea-wrapper {
    position: relative;
}

/* 清空按钮 */
.hanxinma-clear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hanxinma-clear-btn:hover {
    opacity: 1;
    background: #e0e0e0;
}

.hanxinma-clear-btn:active {
    background: #d0d0d0;
}

.hanxinma-form-group select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #333;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hanxinma-form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 字符计数 */
.hanxinma-char-count {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* 选项行 */
.hanxinma-options-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hanxinma-options-row .hanxinma-form-group {
    flex: 1;
    min-width: 120px;
}

/* 纠错等级和尺寸选择器 - 限制宽度 */
.hanxinma-options-row .hanxinma-form-group:not(.hanxinma-color-group):not(.hanxinma-checkbox-group) {
    flex: 0 0 auto;
    max-width: 140px;
}

/* 颜色选择器 - 正方形 */
.hanxinma-options-row .hanxinma-color-group {
    flex: 0 0 auto;
    min-width: 70px;
    max-width: 70px;
}

.hanxinma-options-row .hanxinma-color-group input[type="color"] {
    width: 100%;
    height: 32px;
    padding: 2px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hanxinma-options-row .hanxinma-color-group input[type="color"]:hover {
    border-color: #bbb;
}

.hanxinma-options-row .hanxinma-color-group input[type="color"]:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

/* 复选框组 */
.hanxinma-options-row .hanxinma-checkbox-group {
    flex: 0 0 auto;
    min-width: 65px;
    max-width: 80px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 6px;
}

.hanxinma-options-row .hanxinma-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    transition: color 0.2s;
}

.hanxinma-options-row .hanxinma-checkbox-group label:hover {
    color: #4a90e2;
}

.hanxinma-options-row .hanxinma-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4a90e2;
}

/* 结果区域 */
.hanxinma-result-section {
    margin-top: 25px;
    text-align: center;
}

/* 下载按钮组 */
.hanxinma-download-buttons {
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hanxinma-download-buttons button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.hanxinma-download-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
}

.hanxinma-download-buttons button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(74, 144, 226, 0.2);
}

.hanxinma-result-image {
    display: inline-block;
    max-width: 100%;
    min-height: 500px;
    padding: 15px;
    background: #fff;
    background-image: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%), 
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%), 
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hanxinma-result-image svg,
.hanxinma-result-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 错误提示 */
.hanxinma-error {
    padding: 12px 16px;
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    font-size: 14px;
    margin-top: 12px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .hanxinma-options-row {
        gap: 8px;
    }
    
    .hanxinma-options-row .hanxinma-form-group:not(.hanxinma-color-group):not(.hanxinma-checkbox-group) {
        max-width: 130px;
    }
    
    .hanxinma-download-buttons {
        gap: 8px;
    }
    
    .hanxinma-download-buttons button {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* SEO文案区域 */
.hanxinma-seo-content {
    margin-top: 40px;
    padding: 20px 0;
}

.hanxinma-seo-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 25px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a90e2;
}

.hanxinma-seo-title:first-child {
    margin-top: 0;
}

.hanxinma-seo-text {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin: 0;
}

.hanxinma-seo-list {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin: 10px 0;
    padding-left: 20px;
}

.hanxinma-seo-list li {
    margin: 8px 0;
}

.hanxinma-seo-list strong {
    color: #333;
}

.hanxinma-seo-qa {
    margin-top: 15px;
}

.hanxinma-seo-qa-item {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.hanxinma-seo-qa-q {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.hanxinma-seo-qa-a {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}