/**
 * 像素猫粮工厂 - 主样式文件
 * 负责页面整体布局和组件样式
 * 遵循模块化、轻量化、高性能设计原则
 */

/* ==================== 1. 全局样式 ====================/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 汉仪像素字体定义 - 使用本地下载的像素字体 */
@font-face {
    font-family: 'HanYiXiangSu';
    src: url('../fonts/HanYiXiangSu-11px-U/HYPixel11pxU-2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* 优化字体加载行为 */
}

/* 主体字体设置 - 智能字体回退方案 */
body {
    font-family: 'HanYiXiangSu', 'Microsoft YaHei', 'SimHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
}

/* 像素风格元素字体堆栈 */
.pixel-input, .btn, .section-title, .service-card h3 {
    font-family: 'HanYiXiangSu', 'Courier New', 'Monaco', 'Menlo', 'Consolas', 'Ubuntu Mono', monospace;
}

/* 移动设备优化 */
@media (max-width: 768px) {
    body {
        font-family: 'HanYiXiangSu', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    }
}

/* 字体加载失败时的优雅降级 */
.font-loading {
    visibility: hidden;
}

.font-loaded {
    visibility: visible;
}

body {
    background: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
    min-height: 100vh;
    padding: 20px;
    image-rendering: pixelated;
}

/* ==================== 2. 布局容器 ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    border: 4px solid #333;
    box-shadow: 
        8px 8px 0 #333,
        16px 16px 0 rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ==================== 3. 头部样式 ==================== */
.header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
    color: #333;
    /* padding: 30px; */
    text-align: center;
    border-bottom: 4px solid #333;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid #333;
    pointer-events: none;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 #FFE66D;
}

.subtitle {
    font-size: 0.9em;
    opacity: 0.8;
    background: #fff;
    padding: 10px;
    border: 2px solid #333;
    display: inline-block;
    margin-top: 10px;
}

/* ==================== 4. 内容区域布局 ==================== */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 700px;
}

.client-side {
    background: #E3F2FD;
    padding: 30px;
    border-right: 4px dashed #333;
    position: relative;
}

.server-side {
    background: #FFF3E0;
    padding: 30px;
    position: relative;
}

/* ==================== 5. 组件样式 ==================== */

/* 5.1 区域标题 */
.section-title {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 25px;
    padding: 15px;
    background: #FFE66D;
    border: 3px solid #333;
    text-align: center;
}

/* 5.2 品牌定制区域 */
.brand-customization {
    background: #C8E6C9;
    padding: 20px;
    border: 3px solid #333;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8em;
}

.pixel-input {
    width: 100%;
    padding: 12px;
    border: 3px solid #333;
    background: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
}

/* 5.3 表情选择器 */
.emoji-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.emoji-option {
    width: 45px;
    height: 45px;
    border: 3px solid #333;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.2s;
}

.emoji-option:hover {
    transform: scale(1.1);
    background: #FFE66D;
}

.emoji-option.selected {
    background: #4CAF50;
    color: white;
}

/* 5.4 流程控制区域 */
.process-controls {
    background: #FFCCBC;
    padding: 20px;
    border: 3px solid #333;
    margin-bottom: 25px;
}

.slider-group {
    margin-bottom: 20px;
    position: relative;
}

.slider-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8em;
}

.pixel-slider {
    width: 100%;
    height: 25px;
    -webkit-appearance: none; /* Webkit浏览器 */
    -moz-appearance: none;    /* Firefox浏览器 */
    appearance: none;         /* 标准属性 */
    background: #fff;
    border: 3px solid #333;
    position: relative;
}

.pixel-slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* Webkit浏览器 */
    width: 30px;
    height: 30px;
    border: 3px solid #333;
    cursor: pointer;
}

.pixel-slider::-moz-range-thumb {
    -moz-appearance: none;    /* Firefox浏览器 */
    width: 30px;
    height: 30px;
    border: 3px solid #333;
    cursor: pointer;
    background: #FF6B6B;      /* 默认颜色 */
}

