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





body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 移动端容器样式 */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
}

/* 标题样式 */
h1 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 26px;
}

h2 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 18px;
}

h3 {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

/* 卡片样式 */
.bg-white {
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    padding: 12px;
}

/* 预览容器样式 */
#previewContainer {
    background-color: #f7fafc;
    border-radius: 8px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 12px;
}

/* 二维码容器样式 */
#qrcodeContainer {
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    /* 默认边框样式 */
    border: 4px solid #000000;
    border-radius: 12px;
    padding: 12px;
    background-color: #ffffff;
}

/* 文本容器样式 */
.text-container {
    margin-right: 12px;
    padding-right: 12px;
    border-right: 2px solid #e2e8f0;
    text-align: left;
    max-width: 160px;
    flex-shrink: 0;
}

.text-container p {
    margin: 0;
    font-size: 18px;
    color: #333333;
    line-height: 1.4;
    word-break: break-word;
}

/* 二维码图片样式 */
#qrcode img {
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* 按钮样式 */
button {
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

button:active {
    transform: translateY(0);
}

/* 输入框样式 */
input[type="text"],
input[type="number"],
select,
textarea {
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px 10px;
    width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* 颜色选择器样式 */
input[type="color"] {
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px !important;
    height: 36px !important;
}

input[type="color"]:hover {
    transform: scale(1.05);
}

/* 复选框样式 */
input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
}

/* 标签样式 */
label {
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    display: block;
    margin-bottom: 4px;
}

/* 行样式 */
.grid {
    display: grid;
    gap: 10px;
}

/* 列样式 */
.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* 四列样式 */
.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #previewContainer {
        min-height: 250px;
    }
    
    main {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .bg-white {
        padding: 14px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    h3 {
        font-size: 15px;
    }
    
    .grid-cols-2, .grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    #previewContainer {
        min-height: 240px;
        padding: 16px;
    }
    
    /* 卡片外边距 */
    section.bg-white {
        margin-bottom: 16px;
    }
    
    /* 下载按钮容器 */
    .flex.gap-3 {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    button {
        width: 100%;
        padding: 10px 16px;
    }
    
    textarea {
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 15px;
    }
    
    h3 {
        font-size: 14px;
    }
    
    .bg-white {
        padding: 12px;
        border-radius: 6px;
    }
    
    #previewContainer {
        min-height: 200px;
        padding: 12px;
        border-radius: 6px;
    }
    
    /* 输入框和选择框样式 */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* 颜色选择器 */
    input[type="color"] {
        width: 32px !important;
        height: 32px !important;
    }
    
    /* 网格间距 */
    .grid {
        gap: 10px;
    }
    
    /* 小屏幕下所有网格列改为单列 */
    .grid-cols-2, .grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* 标题间距 */
    h2.mb-4 {
        margin-bottom: 10px;
    }
    
    h3.mb-3 {
        margin-bottom: 6px;
    }
    
    /* 区块间距 */
    .mb-6 {
        margin-bottom: 16px;
    }
    
    textarea {
        min-height: 50px;
    }
}

/* 边框动画效果 */
.border-container {
    transition: all 0.3s ease;
    display: inline-block;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 平滑过渡 */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* 颜色选择器和输入框组合样式 */
.flex.items-center {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 间距样式 */
.mb-2 {
    margin-bottom: 6px;
}

.mb-3 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 12px;
}

.mb-6 {
    margin-bottom: 16px;
}

.mt-2 {
    margin-top: 6px;
}

.mt-8 {
    margin-top: 24px;
}

.py-8 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.px-4 {
    padding-left: 12px;
    padding-right: 12px;
}

.px-6 {
    padding-left: 18px;
    padding-right: 18px;
}

.py-3 {
    padding-top: 10px;
    padding-bottom: 10px;
}

.gap-2 {
    gap: 6px;
}

.gap-3 {
    gap: 8px;
}

.gap-4 {
    gap: 12px;
}

.gap-6 {
    gap: 18px;
}

.gap-8 {
    gap: 24px;
}

.p-6 {
    padding: 16px;
}

.p-8 {
    padding: 24px;
}

/* 文本居中 */
.text-center {
    text-align: center;
}

/* 文本颜色 */
.text-gray-600 {
    color: #718096;
}

.text-gray-700 {
    color: #4a5568;
}

.text-gray-800 {
    color: #2d3748;
}

/* 字体大小 */
.text-3xl {
    font-size: 28px;
}

.text-xl {
    font-size: 20px;
}

.text-lg {
    font-size: 18px;
}

.text-sm {
    font-size: 14px;
}

/* 字体粗细 */
.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.flex-1 {
    flex: 1;
}

/* 圆角 */
.rounded {
    border-radius: 6px;
}

.rounded-lg {
    border-radius: 8px;
}

.rounded-md {
    border-radius: 6px;
}

/* 过渡效果 */
.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* 背景色 */
.bg-gray-50 {
    background-color: #f7fafc;
}

.bg-blue-600 {
    background-color: #3b82f6;
}

.bg-green-600 {
    background-color: #10b981;
}

/* 文本颜色 */
.text-white {
    color: #ffffff;
}

/* 鼠标悬停效果 */
.hover\:bg-blue-700:hover {
    background-color: #2563eb;
}

.hover\:bg-green-700:hover {
    background-color: #059669;
}

/* 光标样式 */
.cursor-pointer {
    cursor: pointer;
}

/* 空格样式 */
.space-y-4 > * + * {
    margin-top: 16px;
}

/* 圆角 */
.w-10 {
    width: 40px;
}

h-10 {
    height: 40px;
}

/* 白色背景 */
.bg-white {
    background-color: #ffffff;
}

/* 阴影 */
.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 网格布局 */
.grid {
    display: grid;
}

/* 响应式网格 */
.lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 间距 */
.gap-8 {
    gap: 32px;
}

/* 填充 */
.p-6 {
    padding: 24px;
}

/* 内边距 */
.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-8 {
    padding-top: 32px;
    padding-bottom: 32px;
}

/* 外边距 */
.mb-8 {
    margin-bottom: 32px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-8 {
    margin-top: 32px;
}