/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-toggle {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

/* 移动端头部样式 */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
        flex: 1;
        min-width: 200px;
    }
    
    .actions {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .language-toggle {
        margin-right: 0;
    }
    
    .btn-toggle {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-toggle {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.btn-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* 主要内容区域 */
/* 4栏布局主容器 */
.main-content {
    display: grid;
    grid-template-columns: 70px 1fr 200px 300px;
    grid-template-areas: "toolbar preview features properties";
    height: calc(100vh - 80px);
    gap: 1rem;
    padding: 1rem;
    background-color: #f5f6fa;
    overflow: hidden;
}

/* 1. 左侧操作栏 */
.action-toolbar {
    grid-area: toolbar;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.action-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #6c757d;
}

.action-btn:hover:not(:disabled) {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn .icon {
    font-size: 1.2rem;
}

/* 2. 预览主栏 */
.preview-area {
    grid-area: preview;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    position: relative;
}

/* Front/Back 切换按钮定位在预览区域右上角 */
.preview-area .card-side-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.toggle-btn {
    width: 60px;
    height: 32px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.toggle-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.warnings-container {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

/* 3. 功能选择区 */
.feature-selector {
    grid-area: features;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1rem 0;
}

.feature-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
    color: #6c757d;
}

.feature-tab:hover {
    background: #f8f9fa;
    color: #495057;
}

.feature-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.feature-tab .tab-icon {
    font-size: 1.2rem;
}

.feature-tab span:last-child {
    font-size: 0.9rem;
    font-weight: 500;
}

.tool-section {
    margin-bottom: 2rem;
}

.tool-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* 分级下拉菜单系统 */
.dropdown-section {
    margin-bottom: 1rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dropdown-section:not([style*="display: block"]) {
    display: none;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-header:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.dropdown-header span:first-child {
    font-weight: 600;
    font-size: 1rem;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-section.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    padding: 1rem;
    background: white;
    border-top: 1px solid #e0e6ed;
}

.dropdown-section.active .dropdown-content {
    display: block;
}

/* 材质选择 */
.material-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.material-option:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.material-option.active {
    border-color: #3498db;
    background: #ebf3fd;
}

.material-preview {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    margin-right: 0.75rem;
}

.material-preview.pvc {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
}

.material-preview.wood {
    background: linear-gradient(90deg, #d2b48c 0%, #8b7355 25%, #daa520 50%, #8b7355 75%, #d2b48c 100%);
    background-size: 8px 8px;
    position: relative;
}

.material-preview.wood::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(139, 115, 85, 0.3) 50%, transparent 60%);
    border-radius: 4px;
}

.material-preview.metal {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    position: relative;
}

.material-preview.metal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    border-radius: 4px;
}

/* 卡片设置 */
.card-side-toggle {
    display: flex;
    background: #ecf0f1;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 1rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #3498db;
    color: white;
}

/* 警告信息 */
.material-warning,
.single-color-warning {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.material-warning {
    background: #fff3cd;
    border-left-color: #f39c12;
}

.single-color-warning {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-icon {
    font-size: 1.1rem;
}

.warning-text {
    font-size: 0.85rem;
    color: #666;
}

@keyframes holographic {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 100% 0%; }
    100% { background-position: 0% 50%; }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 模板网格 */
.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.template-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.template-item.active {
    border-color: #3498db;
    background: #ebf3fd;
}

.template-preview {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.template-preview.blank {
    background: white;
    border: 1px solid #ddd;
}


.template-preview.blue {
    background: linear-gradient(135deg, #7B96EC 0%, #A3B8F2 100%);
    position: relative;
}

.template-preview.blue::after {
    content: 'SOON';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4A6EC7;
    font-size: 8px;
    font-weight: bold;
}

.template-preview.pink {
    background: linear-gradient(135deg, #EC7BB8 0%, #F2A3CC 100%);
    position: relative;
}

.template-preview.pink::after {
    content: 'SOON';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #C74A8D;
    font-size: 8px;
    font-weight: bold;
}

.template-preview.bamboo {
    background: linear-gradient(45deg, #D2B48C 0%, #F4A460 30%, #D2B48C 60%, #DEB887 100%);
    background-size: 8px 8px;
    background-image: 
        linear-gradient(90deg, rgba(139,115,85,0.3) 1px, transparent 1px),
        linear-gradient(rgba(139,115,85,0.3) 1px, transparent 1px);
}

.template-item span {
    font-size: 0.8rem;
    text-align: center;
}

/* PVC模板显示控制 */
.template-item.pvc-only,
.template-item.wood-only,
.template-item.non-pvc {
    display: flex;
    transition: opacity 0.3s ease;
}

.template-item.hidden {
    display: none;
}

.template-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* 半定制模板背景图片 */
.template-background,
.material-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    border-radius: 12px;
}

/* 半定制模式样式 */
.semi-custom-mode .feature-tab:not([data-feature="material"]).disabled,
.semi-custom-mode .action-btn.disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

/* 半定制和金属背面说明样式 */
.semi-custom-instructions,
.metal-back-instructions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.metal-back-instructions {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.instruction-content h4 {
    margin: 0 0 0.5rem 0;
    color: #856404;
    font-size: 1rem;
    font-weight: 600;
}

.metal-back-instructions .instruction-content h4 {
    color: #0c5460;
}

.instruction-content p {
    margin: 0;
    color: #6c5700;
    line-height: 1.4;
}

.metal-back-instructions .instruction-content p {
    color: #0c5460;
}

/* 设计工具 */
.design-tools {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    border-color: #3498db;
    background: #ebf3fd;
    transform: translateY(-2px);
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e0e6ed;
    background: #f8f9fa;
}

.tool-btn:disabled:hover {
    transform: none;
    border-color: #e0e6ed;
    background: #f8f9fa;
}

.tool-btn .icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* 形状选择悬浮窗 */
.shape-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.shape-popup-content {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.shape-popup.show .shape-popup-content {
    transform: scale(1);
}

.shape-popup h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #2c3e50;
    text-align: center;
}

.shape-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.shape-option {
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.shape-option:hover {
    border-color: #3498db;
    background: #ebf3fd;
    transform: translateY(-2px);
}

.shape-option.active {
    border-color: #3498db;
    background: #ebf3fd;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.shape-option span {
    font-size: 0.7rem;
    color: #666;
}

.shape-icon {
    width: 24px;
    height: 24px;
}

.shape-icon.rectangle {
    background: #3498db;
    border-radius: 2px;
}

.shape-icon.circle {
    background: #e74c3c;
    border-radius: 50%;
}


.shape-config {
    margin-bottom: 1.5rem;
}

.config-section {
    margin-bottom: 1rem;
}

.config-section > label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.config-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.config-group label {
    font-size: 0.8rem;
    color: #666;
}

.config-group input[type="color"] {
    width: 32px;
    height: 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.config-group input[type="range"] {
    flex: 1;
}

.config-group select {
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.shape-preview-area {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.preview-shape {
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

.popup-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.popup-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 设计区域 */
.design-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    padding: 2rem;
}

.card-container {
    position: relative;
    width: 500px;
    height: 316px;
    perspective: 1000px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.6s ease;
    transform-style: preserve-3d;
    cursor: pointer;
    overflow: hidden;
}

.card.active {
    transform: rotateY(0deg);
    z-index: 10;
}

.card:not(.active) {
    transform: rotateY(180deg);
    z-index: 1;
}

/* 普通PVC材质效果 */
.card.material-pvc {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
}

/* 木质材质效果 - 基于样品图片 */
.card.material-wood {
    background: linear-gradient(90deg, #d2b48c 0%, #8b7355 25%, #daa520 50%, #8b7355 75%, #d2b48c 100%);
    background-size: 20px 20px;
}

.card.material-wood::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(0deg, rgba(139, 115, 85, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 40%, rgba(139, 115, 85, 0.2) 50%, transparent 60%);
    z-index: 1;
    pointer-events: none;
    border-radius: 12px;
}

/* 金属材质使用模板背景，移除CSS渲染效果 */
.card.material-metal {
    background: transparent;
    border: 1px solid #333;
}


/* 材料效果Canvas层 */
.material-effect-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

.card-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    z-index: 3;
    /* 确保容器不干扰拖拽 */
    touch-action: none;
}

.drop-zone {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.drop-zone.dragover {
    border-color: #3498db;
    background: #ebf3fd;
    color: #3498db;
}

.drop-zone p {
    margin: 0.25rem 0;
}

/* 右侧属性面板 */
/* 4. 属性面板 */
.properties-panel {
    grid-area: properties;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1.5rem;
    overflow-y: auto;
}

/* 动态属性面板内容 */
.property-content {
    display: none;
}

.property-content.active {
    display: block;
}

.property-content h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* 材质和模板网格 */
.material-grid, .template-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.material-option, .template-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-option:hover, .template-item:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

.material-option.active, .template-item.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.material-preview, .template-preview {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 按钮样式 */
.upload-btn, .add-btn, .qr-btn {
    width: 100%;
    padding: 1rem;
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.upload-btn:hover, .add-btn:hover, .qr-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #5a67d8;
}

/* 二维码按钮特殊样式 */
.qr-btn {
    border-color: #27ae60;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
    margin-bottom: 0.5rem;
}

.qr-btn:hover {
    background: rgba(39, 174, 96, 0.1);
    border-color: #229954;
}

/* 二维码提示信息 */
.qr-notice {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.qr-notice .notice-text {
    color: #2980b9;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* QR码工具栏标签页样式 */
.qr-tab {
    background-color: #27ae60;
    color: white;
    border-color: #27ae60;
    position: relative;
    overflow: hidden;
}

.qr-tab:hover {
    background-color: #229954;
    border-color: #229954;
}

.qr-tab.active {
    background-color: #1e8449;
    border-color: #1e8449;
}

/* QR码按钮脉冲动画 */
@keyframes qr-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.qr-tab.pulse-animation {
    animation: qr-pulse 2s infinite;
}

/* QR码状态横幅 */
.qr-status-banner {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.banner-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.banner-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.banner-text {
    color: white;
    font-weight: 600;
    flex-grow: 1;
    font-size: 0.95rem;
}

.banner-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.banner-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* QR码管理面板样式 */
.qr-add-section {
    text-align: center;
    padding: 2rem 1rem;
}

.qr-add-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.qr-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954, #27ae60);
}

.qr-add-btn .icon {
    font-size: 1.3rem;
}

.qr-info {
    margin-top: 1rem;
}

.qr-required-notice {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
}

.notice-icon {
    font-size: 1.1rem;
    color: #3498db;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.qr-required-notice p {
    color: #2980b9;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* QR码状态显示样式 */
.qr-status-section {
    padding: 1.5rem 1rem;
    text-align: center;
}

.qr-status-info {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.status-icon {
    font-size: 1.2rem;
    color: #27ae60;
}

.qr-status-info span:not(.status-icon) {
    color: #1e8449;
    font-weight: 600;
}

.qr-action-btn {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.qr-action-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: translateY(-1px);
}

.shape-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.shape-btn {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

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

.shape-icon {
    width: 30px;
    height: 20px;
}

.shape-icon.rectangle {
    background: #667eea;
    border-radius: 2px;
}

.shape-icon.circle {
    background: #667eea;
    border-radius: 50%;
}

/* 控件样式 */
.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.control-group input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

.control-group input[type="color"] {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.control-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* 新属性面板样式 */
.property-section {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.property-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.property-section h4 {
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-hint, .add-hint {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.dimension-controls, .position-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.control-group label {
    min-width: 60px;
    font-size: 0.85rem;
}

.control-group input[type="number"] {
    width: 70px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.control-group span {
    font-size: 0.8rem;
    color: #6c757d;
}

.text-align-buttons, .text-style-buttons {
    display: flex;
    gap: 0.25rem;
}

.align-btn, .style-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.align-btn:hover, .style-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.align-btn.active, .style-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.delete-btn {
    width: 100%;
    padding: 0.75rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.delete-btn:hover:not(:disabled) {
    background: #c82333;
}

.delete-btn:disabled {
    background: #6c757d;
    color: #ffffff;
    opacity: 0.6;
    cursor: not-allowed;
}

/* 隐藏/显示属性面板的逻辑 */
.upload-section, .add-text-section, .add-shape-section {
    text-align: center;
}

.image-properties, .text-properties, .shape-properties {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.property-group {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    color: #7f8c8d;
    text-align: center;
}

.property-item {
    margin-bottom: 1rem;
}

.property-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.property-item input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 文字编辑模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.text-controls {
    margin-top: 1rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.control-group input,
.control-group select,
.control-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.control-group textarea {
    height: 80px;
    resize: vertical;
}

.text-style-buttons,
.text-align-buttons {
    display: flex;
    gap: 0.5rem;
}

.style-btn,
.align-btn {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-btn:hover,
.align-btn:hover {
    background: #f8f9fa;
}

.style-btn.active,
.align-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 可拖拽元素样式 */
.draggable-element {
    position: absolute;
    cursor: move;
    user-select: none;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    z-index: 5; /* 基础拖拽元素z-index */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none; /* 关键：完全禁用默认触摸行为 */
    -webkit-tap-highlight-color: transparent; /* 禁用点击高亮 */
    -webkit-user-drag: none; /* 禁用webkit拖拽 */
}

.draggable-element:hover {
    border-color: #3498db;
}

.draggable-element.selected {
    border-color: #3498db;
}

/* 材质效果应用到元素 */
.card.material-wood .draggable-element::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, #8b7355 0%, #d2b48c 50%, #8b7355 100%),
        rgba(139, 115, 85, 0.1);
    background-size: 8px 8px, 100% 100%;
    border-radius: inherit;
    pointer-events: none;
    z-index: 10;
    opacity: 0.3;
    mix-blend-mode: multiply;
}

.card.material-metal .draggable-element::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.05) 0%, transparent 50%),
        rgba(44, 62, 80, 0.2);
    border-radius: inherit;
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: multiply;
}

.card.material-metal .text-element {
    color: #ecf0f1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.card.material-wood .text-element {
    color: #8b4513;
    text-shadow: 0 1px 2px rgba(139, 69, 19, 0.3);
}

.draggable-element .resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #3498db;
    border: 2px solid white;
    border-radius: 50%;
    cursor: nw-resize;
}

/* 移动端调整控件优化 */
@media (max-width: 768px) {
    .draggable-element .resize-handle {
        width: 16px;
        height: 16px;
        border-width: 3px;
        opacity: 0.9;
    }
    
    .draggable-element .rotate-handle {
        width: 20px;
        height: 20px;
        top: -25px;
    }
}

.draggable-element .resize-handle.top-left {
    top: -5px;
    left: -5px;
}

.draggable-element .resize-handle.top-right {
    top: -5px;
    right: -5px;
    cursor: ne-resize;
}

.draggable-element .resize-handle.bottom-left {
    bottom: -5px;
    left: -5px;
    cursor: sw-resize;
}

.draggable-element .resize-handle.bottom-right {
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
}

/* 边缘把手 - 独立拉伸 */
.draggable-element .resize-handle.top {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.draggable-element .resize-handle.right {
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    cursor: e-resize;
}

.draggable-element .resize-handle.bottom {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.draggable-element .resize-handle.left {
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.draggable-element .rotate-handle {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #e74c3c;
    border: 2px solid white;
    border-radius: 50%;
    cursor: grab;
}

.draggable-element .rotate-handle:active {
    cursor: grabbing;
}

.text-element {
    min-width: 50px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.image-element {
    overflow: hidden;
    border-radius: 4px;
    z-index: 10; /* 普通图片元素的z-index */
}

.image-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* QR码元素优先级最高，永远不被遮挡 */
.qr-element {
    z-index: 9999 !important; /* QR码元素最高优先级 */
    /* 移除红色专属边框，使用默认样式 */
    pointer-events: auto; /* 确保触摸交互可用 */
    -webkit-transform: translateZ(0); /* 硬件加速 */
    transform: translateZ(0);
}

/* 移动端QR码优化 */
@media (max-width: 768px) {
    .qr-element {
        min-width: 60px !important;
        min-height: 60px !important;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .qr-element img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* 文字元素z-index */
.text-element {
    z-index: 20; /* 文字元素比普通图片高 */
}

/* 形状元素z-index */
.shape-element {
    z-index: 15; /* 形状元素比普通图片高，但比文字低 */
}

.shape-element {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 60px 1fr 180px 280px;
    }
    
    .properties-panel {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .main-content {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 80px);
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    /* 全局字体大小优化 */
    body {
        font-size: 14px;
        line-height: 1.4;
    }
    
    h1 { font-size: 1.1rem; }
    h2 { font-size: 1rem; }
    h3 { font-size: 0.9rem; }
    h4 { font-size: 0.85rem; }
    
    /* 头部工具栏在移动端隐藏或简化 */
    .action-toolbar {
        display: none;
    }
    
    /* 预览区域 */
    .preview-area {
        order: 1;
        padding: 0.75rem;
        min-height: 300px;
        max-height: 350px;
    }
    
    /* 功能选择区域 */
    .feature-selector {
        order: 2;
        width: 100%;
        padding: 0.5rem;
    }
    
    .feature-tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0 0.5rem;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .feature-tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .feature-tab {
        min-width: 50px;
        max-width: 50px;
        height: 50px;
        padding: 0.4rem;
        margin: 0;
        font-size: 0;
        text-align: center;
        flex-direction: column;
        gap: 0;
        justify-content: center;
        border-radius: 12px;
        flex-shrink: 0;
    }
    
    .feature-tab .tab-icon {
        font-size: 1.4rem;
        margin: 0;
    }
    
    .feature-tab span:last-child {
        display: none; /* 隐藏文字标签，只显示图标 */
    }
    
    .feature-tab.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    /* 属性面板 */
    .properties-panel {
        order: 3;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        padding: 1rem;
    }
    
    /* 属性面板内容优化 */
    .property-content {
        padding-bottom: 1rem;
    }
    
    .property-section {
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .property-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        color: #2c3e50;
    }
    
    /* 卡片容器调整 */
    .card-container {
        width: 280px;
        height: 175px;
        margin: 0 auto;
    }
    
    .card {
        width: 280px;
        height: 175px;
    }
    
    /* 卡片切换按钮 */
    .card-side-toggle {
        margin-bottom: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .toggle-btn {
        min-width: 70px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    /* 材质和模板网格移动端优化 */
    .material-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .material-option, .template-item {
        padding: 0.5rem;
        font-size: 0.75rem;
        gap: 0.5rem;
    }
    
    .material-preview, .template-preview {
        width: 35px;
        height: 22px;
    }
    
    /* 控制组件优化 */
    .control-group {
        margin-bottom: 0.75rem;
    }
    
    .control-group label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    input[type="number"], input[type="range"], select, textarea {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-height: 44px; /* 符合触摸标准的最小高度 */
        border-radius: 8px;
    }
    
    /* 触摸友好的按钮优化 */
    .add-btn, .upload-btn, .qr-add-btn {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .action-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    
    /* 范围输入滑块优化 */
    input[type="range"] {
        height: 32px;
        -webkit-appearance: none;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        -webkit-appearance: none;
        background: #3498db;
        border-radius: 50%;
        cursor: pointer;
    }
    
    /* 颜色选择器优化 */
    input[type="color"] {
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    
    /* 下拉选择优化 */
    select {
        min-height: 44px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23999' d='M2 0L0 2h4z'/></svg>");
        background-repeat: no-repeat;
        background-position: right 0.7em center;
        background-size: 0.65em auto;
    }
    
    /* 控制面板优化 */
    .property-section {
        margin-bottom: 1rem;
    }
    
    .property-section h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .control-group {
        margin-bottom: 0.75rem;
    }
    
    .control-group input[type="number"],
    .control-group input[type="range"],
    .control-group select {
        width: 100%;
    }
    
    /* 文字和形状属性面板 */
    .text-properties, .shape-properties, .image-properties {
        padding: 0.75rem;
    }
    
    /* 按钮优化 */
    .upload-btn, .add-btn, .qr-btn, .shape-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 44px; /* 确保触摸友好的最小高度 */
    }
    
    .delete-btn {
        width: 100%;
        margin-top: 1rem;
        padding: 0.75rem;
        min-height: 44px;
    }
    
    /* 警告信息 */
    .warnings-container {
        margin-top: 0.5rem;
    }
    
    .material-warning, .single-color-warning {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* 模态框移动端优化 */
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .shape-popup-content {
        padding: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* 触摸优化 */
    .feature-tab,
    .material-option,
    .template-item,
    .shape-btn,
    .upload-btn,
    .add-btn,
    .qr-btn {
        min-height: 44px;
        touch-action: manipulation;
    }
}

/* 工作流程引导样式 */
.workflow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.workflow-overlay.hidden {
    display: none;
}

.workflow-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.workflow-header {
    margin-bottom: 1.5rem;
}

.workflow-header h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.workflow-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 25%;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.workflow-content {
    margin-bottom: 2rem;
}

.workflow-step h4 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.workflow-step p {
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0;
}

.workflow-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.workflow-actions .btn {
    flex: 1;
}

/* 引导高亮覆盖层 */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.guide-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* 高亮区域样式 */
.guide-highlight {
    position: relative;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.5), 0 0 30px rgba(102, 126, 234, 0.3) !important;
    border-radius: 8px !important;
}

.guide-highlight::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #667eea;
    border-radius: 12px;
    pointer-events: none;
    animation: guide-pulse 2s infinite;
}

@keyframes guide-pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .workflow-modal {
        padding: 1.5rem;
        max-width: 95%;
    }
    
    .workflow-actions {
        flex-direction: column-reverse;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 用户信息收集表单样式 */
#userInfoModal {
    z-index: 10000;
}

#userInfoModal .modal-content {
    max-width: 500px;
    width: 90%;
}

#userInfoModal h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

#userInfoModal p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.error-text {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* 表单验证样式 */
.form-group input.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input.valid,
.form-group textarea.valid {
    border-color: #28a745;
}

/* 必填字段星号样式 */
.form-group label:has(+ input[required])::after,
.form-group label:has(+ textarea[required])::after {
    content: ' *';
    color: #dc3545;
}

/* 小屏幕进一步优化 */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1rem;
        min-width: 150px;
    }
    
    .actions {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .card-container {
        width: 280px;
        height: 175px;
    }
    
    .card {
        width: 280px;
        height: 175px;
    }
    
    .feature-tab {
        min-width: 70px;
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .feature-tab .tab-icon {
        font-size: 1rem;
    }
    
    .material-grid, .template-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .material-option, .template-item {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        padding: 1rem;
    }
    
    .material-preview, .template-preview {
        width: 50px;
        height: 32px;
        flex-shrink: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 用户信息模态框移动端优化 */
    #userInfoModal .modal-content {
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* 所有模态框移动端优化 */
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-width: none;
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions .btn {
        width: 100%;
        min-height: 48px;
        font-size: 0.9rem;
    }
    
    /* 形状选择弹窗优化 */
    .shape-popup-content {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
        max-width: none;
    }
    
    .shape-selector {
        gap: 0.75rem;
    }
    
    .shape-option {
        min-height: 48px;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}