/* 不同流程的滑块颜色 - Webkit浏览器 */
#recipeSlider::-webkit-slider-thumb { background: #FF6B6B; }
#productionSlider::-webkit-slider-thumb { background: #4ECDC4; }
#qualitySlider::-webkit-slider-thumb { background: #45B7D1; }
#packagingSlider::-webkit-slider-thumb { background: #96CEB4; }
#logisticsSlider::-webkit-slider-thumb { background: #FFE66D; }

/* 不同流程的滑块颜色 - Firefox浏览器 */
#recipeSlider::-moz-range-thumb { background: #FF6B6B; }
#productionSlider::-moz-range-thumb { background: #4ECDC4; }
#qualitySlider::-moz-range-thumb { background: #45B7D1; }
#packagingSlider::-moz-range-thumb { background: #96CEB4; }
#logisticsSlider::-moz-range-thumb { background: #FFE66D; }

.slider-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7em;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border: 2px solid #333;
}

/* 5.5 服务卡片 */
.service-cards {
    display: grid;
    gap: 15px;
}

.service-card {
    background: #B3E5FC;
    padding: 20px;
    border: 3px solid #333;
    cursor: pointer;
    transition: all 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
    background: #81D4FA;
}

.service-card.active {
    background: #4CAF50;
    color: white;
}

.service-card h3 {
    font-size: 1em;
    margin-bottom: 10px;
}

/* 5.6 按钮样式 */
.btn {
    background: #FF6B6B;
    color: white;
    border: 3px solid #333;
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    margin: 10px 5px;
}

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

.btn:active {
    transform: translateY(2px);
}

.btn-share {
    background: #4CAF50;
}

.btn-download {
    background: #2196F3;
}

/* ==================== 6. 生产流程可视化 ==================== */
.process-flow {
    position: relative;
    height: 500px;
    background: #FFF9C4;
    border: 4px solid #333;
    margin-bottom: 25px;
    overflow: hidden;
}

.process-step {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #fff;
    border: 3px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.7em;
    transition: all 0.5s;
}

.process-step.active {
    transform: scale(1.2);
    z-index: 10;
}

.process-step.completed {
    color: white;
}

.step-value {
    margin-top: 5px;
    font-size: 0.8em;
    font-weight: bold;
}

/* 步骤位置 */
.step-1 { top: 50px; left: 50px; }
.step-2 { top: 50px; left: 200px; }
.step-3 { top: 200px; left: 50px; }
.step-4 { top: 200px; left: 200px; }
.step-5 { top: 125px; left: 350px; }

/* 连接线 */
.step-connector {
    position: absolute;
    background: #333;
    height: 4px;
    transform-origin: left center;
    transition: all 0.5s;
    z-index: 5;
}

.connector-1 { top: 100px; left: 150px; width: 50px; }
.connector-2 { top: 100px; left: 150px; width: 50px; transform: rotate(90deg); }
.connector-3 { top: 250px; left: 150px; width: 50px; }
.connector-4 { top: 250px; left: 150px; width: 50px; transform: rotate(90deg); }
.connector-5 { top: 175px; left: 300px; width: 50px; }

/* ==================== 7. 产品输出区域 ==================== */
.product-output {
    display: none;
}

.product-output.show {
    display: block;
    animation: pixelPop 0.5s ease;
}

@keyframes pixelPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.product-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #4a5568;
    border-radius: 16px;
    padding: 25px;
    margin: 20px auto;
    max-width: 480px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    color: white;
    position: relative;
    overflow: hidden;
    font-family: 'HanYiXiangSu', 'Zpix', 'LXGW WenKai', 'Microsoft YaHei', 'SimHei', sans-serif;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

/* 产品头部样式 */
.product-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    gap: 15px;
}

.product-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.product-emoji {
    font-size: 3em;
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.6));
    animation: float 3s ease-in-out infinite;
}

.product-title-section {
    flex: 1;
}

