        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: #333;
            line-height: 1.6;
            padding: 15px;
            min-height: 100vh;
        }
        
        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            padding: 20px;
            margin-top: 10px;
        }
        
        header {
            text-align: center;
            margin-bottom: 25px;
        }
        
        h1 {
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: 1.8rem;
        }
        
        .subtitle {
            color: #7f8c8d;
            font-size: 0.95rem;
        }
        
        .input-section {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #2c3e50;
            font-size: 0.95rem;
        }
        
        .input-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        @media (min-width: 768px) {
            .input-group {
                flex-direction: row;
            }
        }
        
        input[type="text"] {
            flex: 1;
            padding: 14px 15px;
            border: 2px solid #00BFFF;
            border-radius: 8px;
            font-size: 16px; /* 防止iOS缩放 */
            transition: border-color 0.3s;
        }
        
        input[type="text"]:focus {
            border-color: #00BFFF;
            outline: none;
        }
        
        button {
            background: #00BFFF;
            color: white;
            border: none;
            padding: 14px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            transition: all 0.3s;
            -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
        }
        
        button:hover {
            background: #00BFFF;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        .barcode-container {
            margin: 25px 0;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 10px;
            text-align: center;
            min-height: 180px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            overflow-x: auto; /* 允许水平滚动 */
        }
        
        #barcode-svg {
            max-width: 100%;
            height: auto;
        }
        
        .barcode-number {
            margin-top: 15px;
            font-family: monospace;
            font-size: 16px;
            letter-spacing: 1px;
            color: #2c3e50;
            word-break: break-all;
            text-align: center;
        }
        
        .info-section {
            background-color: #e8f4fc;
            padding: 15px;
            border-radius: 8px;
            margin-top: 20px;
            font-size: 0.9rem;
        }
        
        .info-section h3 {
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: 1.1rem;
        }
        
        .info-section p {
            margin-bottom: 8px;
            color: #34495e;
        }
        
        .error-message {
            color: #e74c3c;
            margin-top: 10px;
            font-weight: 500;
            text-align: center;
            font-size: 0.9rem;
        }
        
        .download-btn {
            background: #27ae60;
            margin-top: 15px;
            margin-right: 10px;
            width: auto;
            max-width: 200px;
        }
        
        .barcode-container {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .download-buttons {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }
        
        .download-btn:hover {
            background: #219653;
        }
        
        footer {
            text-align: center;
            margin-top: 25px;
            color: #7f8c8d;
            font-size: 0.8rem;
        }
        
        .ean13-example {
            margin-top: 15px;
            text-align: center;
            font-size: 0.85rem;
            color: #7f8c8d;
        }
        
        .size-info {
            margin-top: 10px;
            font-size: 0.8rem;
            color: #7f8c8d;
            text-align: center;
        }
        
        /* 移动端优化 */
        @media (max-width: 480px) {
            .container {
                padding: 15px;
                margin-top: 10px;
            }
            
            h1 {
                font-size: 1.6rem;
            }
            
            .subtitle {
                font-size: 0.9rem;
            }
            
            input[type="text"] {
                padding: 12px 15px;
            }
            
            button {
                padding: 12px 15px;
            }
            
            .barcode-container {
                padding: 10px;
                margin: 20px 0;
            }
            
            .barcode-number {
                font-size: 14px;
            }
        }
        
        /* 防止横向滚动 */
        html, body {
            overflow-x: hidden;
        }
        
        /* 触摸设备优化 */
        @media (hover: none) {
            button:hover {
                transform: none;
                box-shadow: none;
            }
        }
        
        /* 高分辨率屏幕优化 */
        @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
            .container {
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            }
        }