/* ========== art-qr 样式 ========== */

/* 主容器 */
.art-qr-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 标题栏 */
.tool-title-bar {
    text-align: center;
    margin-bottom: 28px;
}

.tool-title-bar h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tool-title-bar h1 i {
    color: #667eea;
}

.tool-title-bar p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* 主内容区：左右布局 */
.main-content {
    display: flex;
    gap: 24px;
}

/* 左侧设置面板 */
.left-panel {
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding-right: 8px;
}

.left-panel::-webkit-scrollbar {
    width: 4px;
}
.left-panel::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 4px;
}

/* 右侧预览面板 */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 设置区块卡片 */
.settings-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.settings-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-section h3 i {
    color: #667eea;
    font-size: 14px;
}

/* 风格网格 */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* 风格卡片 */
.style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    background: #fff;
}

.style-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.style-card.active {
    border-color: #667eea;
    background: #f0f2ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.style-card span {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.style-card.active span {
    color: #667eea;
    font-weight: 600;
}

/* 风格预览色块 */
.style-preview {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* 预览区块 */
.preview-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-section h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.preview-section h3 span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-section h3 span i {
    color: #667eea;
}

/* 预览容器 */
.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    background: #fafbff;
    border-radius: 10px;
    border: 1px dashed #e0e0e0;
}

.preview-container canvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 操作按钮区 */
.actions-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* 会员提示 */
.member-notice {
    background: linear-gradient(135deg, #fff5f5, #fff0f6);
    border: 1px solid #ffd6e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.member-notice i {
    font-size: 20px;
    color: #f5576c;
    margin-bottom: 4px;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

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

/* 表单控件 */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 范围滑块 */
.range-control {
    width: 100%;
    height: 6px;
    accent-color: #667eea;
    cursor: pointer;
    border-radius: 3px;
}

.range-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.range-value {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    background: #f0f2ff;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 8px;
}

/* 颜色输入组 */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker {
    width: 40px;
    height: 32px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.color-picker:hover {
    border-color: #667eea;
}

/* 按钮通用 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 主按钮 - 紫色渐变 */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* 成功按钮 - 绿色 */
.btn-success {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.35);
}

/* 次要按钮 - 描边 */
.btn-secondary {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover:not(:disabled) {
    background: #f0f2ff;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        max-height: none;
        overflow-y: visible;
    }

    .style-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .preview-container {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }
}