.product-title {
    font-size: 1.8em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.product-subtitle {
    font-size: 0.9em;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 产品核心信息样式 */
.product-core {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.product-image-container {
    position: relative;
}

.product-image {
    font-size: 5em;
    text-align: center;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.6));
    animation: pulse 2s ease-in-out infinite;
}

.product-quality-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #8b4513;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 4px;
}

.quality-star {
    font-size: 0.9em;
}

.product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.detail-label {
    font-weight: bold;
    opacity: 0.9;
    min-width: 80px;
}

.tracking-code {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9em;
}

/* 产品规格网格样式 */
.product-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.spec-item {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spec-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.spec-icon {
    font-size: 1.8em;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));
}

.spec-info {
    flex: 1;
}

.spec-label {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 6px;
}

.spec-progress {
    margin-top: 8px;
}

.progress-bar {
    background: rgba(255,255,255,0.2);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 产品特色标签样式 */
.product-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.product-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.tag-premium {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.tag-natural {
    background: linear-gradient(45deg, #48bb78, #38a169);
}

.tag-custom {
    background: linear-gradient(45deg, #4299e1, #3182ce);
}

/* 产品底部样式 */
.product-footer {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
    position: relative;
    z-index: 2;
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 0.85em;
    opacity: 0.8;
}

.footer-separator {
    opacity: 0.5;
}

/* 产品操作按钮样式 */
.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
    justify-content: center;
}

.btn {
    background: linear-gradient(45deg, #48bb78, #38a169);
    border: 2px solid #2f855a;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    font-family: 'HanYiXiangSu', 'Zpix', 'LXGW WenKai', 'Microsoft YaHei', 'SimHei', sans-serif;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn:hover {
    background: linear-gradient(45deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-share {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    border-color: #2b6cb0;
}

.btn-download {
    background: linear-gradient(45deg, #ed8936, #dd6b20);
    border-color: #c05621;
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==================== 8. 流程颜色定义 ==================== */
.process-recipe { background: rgba(255, 107, 107, 0.8); }
.process-production { background: rgba(78, 205, 196, 0.8); }
.process-quality { background: rgba(69, 183, 209, 0.8); }
.process-packaging { background: rgba(150, 206, 180, 0.8); }
.process-logistics { background: rgba(255, 230, 109, 0.8); }

/* ==================== 9. 响应式设计 ==================== */

/* 中等屏幕响应式 (平板) */
@media (max-width: 1024px) {
    .container {
        margin: 10px;
        border-radius: 12px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .client-side, .server-side {
        padding: 20px;
    }
    
    .client-side {
        border-right: none;
        border-bottom: 4px dashed #333;
    }
    
    .emoji-selector {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-flow {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .step-connector {
        display: none;
    }
    
    .product-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 小屏幕响应式 (手机) */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background: #8BC6EC;
    }
    
    .container {
        margin: 5px;
        border-radius: 10px;
        border-width: 3px;
        box-shadow: 
            4px 4px 0 #333,
            8px 8px 0 rgba(0,0,0,0.1);
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.5em;
        text-shadow: 2px 2px 0 #FFE66D;
    }
    
    .subtitle {
        font-size: 0.8em;
        padding: 8px;
    }
    
    .content {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .client-side, .server-side {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.1em;
        padding: 12px;
        margin-bottom: 20px;
    }
    
    /* 品牌定制区域优化 */
    .brand-customization {
        padding: 15px;
    }
    
    .input-group label {
        font-size: 0.9em;
    }
    
    .pixel-input {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .emoji-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .emoji-option {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    /* 流程控制区域优化 */
    .process-controls {
        padding: 15px;
    }
    
    .slider-group {
        margin-bottom: 12px;
    }
    
    .slider-group label {
        font-size: 0.9em;
    }
    
    .pixel-slider {
        height: 8px;
    }
    
    .slider-value {
        font-size: 0.9em;
    }
    
    /* 服务卡片优化 */
    .service-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .service-card {
        padding: 12px;
    }
    
    .service-card h3 {
        font-size: 1em;
    }
    
    .service-card p {
        font-size: 0.85em;
    }
    
    /* 控制按钮优化 */
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        padding: 12px;
        font-size: 0.9em;
        width: 100%;
    }
    
    /* 生产流程可视化优化 */
    .process-flow {
        height: auto;
        min-height: 300px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        position: relative;
    }

    .process-step {
        position: relative;
        width: auto;
        height: auto;
        min-height: 80px;
        padding: 15px;
        margin: 0;
        top: auto !important;
        left: auto !important;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        background: #fff;
        border: 2px solid #333;
        border-radius: 8px;
        box-shadow: 2px 2px 0 #333;
        transition: all 0.3s ease;
    }

    .process-step::before {
        content: '';
        position: absolute;
        top: 50%;
        left: -10px;
        width: 20px;
        height: 20px;
        background: #333;
        transform: translateY(-50%) rotate(45deg);
        z-index: 1;
    }

    .process-step:first-child::before {
        display: none;
    }

    .process-step.active {
        transform: scale(1.02);
        box-shadow: 3px 3px 0 #333;
        z-index: 10;
    }

    .process-step.completed {
        background: #4CAF50;
        color: white;
    }

    .process-step div:first-child {
        font-size: 2em;
        min-width: 40px;
        text-align: center;
    }

    .process-step div:nth-child(2) {
        font-size: 0.9em;
        font-weight: bold;
        flex: 1;
    }

    .step-value {
        font-size: 0.9em;
        background: rgba(0,0,0,0.1);
        padding: 4px 8px;
        border-radius: 4px;
        min-width: 60px;
        text-align: center;
    }

    /* 隐藏连接线 */
    .step-connector {
        display: none;
    }

    /* 添加进度指示器 */
    .process-progress {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: #e0e0e0;
        z-index: 1;
    }

    .progress-fill {
        height: 100%;
        background: #4CAF50;
        transition: width 0.5s ease;
    }

    /* 产品卡片优化 */
    .product-card {
        padding: 25px;
        margin: 20px auto;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        border-radius: 16px;
        border-width: 3px;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    }

    .product-header {
        flex-direction: row;
        text-align: left;
        gap: 15px;
        margin-bottom: 20px;
    }

    .product-badge {
        font-size: 0.8em;
        padding: 4px 12px;
        align-self: flex-start;
    }

    .product-emoji {
        font-size: 3em;
        filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.6));
    }

    .product-title {
        font-size: 1.8em;
        line-height: 1.2;
        margin-bottom: 5px;
    }

    .product-subtitle {
        font-size: 0.9em;
        line-height: 1.3;
    }

    .product-core {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 20px;
        margin-bottom: 25px;
    }

    /* 产品图片容器 */
    .product-image-container {
        width: 120px;
        height: 120px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.1);
        border-radius: 8px;
        margin: 0;
    }

    .product-image {
        font-size: 5em;
        filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.6));
        animation: pulse 2s ease-in-out infinite;
    }

    .product-quality-badge {
        top: -5px;
        right: -5px;
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .product-details {
        padding: 0;
        gap: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .detail-row {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 0;
    }

    .detail-label {
        min-width: 80px;
        font-size: 0.95em;
    }

    .tracking-code {
        font-size: 0.9em;
        padding: 4px 8px;
    }

    .product-description {
        font-size: 0.95em;
        line-height: 1.4;
        margin-bottom: 25px;
        text-align: left;
    }

    /* 手机屏幕规格网格优化 */
    .product-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .spec-item {
        padding: 15px;
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }

    .spec-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .spec-icon {
        font-size: 1.8em;
        margin-bottom: 0;
    }

    .spec-info {
        width: auto;
    }

    .spec-label {
        font-size: 0.85em;
        margin-bottom: 4px;
    }

    .spec-value {
        font-size: 1.1em;
        margin-bottom: 6px;
    }

    .spec-progress {
        margin-top: 8px;
    }

    .progress-bar {
        height: 6px;
    }

    .product-tags {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
    }

    .product-tag {
        font-size: 0.8em;
        padding: 4px 12px;
        margin: 0;
    }

    .product-actions {
        flex-direction: row;
        gap: 10px;
    }

    .product-actions .btn {
        width: auto;
        min-height: auto;
        font-size: 0.95em;
    }

    /* 产品卡片动画优化 */
    .product-emoji {
        animation: float 4s ease-in-out infinite;
    }

    .product-image {
        animation: pulse 3s ease-in-out infinite;
    }
    
    /* 超小屏幕进一步优化 */
    @media (max-width: 480px) {
        .process-flow {
            padding: 10px;
            gap: 10px;
        }
        
        .process-step {
            min-height: 70px;
            padding: 12px;
            gap: 12px;
        }
        
        .process-step div:first-child {
            font-size: 1.8em;
            min-width: 35px;
        }
        
        .process-step div:nth-child(2) {
            font-size: 0.85em;
        }
        
        .step-value {
            font-size: 0.8em;
            min-width: 50px;
            padding: 3px 6px;
        }
        
        .process-step::before {
            left: -8px;
            width: 16px;
            height: 16px;
        }
        
        .product-specs-grid {
            grid-template-columns: 1fr;
            gap: 8px;
        }
        
        .spec-item {
            padding: 8px;
        }
        
        .spec-label {
            font-size: 0.75em;
        }
        
        .spec-value {
            font-size: 0.9em;
        }
        
        .product-tag {
            font-size: 0.7em;
            padding: 4px 8px;
            margin: 2px;
        }
    }
}

/* 超小屏幕响应式 (小手机) */
@media (max-width: 480px) {
    body {
        padding: 5px;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .container {
        margin: 2px;
        border-radius: 8px;
        border-width: 2px;
        box-shadow: 
            2px 2px 0 #333,
            4px 4px 0 rgba(0,0,0,0.1);
    }
    
    .header {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.3em;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.75em;
        padding: 6px;
        line-height: 1.3;
    }
    
    .client-side, .server-side {
        padding: 10px;
    }
    
    .section-title {
        font-size: 1em;
        padding: 10px;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .emoji-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    
    .emoji-option {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
        line-height: 35px;
    }
    
    .process-step {
        min-height: 50px;
        padding: 8px;
        line-height: 1.3;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-emoji {
        font-size: 2em;
        line-height: 1;
    }
    
    .product-title {
        font-size: 1.1em;
        line-height: 1.2;
        margin-bottom: 5px;
    }
    
    .product-image-container {
        height: 100px;
    }
    
    .product-image {
        font-size: 2.5em;
        line-height: 100px;
    }
    
    /* 超小屏幕规格网格优化 */
    .product-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    /* 额外的移动端字体和间距优化 */
    .input-group {
        margin-bottom: 15px;
    }
    
    .input-group label {
        font-size: 0.85em;
        margin-bottom: 5px;
        display: block;
    }
    
    .pixel-input {
        font-size: 0.85em;
        padding: 8px;
        line-height: 1.3;
    }
    
    .slider-group {
        margin-bottom: 15px;
    }
    
    .slider-group label {
        font-size: 0.85em;
        margin-bottom: 5px;
    }
    
    .slider-value {
        font-size: 0.8em;
    }
    
    .service-card {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .service-card h3 {
        font-size: 0.9em;
        line-height: 1.2;
        margin-bottom: 5px;
    }
    
    .service-card p {
        font-size: 0.8em;
        line-height: 1.3;
    }
    
    .btn {
        font-size: 0.85em;
        padding: 10px;
        line-height: 1.3;
        min-height: 44px; /* 触摸友好的最小高度 */
    }
    
    .product-description {
        font-size: 0.85em;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .spec-item {
        padding: 8px;
    }
    
    .spec-label {
        font-size: 0.75em;
    }
    
    .spec-value {
        font-size: 0.9em;
    }
    
    .product-tag {
        font-size: 0.7em;
        padding: 4px 8px;
        margin: 2px;
    }
}

